-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathdebpkg-build.sh
More file actions
executable file
·32 lines (25 loc) · 1.14 KB
/
debpkg-build.sh
File metadata and controls
executable file
·32 lines (25 loc) · 1.14 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#!/bin/bash
set -x -e -o pipefail
export CODENAME=`lsb_release -c -s`
export ARCH=`dpkg-architecture -qDEB_HOST_ARCH`
# check if chromium/youtube packages should be built, based on minimum
# versions of libwebsockets and libjannson
{
lws=`apt-cache show --no-all-versions libwebsockets-dev | grep Version | awk '{print $2}'` &&
jsn=`apt-cache show --no-all-versions libjansson-dev | grep Version | awk '{print $2}'` &&
if dpkg --compare-versions "$lws" gt "2.0.0" &&
dpkg --compare-versions "$jsn" ge "2.10"; then
export YOUTUBE="pkg.amplet2.build-youtube"
fi || true;
}
# check if sip packages should be built
{
apt-cache show libpjproject-dev > /dev/null 2>&1 &&
export SIP="pkg.amplet2.build-sip" || true;
}
export DEB_BUILD_PROFILES="$CODENAME $YOUTUBE $SIP"
mk-build-deps -i -r -t 'apt-get -f -y --force-yes'
# sometime around 21.04 ubuntu appears to have introduced a bug that clobbers
# the DEB_BUILD_PROFILES environment variable when they set <noudeb>, so pass
# the build profiles in as a comma separated string argument instead
dpkg-buildpackage -b -us -uc -rfakeroot -jauto -P"${DEB_BUILD_PROFILES// /,}"