-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpackage-deb
executable file
·47 lines (35 loc) · 1.24 KB
/
package-deb
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#!/bin/bash
set -o errexit
BINDISTS=${BINDISTS:-bionic}
. common.sh
rm -rf build
mkdir -p build
SOURCE=$(ls -1 sources/hitch-*.tar.gz 2>/dev/null)
findversion "$SOURCE"
tar xf "${SOURCE}" -C build
cd build/hitch-*
cp -r ../../debian .
rm -f debian/.*.sw? # Delete any vim temporary files.
ln "../../$SOURCE" "../hitch_$V.$MINOR.orig.tar.gz"
FULL_VERSION="$V.$MINOR-0${RELEASE}+daily+$(date +%Y%m%d.%H%M%S)"
# Consider setting DEBEMAIL to get prettier changelog entries.
# (and to find the right signing key below)
dch -D bionic -v "$V.$MINOR-0${RELEASE}+daily+$(date +%Y%m%d.%H%M%S)" "Automatic build from git"
head debian/changelog
# Generate the source package used by subsequent sbuilds
dpkg-buildpackage -S -j10 \
--sign-key=25C0AEC3D0D2AB90C20F1EB1E39FF2B43D24CCDD
# Work dir is build/
cd ..
# By now we are done setting up and building the source package.
if [ "$1x" = "binaryx" ]; then
# Build binary packages for the requested releases inside chroots.
for dist in $BINDISTS; do
# Legacy packages embedded the release into the package version.
export DEBIAN_OVERRIDE_BINARY_VERSION="$FULL_VERSION~$dist"
sbuild -v -A -c "$dist-amd64$chroot_postfix" -d "$dist" hitch_*.dsc
done
else
echo "Not building binary package"
exit 0
fi