summaryrefslogtreecommitdiff
path: root/docker-nativebuild
blob: 4583d46e6323894d505425b5ac681a83281780a9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/bin/sh -e
#
set -x
LOCALDSC=$1
ARCH=$2
SOURCE=`basename ${LOCALDSC}|sed -e 's,_,=,' -e 's,.dsc$,,'`

# for now assume amd64 is source and arch all upload arch
if [ $ARCH = amd64 ]
then
    upload_source="-sa "
else
    upload_source="-B "
fi

sudo apt-get install --no-install-recommends -y build-essential fakeroot
sudo apt-get build-dep --no-install-recommends -y ${SOURCE}
rm -rf work/
dpkg-source -x ${LOCALDSC} work/
cd work/ && dpkg-buildpackage -rfakeroot -j`getconf _NPROCESSORS_ONLN` $upload_source