Mercurial > hg
comparison contrib/dockerdeb @ 27210:9b86d29867a5
builddeb: add --distid option to specify Distributor ID
This allows builddeb to handle distributions that are not Debian.
Distributor ID is reported by lsb_release --id, and in case of builddeb it's
usually Debian or Ubuntu.
author | Anton Shestakov <av6@dwimlabs.net> |
---|---|
date | Wed, 25 Nov 2015 15:15:03 +0800 |
parents | 7fbab10f812f |
children | 023f47c5ce79 |
comparison
equal
deleted
inserted
replaced
27209:7fbab10f812f | 27210:9b86d29867a5 |
---|---|
6 BUILDDIR=$(dirname $0) | 6 BUILDDIR=$(dirname $0) |
7 export ROOTDIR=$(cd $BUILDDIR/..; pwd) | 7 export ROOTDIR=$(cd $BUILDDIR/..; pwd) |
8 | 8 |
9 checkdocker | 9 checkdocker |
10 | 10 |
11 CODENAME="$1" | 11 DISTID="$1" |
12 PLATFORM="debian-$1" | 12 CODENAME="$2" |
13 PLATFORM="$1-$2" | |
13 shift # extra params are passed to build process | 14 shift # extra params are passed to build process |
14 | 15 |
15 OUTPUTDIR=${OUTPUTDIR:=$ROOTDIR/packages/$PLATFORM} | 16 OUTPUTDIR=${OUTPUTDIR:=$ROOTDIR/packages/$PLATFORM} |
16 | 17 |
17 initcontainer $PLATFORM | 18 initcontainer $PLATFORM |
24 if [ $(uname) = "Darwin" ] ; then | 25 if [ $(uname) = "Darwin" ] ; then |
25 $DOCKER run -u $DBUILDUSER --rm -v $PWD/..:/mnt $CONTAINER \ | 26 $DOCKER run -u $DBUILDUSER --rm -v $PWD/..:/mnt $CONTAINER \ |
26 sh -c "cd /mnt/$dn && make clean && make local" | 27 sh -c "cd /mnt/$dn && make clean && make local" |
27 fi | 28 fi |
28 $DOCKER run -u $DBUILDUSER --rm -v $PWD/..:/mnt $CONTAINER \ | 29 $DOCKER run -u $DBUILDUSER --rm -v $PWD/..:/mnt $CONTAINER \ |
29 sh -c "cd /mnt/$dn && DEB_BUILD_OPTIONS='${DEB_BUILD_OPTIONS:=}' contrib/builddeb --build --codename $CODENAME" | 30 sh -c "cd /mnt/$dn && DEB_BUILD_OPTIONS='${DEB_BUILD_OPTIONS:=}' contrib/builddeb --build --distid $DISTID --codename $CODENAME" |
30 contrib/builddeb --cleanup --codename $CODENAME | 31 contrib/builddeb --cleanup --distid $DISTID --codename $CODENAME |
31 if [ $(uname) = "Darwin" ] ; then | 32 if [ $(uname) = "Darwin" ] ; then |
32 $DOCKER run -u $DBUILDUSER --rm -v $PWD/..:/mnt $CONTAINER \ | 33 $DOCKER run -u $DBUILDUSER --rm -v $PWD/..:/mnt $CONTAINER \ |
33 sh -c "cd /mnt/$dn && make clean" | 34 sh -c "cd /mnt/$dn && make clean" |
34 fi | 35 fi |