]> mj.ucw.cz Git - libucw.git/blobdiff - debian/mk
tableprinter: definition of the table separated from handle
[libucw.git] / debian / mk
index 9f8718b6f5b0127a77d85140d13bdb0c073eb15c..517faec3b0d949d1cd659503029d005f16211c14 100755 (executable)
--- a/debian/mk
+++ b/debian/mk
@@ -10,10 +10,12 @@ function usage {
 Usage: $0 <options>
 Options:
 --archonly             Build only binary packages
+--no-source            Don't build source files
 --cleanup              Cleanup temporary files when finished
 --version=<ver>                Custom version number of resulting packages (default: autodetect from git-describe)
 --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
 EOF
        exit 1
 }
@@ -32,7 +34,7 @@ function pkg-gen-debian {(
 
        if [ -n "$GEN_SCRIPT" ] ; then
                echo "Executing $GEN_SCRIPT"
-               $GEN_SCRIPT
+               eval "$GEN_SCRIPT"
        fi
 
        echo "Creating debian/changelog"
@@ -47,6 +49,7 @@ function pkg-gen-debian {(
 ROOT="`pwd`"
 PKG=libucw
 ARCHONLY=
+NO_SOURCE=
 CLEANUP=
 CONF=
 GEN_SCRIPT=
@@ -54,6 +57,8 @@ while [ -n "$1" ] ; do
        case "$1" in
        --archonly)     ARCHONLY=1
                        ;;
+       --no-source)    NO_SOURCE=1
+                       ;;
        --cleanup)      CLEANUP=1
                        ;;
        --version=*)    PKGVER="${1:10}"
@@ -62,6 +67,8 @@ while [ -n "$1" ] ; do
                        ;;
        --gen-script=*) GEN_SCRIPT="${1:13}"
                        ;;
+       --extra-conf=*) CONF="$CONF ${1:13}"
+                       ;;
         *)             usage
                        ;;
        esac
@@ -73,8 +80,15 @@ pkg-git-checkout
 
 echo $TREEVER >$BUILDDIR/UCW_VERSION
 pkg-gen-debian
-(cd $BUILDDIR && dpkg-buildpackage -rfakeroot -us -uc ${ARCHONLY:+"-B"})
+
+BUILDOPTS=
+if [ -n "$ARCHONLY" ] ; then
+       BUILDOPTS=-B
+elif [ -n "$NO_SOURCE" ] ; then
+       BUILDOPTS=-b
+fi
+(cd $BUILDDIR && dpkg-buildpackage -rfakeroot -us -uc $BUILDOPTS)
 [ -z "$ARCHONLY" ] || rm -f debian-tmp/*_all.deb
-pkg-get-files debian-tmp/*.{deb,dsc,changes}
+pkg-get-files debian-tmp/*.{deb,dsc,changes,tar.gz}
 
 [ -z "$CLEANUP" ] || pkg-cleanup