#!/usr/bin/env bash BUILDDIR=$1 DSC_FILE=$2 apt install -y git-buildpackage equivs if [ "$1" == "-h" ]; then echo "Usage: `basename $0` Takes a builddir and a dsc url and builds and installs the result." exit 0 fi FILESTAMP=$(date '+%Y-%m-%d-%H-%M')-$(uuidgen -t) BUILD_DIR=${BUILDDIR}/build-${FILESTAMP} echo "Building in ${BUILD_DIR}" mkdir -p ${BUILD_DIR} cd ${BUILD_DIR} # Download the package to build echo "RUNNING: gbp import-dsc -v --allow-unauthenticated ${DSC_FILE}" gbp import-dsc -v --allow-unauthenticated ${DSC_FILE} cd * # Install the build deps mk-build-deps debian/control --install --root-cmd sudo --remove ## Update to latest via uscan and debian/watch #VERSION=$(uscan --no-download ) #uscan --verbose #uupdate -v 1.11.5 ../*.tar.gz #cd ../*${VERSION} # Build the packages if [ -d debian ]; then dpkg-buildpackage -us -uc -b fi if [ -f *.deb ]; then dpkg -i ../*.deb apt install -y -f else echo "No debs to install, did the package build complete successfully?" fi