chiark / gitweb /
debian: Drop CDBS in favour of plain Debhelper.
authorMark Wooding <mdw@distorted.org.uk>
Fri, 14 Jun 2013 19:43:15 +0000 (20:43 +0100)
committerMark Wooding <mdw@distorted.org.uk>
Sat, 22 Jun 2013 14:52:27 +0000 (15:52 +0100)
Makefile.am
debian/.gitignore
debian/compat [new file with mode: 0644]
debian/control
debian/rules
debian/tripe-peer-services.dirs [deleted file]
debian/tripe.install

index 1576daa..d86ec32 100644 (file)
@@ -109,6 +109,7 @@ EXTRA_DIST          += debian/rules
 EXTRA_DIST             += debian/control
 EXTRA_DIST             += debian/changelog
 EXTRA_DIST             += debian/copyright
+EXTRA_DIST             += debian/compat
 
 ## pkstream
 EXTRA_DIST             += debian/pkstream.copyright
@@ -135,7 +136,6 @@ EXTRA_DIST          += debian/tripe-keys.install
 EXTRA_DIST             += debian/python-tripe.install
 
 ## peer services
-EXTRA_DIST             += debian/tripe-peer-services.dirs
 EXTRA_DIST             += debian/tripe-peer-services.install
 
 ## monitor
index e8d38ce..dcddb1d 100644 (file)
@@ -5,7 +5,6 @@ substvars
 *.substvars
 *.debhelper
 stamp-*
-compat
 *.log
 
 ## Individual packages
diff --git a/debian/compat b/debian/compat
new file mode 100644 (file)
index 0000000..45a4fb7
--- /dev/null
@@ -0,0 +1 @@
+8
index d42e590..c527b72 100644 (file)
@@ -4,7 +4,7 @@ Priority: extra
 Maintainer: Mark Wooding <mdw@distorted.org.uk>
 XS-Python-Version: >= 2.4
 Build-Depends: catacomb-dev (>= 2.1.4), mlib-dev (>= 2.0.4),
- tshark, wireshark-dev (>= 0.10.10), debhelper (>= 4.0.2),
+ tshark, wireshark-dev (>= 0.10.10), debhelper (>= 9),
  python-central
 Standards-Version: 3.1.1
 
index b9a095f..01625b2 100755 (executable)
@@ -1,70 +1,73 @@
 #! /usr/bin/make -f
 
-CDBS = /usr/share/cdbs/1
-
-include $(CDBS)/rules/debhelper.mk
-include $(CDBS)/class/autotools.mk
+DH_OPTIONS              = --parallel -Bdebian/build
 
 ###--------------------------------------------------------------------------
-### General settings.
-
-DEB_BUILDDIR = $(CURDIR)/build
-DEB_MAKE_CHECK_TARGET = check
+### Configuration.
 
-###--------------------------------------------------------------------------
-### Correct configuration.
+OVERRIDES              += auto_configure
+dh_auto_configure_OPTS  = --
 
-## This will need changing on other kernels.
-default_tunnel = linux
+## Various files and directories.
+dh_auto_configure_OPTS += --libexecdir="\$${libdir}/tripe"
+dh_auto_configure_OPTS += --with-configdir="/etc/tripe"
+dh_auto_configure_OPTS += --with-socketdir="/var/run"
+dh_auto_configure_OPTS += --with-logfile="/var/log/tripe/tripe.log"
+dh_auto_configure_OPTS += --with-pidfile="/var/run/tripectl.pid"
 
-## Configuration arguments.
-DEB_CONFIGURE_EXTRA_FLAGS = \
-       --with-tunnel="$(default_tunnel) slip" \
-       --with-configdir="/etc/tripe" \
-       --with-socketdir="/var/run" \
-       --with-logfile="/var/log/tripe/tripe.log" \
-       --with-pidfile="/var/run/tripectl.pid" \
-       --with-initconfig="/etc/default/tripe"
+## The default tunnel.  If we try to port this to other kernels, we'll need
+## something more complicated here.
+dh_auto_configure_OPTS += --with-tunnel="linux slip"
 
 ###--------------------------------------------------------------------------
-### Python.
+### The wireshark plugin.
+
+OVERRIDES              += gencontrol
+dh-gencontrol-hook::
+       dpkg --status wireshark-common | \
+               sed -n 's/^Version: */tripe:Wireshark-Version=/p' \
+               >> debian/tripe-wireshark.substvars
 
-binary-install/python-tripe::
-       dh_pycentral -ppython-tripe
+OVERRIDES              += shlibdeps
+dh_shlibdeps_OPTS      += -Xwireshark/plugins
 
 ###--------------------------------------------------------------------------
-### Install the startup scripts.
+### The startup script and related machinery.
 
-install/tripe::
-       cp $(DEB_BUILDDIR)/init/tripe-init debian/tripe.init
+dh_auto_configure_OPTS += --with-initconfig="/etc/default/tripe"
+
+OVERRIDES              += installinit
+dh-installinit-hook::
+       cp debian/build/init/tripe-init debian/tripe.init
        sed 's/^#\(user\|group\)/\1/' \
-               $(DEB_SRCDIR)/init/tripe.conf >debian/tripe.default
-       mkdir -p debian/tripe/usr/share/doc/tripe/examples
-       for i in tripe-ipif ipif-peers tripe-upstart greet knock; do \
-         cp $(DEB_BUILDDIR)/contrib/$$i \
-               debian/tripe/usr/share/doc/tripe/examples; \
-       done
-
-cleanbuilddir::
+               init/tripe.conf >debian/tripe.default
+
+OVERRIDES              += clean
+dh-clean-hook::
        rm -f debian/tripe.init debian/tripe.default
 
 ###--------------------------------------------------------------------------
-### Install configuration files.
-
-install/tripe-peer-services::
-       install -m644 $(DEB_SRCDIR)/peerdb/peers.in \
+### Other things.
+
+## Python stuff.
+DH_OPTIONS             += --with=python-central
+OVERRIDES              += pycentral
+dh_pycentral_OPTS      += -ppython-tripe
+
+## The peer database.
+OVERRIDES              += install
+dh-install-hook::
+       mkdir -p debian/tripe-peer-services/etc/tripe/peers.d
+       install -m644 peerdb/peers.in \
                debian/tripe-peer-services/etc/tripe/peers.d/10base
 
 ###--------------------------------------------------------------------------
-### Wireshark plugin.
+### Some machinery for overriding Debhelper in a structured way.
 
-## Grab the version we built against, so we can put it in the dependencies.
-install/tripe-wireshark::
-       dpkg --status wireshark-common | \
-               sed -n 's/^Version: */tripe:Wireshark-Version=/p' \
-               >> debian/tripe-wireshark.substvars
+%:; dh $@ $(DH_OPTIONS)
 
-## Don't track dependencies for the plugin.  We have it covered already.
-DEB_DH_SHLIBDEPS_ARGS_tripe-wireshark += -Xwireshark/plugins
+$(foreach o, $(sort $(OVERRIDES)), dh-$o-hook)::; @:
+$(foreach o, $(sort $(OVERRIDES)), override_dh_$o): override_dh_%: dh-%-hook
+       dh_$* $(addprefix -O, $(DH_OPTIONS)) $(dh_$*_OPTS)
 
 ###----- That's all, folks --------------------------------------------------
diff --git a/debian/tripe-peer-services.dirs b/debian/tripe-peer-services.dirs
deleted file mode 100644 (file)
index b6462c3..0000000
+++ /dev/null
@@ -1 +0,0 @@
-etc/tripe/peers.d
index 54165e8..6f8001a 100644 (file)
@@ -7,3 +7,9 @@ debian/tmp/usr/share/man/man8/tripe.8
 debian/tmp/usr/lib/tripe/tripe-privhelper
 debian/tmp/usr/share/man/man8/tripe-privhelper.8
 debian/tmp/usr/lib/pkgconfig/tripe.pc
+
+debian/build/contrib/tripe-ipif                /usr/share/doc/tripe/examples
+debian/build/contrib/ipif-peers                /usr/share/doc/tripe/examples
+debian/build/contrib/tripe-upstart     /usr/share/doc/tripe/examples
+debian/build/contrib/greet             /usr/share/doc/tripe/examples
+debian/build/contrib/knock             /usr/share/doc/tripe/examples