vinaigrette/scripts/rebuildd/build-binaries

44 lines
1.1 KiB
Text
Raw Normal View History

2017-08-29 17:17:25 +02:00
#!/bin/bash
codename=$1
package=$2
version=$3
arch=$4
sendxmpppy "⏳ Starting build for ${package}/${version} for arch=$arch ..."
2017-08-30 05:51:28 +02:00
source /home/vinaigrette/config/config
2017-08-31 00:35:22 +02:00
source /home/vinaigrette/scripts/package_helpers.sh
2017-08-29 17:17:25 +02:00
if [[ $arch == all ]]; then arch=$DEFAULT_ARCH; fi
2017-08-29 17:17:25 +02:00
if [[ $arch == $DEFAULT_ARCH ]]; then
# Build architecture independent packages too
DEBBUILDOPTS="-b"
else
# Build only binary-only limited to architecture dependent packages
DEBBUILDOPTS="-B"
2017-08-29 17:17:25 +02:00
fi
# Format needed pbuilder arguments
DSC_FILE="${package}_${version}.dsc"
2020-05-07 17:11:46 +02:00
BASE_TGZ="${PBUILDER_CHROOTS}/${codename}-${arch}.tgz"
echo "######################"
echo " Starting build ... "
echo "######################"
2018-04-23 19:24:59 +02:00
echo "Running 'pbuilder build --basetgz $BASE_TGZ --debbuildopts $DEBBUILDOPTS $DSC_FILE"
pbuilder build \
--basetgz "$BASE_TGZ" \
--architecture $arch \
--debbuildopts "$DEBBUILDOPTS" \
$DSC_FILE
2017-08-29 17:17:25 +02:00
2017-09-04 19:13:28 +02:00
exit_code=$?
2017-08-29 17:17:25 +02:00
[[ $exit_code == 0 ]] || sendxmpppy "❌ Failed build for ${package}/${version} for arch=$arch ?!"
2017-08-29 17:17:25 +02:00
exit $exit_code