##// END OF EJS Templates
packaging: make packaging scripts less reliant on pwd...
Gregory Szorc -
r38033:917f635b default
parent child Browse files
Show More
@@ -6,6 +6,8 b''
6 6
7 7 . $(dirname $0)/packagelib.sh
8 8
9 ROOTDIR=$(cd $(dirname $0)/../.. > /dev/null; pwd)
10
9 11 BUILD=1
10 12 CLEANUP=1
11 13 DISTID=`(lsb_release -is 2> /dev/null | tr '[:upper:]' '[:lower:]') || echo debian`
@@ -73,7 +75,7 b' if [ "$BUILD" ]; then'
73 75 exit 1
74 76 fi
75 77
76 cp -r "$PWD"/contrib/packaging/debian debian
78 cp -r "$ROOTDIR"/contrib/packaging/debian debian
77 79
78 80 sed -i.tmp "s/__VERSION__/$debver/" $changelog
79 81 sed -i.tmp "s/__DATE__/$(date --rfc-2822)/" $changelog
@@ -82,7 +84,7 b' if [ "$BUILD" ]; then'
82 84
83 85 # remove the node from the version string
84 86 SRCFILE="mercurial_$(echo $debver | sed "s,-$node,,").orig.tar.gz"
85 "$PWD/hg" archive $SRCFILE
87 "$ROOTDIR/hg" archive $SRCFILE
86 88 mv $SRCFILE ..
87 89 debuild -us -uc -i -I $DEBFLAGS
88 90 if [ $? != 0 ]; then
@@ -20,13 +20,13 b' initcontainer $PLATFORM'
20 20 # debuild only appears to be able to save built debs etc to .., so we
21 21 # have to share the .. of the current directory with the docker
22 22 # container and hope it's writable. Whee.
23 dn=$(basename $PWD)
23 dn=$(basename $ROOTDIR)
24 24
25 25 if [ $(uname) = "Darwin" ] ; then
26 26 $DOCKER run -u $DBUILDUSER --rm -v $PWD/..:/mnt $CONTAINER \
27 27 sh -c "cd /mnt/$dn && make clean && make local"
28 28 fi
29 $DOCKER run -u $DBUILDUSER --rm -v $PWD/..:/mnt $CONTAINER \
29 $DOCKER run -u $DBUILDUSER --rm -v $ROOTDIR/..:/mnt $CONTAINER \
30 30 sh -c "cd /mnt/$dn && DEB_BUILD_OPTIONS='${DEB_BUILD_OPTIONS:=}' contrib/packaging/builddeb --build --distid $DISTID --codename $CODENAME $@"
31 31 contrib/packaging/builddeb --cleanup --distid $DISTID --codename $CODENAME
32 32 if [ $(uname) = "Darwin" ] ; then
@@ -13,7 +13,7 b' shift # extra params are passed to build'
13 13 initcontainer $PLATFORM
14 14
15 15 RPMBUILDDIR=$ROOTDIR/packages/$PLATFORM
16 contrib/packaging/buildrpm --rpmbuilddir $RPMBUILDDIR --prepare $*
16 $ROOTDIR/contrib/packaging/buildrpm --rpmbuilddir $RPMBUILDDIR --prepare $*
17 17
18 18 DSHARED=/mnt/shared
19 19 $DOCKER run -e http_proxy -e https_proxy -u $DBUILDUSER --rm -v $RPMBUILDDIR:$DSHARED $CONTAINER \
General Comments 0
You need to be logged in to leave comments. Login now