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
|
#!/bin/bash
# buildpackge using pbuilder.
# Prerequesite:
# builbot_make_orig_source run
# pbuilder setup.
# you need to setup sudo to allow the buildbot user to running pdebuild.
# you also need to allow sudo pbuilder update
# Result:
# hopfully a debian package...
set -e
VERSION=$(grep "PACKAGE_VERSION=" configure | cut -d"=" -f 2- | tr --delete "\'")
# check if we can skip pbuilder update -- we do it only once after an apt-get update
# for this we compare the time against the last modification of /var/lib/apt/lists
LAST_UPDATE=$(stat -c %Y /var/cache/pbuilder/base.tgz)
LISTS_TIMESTAMP=$(stat -c %Y /var/lib/apt/lists)
if [[ $LAST_UPDATE -lt $LISTS_TIMESTAMP ]]
then
sudo /usr/sbin/pbuilder update
fi
( cd stagedir_debbuild/solarpowerlog-$VERSION && pdebuild --debbuildopts "-j2" )
|