##// END OF EJS Templates
packaging: always execute builddeb from source root...
Gregory Szorc -
r38804:824636b0 stable
parent child Browse files
Show More
@@ -1,40 +1,40
1 1 #!/bin/bash -eu
2 2
3 3 . $(dirname $0)/packagelib.sh
4 4
5 5 BUILDDIR=$(dirname $0)
6 6 export ROOTDIR=$(cd $BUILDDIR/../.. > /dev/null; pwd)
7 7
8 8 DISTID="$1"
9 9 CODENAME="$2"
10 10 PLATFORM="$1-$2"
11 11 shift; shift # extra params are passed to build process
12 12
13 13 OUTPUTDIR=${OUTPUTDIR:=$ROOTDIR/packages/$PLATFORM}
14 14 CONTAINER=hg-docker-$PLATFORM
15 15
16 16 DOCKER=$($BUILDDIR/hg-docker docker-path)
17 17
18 18 $BUILDDIR/hg-docker build \
19 19 --build-arg CODENAME=$CODENAME \
20 20 $BUILDDIR/docker/$DISTID.template \
21 21 $CONTAINER
22 22
23 23 # debuild only appears to be able to save built debs etc to .., so we
24 24 # have to share the .. of the current directory with the docker
25 25 # container and hope it's writable. Whee.
26 26 dn=$(basename $ROOTDIR)
27 27
28 28 DBUILDUSER=build
29 29
30 30 if [ $(uname) = "Darwin" ] ; then
31 31 $DOCKER run -u $DBUILDUSER --rm -v $PWD/..:/mnt $CONTAINER \
32 32 sh -c "cd /mnt/$dn && make clean && make local"
33 33 fi
34 34 $DOCKER run -u $DBUILDUSER --rm -v $ROOTDIR/..:/mnt $CONTAINER \
35 35 sh -c "cd /mnt/$dn && DEB_BUILD_OPTIONS='${DEB_BUILD_OPTIONS:=}' contrib/packaging/builddeb --build --distid $DISTID --codename $CODENAME $@"
36 contrib/packaging/builddeb --cleanup --distid $DISTID --codename $CODENAME
36 (cd $ROOTDIR && contrib/packaging/builddeb --cleanup --distid $DISTID --codename $CODENAME)
37 37 if [ $(uname) = "Darwin" ] ; then
38 38 $DOCKER run -u $DBUILDUSER --rm -v $PWD/..:/mnt $CONTAINER \
39 39 sh -c "cd /mnt/$dn && make clean"
40 40 fi
General Comments 0
You need to be logged in to leave comments. Login now