Mercurial > hg
changeset 22441:bb9a06d14857
dockerrpm: prepare source outside docker and just run rpmbuild inside docker
Simplifies the rpm build process.
We will use platform specific rpmbuild directories and will not clean them and
will drop the explicit copy to build directory.
author | Mads Kiilerich <madski@unity3d.com> |
---|---|
date | Fri, 30 May 2014 14:14:33 +0200 |
parents | cf7b5c011737 |
children | 77da9c03be60 |
files | contrib/dockerrpm |
diffstat | 1 files changed, 6 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- 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