From b88c529e8fdb470c40ca37e658b80f3990033539 Mon Sep 17 00:00:00 2001 From: Mark Wooding Date: Fri, 14 Jun 2013 18:13:36 +0100 Subject: [PATCH] debian: Dump CDBS in favour of plain Debhelper. --- Makefile.am | 1 + debian/.gitignore | 1 - debian/compat | 1 + debian/control | 2 +- debian/rules | 44 ++++++++++++++++++++------------------------ 5 files changed, 23 insertions(+), 26 deletions(-) create mode 100644 debian/compat diff --git a/Makefile.am b/Makefile.am index 64eeabf..f660e70 100644 --- a/Makefile.am +++ b/Makefile.am @@ -305,6 +305,7 @@ EXTRA_DIST += debian/rules EXTRA_DIST += debian/copyright EXTRA_DIST += debian/changelog EXTRA_DIST += debian/control +EXTRA_DIST += debian/compat ## What to install where. EXTRA_DIST += debian/inst diff --git a/debian/.gitignore b/debian/.gitignore index bbb9628..d7c93da 100644 --- a/debian/.gitignore +++ b/debian/.gitignore @@ -20,4 +20,3 @@ inplace *.install stamp-* tmp -compat diff --git a/debian/compat b/debian/compat new file mode 100644 index 0000000..ec63514 --- /dev/null +++ b/debian/compat @@ -0,0 +1 @@ +9 diff --git a/debian/control b/debian/control index 9af2b32..55fa6dd 100644 --- a/debian/control +++ b/debian/control @@ -2,7 +2,7 @@ Source: nsict-utils Section: utils Priority: extra Maintainer: Mark Wooding -Build-Depends: tinycdb, cdbs, python, python-cdb, +Build-Depends: tinycdb, debhelper (>= 9), python, python-cdb, catacomb-dev (>= 2.1.1), mlib-dev (>= 2.0.4), libspamc-dev, libcdb-dev Standards-Version: 3.1.1 diff --git a/debian/rules b/debian/rules index 27cc80f..f04c6f8 100755 --- a/debian/rules +++ b/debian/rules @@ -1,20 +1,10 @@ #! /usr/bin/make -f -CDBS = /usr/share/cdbs/1 +DH_OPTIONS = --parallel --builddir=debian/build +%:; dh $@ $(DH_OPTIONS) -include $(CDBS)/class/autotools.mk -include $(CDBS)/rules/debhelper.mk - -###-------------------------------------------------------------------------- -### General settings. - -DEB_BUILDDIR = $(CURDIR)/build - -###-------------------------------------------------------------------------- -### Correct configuration. - -DEB_CONFIGURE_EXTRA_FLAGS = \ - --with-perlmoddir=/usr/share/perl5 +override_dh_auto_configure: + dh_auto_configure -- --with-perlmoddir=/usr/share/perl5 ###-------------------------------------------------------------------------- ### Installation. @@ -22,15 +12,21 @@ DEB_CONFIGURE_EXTRA_FLAGS = \ ### Rather than have lots (and /lots/) of little *.install files, we just ### have one big list of everything and split it out as we go. -clean::; rm -f debian/*.install - -$(addprefix install/, $(DEB_ALL_PACKAGES)):: install/%: debian/%.install - -debian/%.install: debian/inst - while read file pkg dir; do \ - if [ "$$pkg" = "$*" ]; then \ - echo "debian/tmp$$dir/$$file"; \ - fi; \ - done $@.new && mv $@.new $@ +override_dh_clean: + dh_clean + rm -f debian/*.install debian/*.stamp + +override_dh_install: debian/install-files.stamp + dh_install + +debian/install-files.stamp: debian/inst + rm -f debian/*.install debian/*.install.new + pkgs=" "; while read file pkg dir; do \ + case "$$pkgs" in *" $$pkg "*) ;; *) pkgs="$$pkgs$$pkg ";; esac; \ + echo "debian/tmp$$dir/$$file" >>debian/$$pkg.install.new; \ + done