first draft (not working) of control generation
authormirabilos <t.glaser@tarent.de>
Sat, 2 Dec 2017 23:21:17 +0000 (00:21 +0100)
committermirabilos <t.glaser@tarent.de>
Sat, 2 Dec 2017 23:21:17 +0000 (00:21 +0100)
debian/control.in
debian/rules

index a1bb18d..f3c28d7 100644 (file)
@@ -3,13 +3,7 @@ Section: editors
 Priority: optional
 Maintainer: Thorsten Glaser <tg@mirbsd.de>
 Homepage: https://www.mirbsd.org/jupp.htm
-# Just drop B-D on autotools-dev or libselinux1-dev if needed,
-# as they are optional and autodetected; debhelper 5 is enough.
-Build-Depends: debhelper (>= 9),
-  autotools-dev,
-# libselinux1-dev [!kfreebsd-i386 !kfreebsd-amd64 !hurd-i386],
-  libselinux1-dev [linux-any],
-  libtinfo-dev | libncurses-dev
+Build-Depends: @@DEPS@@
 Standards-Version: 4.1.2
 VCS-git: https://anonscm.debian.org/git/collab-maint/jupp.git -b master
 VCS-Browser: https://anonscm.debian.org/cgit/collab-maint/jupp.git/?h=master
index 476ab35..fd237e1 100755 (executable)
@@ -224,7 +224,7 @@ endif
 CONFIGURE_ARGS+=       --disable-termidx \
                        --enable-sysconfjoesubdir=/jupp
 
-debian/.configure_stamp:
+debian/.configure_stamp: debian/.control_stamp
        dh_testdir
        -rm -f debian/.*_stamp
        -rm -rf builddir
@@ -247,11 +247,25 @@ debian/.build_stamp: debian/.configure_stamp
        ln -f builddir/joe.1 builddir/jupp.1
        @:>$@
 
+debian/.control_stamp:
+       @(if test -e debian/control.in; then exit 0; else \
+               echo 'dh_testdir: "debian/control.in" not found.' \
+                   Are you sure you are in the correct directory\?; \
+               exit 1; \
+       fi)
+       echo ${DEBHELPER_VERSION} >debian/compat
+       sed -e 's\ 1@@DEPS@@\ 1$(strip ${DSC_DEPS})\ 1' \
+           <debian/control.in >debian/.gencontrol_stamp
+       : bail out if these differ: in those cases,
+       : you are to regenerate debian/control and retry
+       diff -Nu debian/control debian/.gencontrol_stamp
+       @:>$@
+
 build: build-arch build-indep
 build-arch: debian/.build_stamp
 build-indep: debian/.configure_stamp
 
-clean:
+clean: debian/.control_stamp
        dh_testdir
        -rm -f debian/.*_stamp
        -rm -rf builddir