#!/bin/bash
# A script for building of LibUCW packages
-# (c) 2013--2014 Pavel Charvat <pchar@ucw.cz>
+# (c) 2013--2017 Pavel Charvat <pchar@ucw.cz>
set -e
. debian/pkg-lib
--abi-version=<ver> Custom version number of the LibUCW's ABI (default: defined in ucw/default.cfg)
--gen-script=<script> Custom script to postprocess
--extra-conf=<args> Add extra arguments to the configure script
+--no-checkout Expect manually checked out sources to build directory (useful for chrooted building; --version is mandatory)
EOF
exit 1
}
;;
--extra-conf=*) CONF="$CONF ${1:13}"
;;
- *) usage
+ --no-checkout) PKG_NO_CHECKOUT=1
+ ;;
+ *) usage
;;
esac
shift
pkg-git-version
pkg-git-checkout
-echo $TREEVER >$BUILDDIR/UCW_VERSION
+echo $VER >$BUILDDIR/UCW_VERSION
pkg-gen-debian
BUILDOPTS=
# A library of shell functions for building of Debian packages
# (c) 2008--2009 Martin Mares <mj@ucw.cz>
-# (c) 2009--2013 Pavel Charvat <pchar@ucw.cz>
+# (c) 2009--2017 Pavel Charvat <pchar@ucw.cz>
# Expects:
# PKG name of the package
# ROOT absolute path to the root of the source tree
# PKGVER custom package version
-unset PKG ROOT SRCVER VER
+unset PKG ROOT SRCVER VER PKG_NO_CHECKOUT
function pkg-git-version {
- TREEVER=`git describe --tags | sed 's/^v//;s/[a-f]$/&-0/'`
- TREEHASH=`git rev-parse --verify HEAD`
+ if [ -z "$PKG_NO_CHECKOUT" ] ; then
+ TREEVER=`git describe --tags | sed 's/^v//;s/[a-f]$/&-0/'`
+ TREEHASH=`git rev-parse --verify HEAD`
+ else
+ TREEVER=?
+ TREEHASH=?
+ fi
VER=${PKGVER:-$TREEVER}
SRCVER=${PKGVER:-$VER}
cat <<EOF
function pkg-git-checkout {
BUILDDIR=debian-tmp/$PKG-$SRCVER
- rm -rf debian-tmp
- mkdir -p $BUILDDIR
- git checkout-index -a --prefix=$BUILDDIR/
+ if [ -z "$PKG_NO_CHECKOUT" ] ; then
+ rm -rf debian-tmp
+ mkdir -p $BUILDDIR
+ git checkout-index -a --prefix=$BUILDDIR/
+ fi
}
function pkg-fake-changelog {