contrib/dockerrpm
changeset 22441 bb9a06d14857
parent 22440 cf7b5c011737
child 22443 d8818616c45e
--- a/contrib/dockerrpm	Fri May 30 14:14:33 2014 +0200
+++ b/contrib/dockerrpm	Fri May 30 14:14:33 2014 +0200
@@ -31,5 +31,9 @@
 echo RUN useradd $DBUILDUSER -u `id -u` -g $DBUILDUSER
 ) | $DOCKER build --tag $CONTAINER -
 
-$DOCKER run -u $DBUILDUSER --rm -v $ROOTDIR:/hg $CONTAINER bash -c \
-    "cp -a hg hg-build; cd hg-build; make clean local $PLATFORM; cp packages/$PLATFORM/* /hg/packages/$PLATFORM/"
+RPMBUILDDIR=$ROOTDIR/packages/$PLATFORM
+contrib/buildrpm --rpmbuilddir $RPMBUILDDIR --prepare
+
+DSHARED=/mnt/shared
+$DOCKER run -u $DBUILDUSER --rm -v $RPMBUILDDIR:$DSHARED $CONTAINER \
+    rpmbuild --define "_topdir $DSHARED" -ba $DSHARED/SPECS/mercurial.spec --clean