]> mj.ucw.cz Git - libucw.git/commitdiff
LibUCW: debian/mk can postprocess debian/control with a custom script.
authorPavel Charvat <pchar@ucw.cz>
Fri, 7 Feb 2014 08:54:31 +0000 (09:54 +0100)
committerPavel Charvat <pchar@ucw.cz>
Fri, 7 Feb 2014 08:54:31 +0000 (09:54 +0100)
debian/mk

index 210fd05e0abc6f5e98a61056ec6a42c9dc039d8d..9f8718b6f5b0127a77d85140d13bdb0c073eb15c 100755 (executable)
--- a/debian/mk
+++ b/debian/mk
@@ -1,6 +1,6 @@
 #!/bin/bash
 # A script for building of LibUCW packages
-# (c) 2013 Pavel Charvat <pchar@ucw.cz>
+# (c) 2013--2014 Pavel Charvat <pchar@ucw.cz>
 
 set -e
 . debian/pkg-lib
@@ -13,6 +13,7 @@ Options:
 --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
 EOF
        exit 1
 }
@@ -29,6 +30,11 @@ function pkg-gen-debian {(
        echo "Creating debian/control"
        build/genconf debian/control.in debian/control obj/config.mk
 
+       if [ -n "$GEN_SCRIPT" ] ; then
+               echo "Executing $GEN_SCRIPT"
+               $GEN_SCRIPT
+       fi
+
        echo "Creating debian/changelog"
        export EDITOR=true
        CL=debian/changelog
@@ -43,6 +49,7 @@ PKG=libucw
 ARCHONLY=
 CLEANUP=
 CONF=
+GEN_SCRIPT=
 while [ -n "$1" ] ; do
        case "$1" in
        --archonly)     ARCHONLY=1
@@ -53,6 +60,8 @@ while [ -n "$1" ] ; do
                        ;;
        --abi-version=*)CONF="$CONF UCW_ABI_SUFFIX=-${1:14}"
                        ;;
+       --gen-script=*) GEN_SCRIPT="${1:13}"
+                       ;;
         *)             usage
                        ;;
        esac