summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClint Adams <clint@debian.org>2017-01-04 21:15:20 -0500
committerClint Adams <clint@debian.org>2017-01-04 21:28:54 -0500
commitbfdd789abd8fae44d66228f6a46e2567c6fe6452 (patch)
tree6473592a4a83cb76027b4a975df6f2c82962fa6b
parentb56d05bf43886375169ab1baeab74f1a44a20ac8 (diff)
Convert build system to dh
-rw-r--r--debian/compat1
-rw-r--r--debian/control2
-rwxr-xr-xdebian/rules125
-rw-r--r--debian/sed.docs6
-rw-r--r--debian/sed.examples1
5 files changed, 17 insertions, 118 deletions
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 7c55d5b..83bf33a 100644
--- a/debian/control
+++ b/debian/control
@@ -3,7 +3,7 @@ Section: utils
Priority: required
Maintainer: Clint Adams <clint@debian.org>
Standards-Version: 3.9.8
-Build-Depends: texinfo, gettext, libselinux-dev [linux-any], autotools-dev
+Build-Depends: texinfo, gettext, libselinux-dev [linux-any], autotools-dev, debhelper (>= 9), dh-autoreconf
Vcs-Git: https://anonscm.debian.org/git/users/clint/sed.git
Vcs-Browser: https://anonscm.debian.org/cgit/users/clint/sed.git/
Homepage: https://www.gnu.org/software/sed/
diff --git a/debian/rules b/debian/rules
index 818cec3..27d7681 100755
--- a/debian/rules
+++ b/debian/rules
@@ -1,122 +1,13 @@
#! /usr/bin/make -f
-# Debian package information
-package = sed
-docdir = /usr/share/doc/$(package)
-tmpdir = $(CURDIR)/debian/tmp
+%:
+ dh $@ --with autotools-dev,autoreconf
-DEB_BUILD_GNU_TYPE = $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
-DEB_HOST_GNU_TYPE = $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
-ifneq ($(DEB_BUILD_GNU_TYPE),$(DEB_HOST_GNU_TYPE))
-CONFARGS = --host=$(DEB_HOST_GNU_TYPE)
-endif
+override_dh_auto_configure:
+ dh_auto_configure -- --exec-prefix=/ --enable-html --without-included-regex
-CFLAGS := $(shell dpkg-buildflags --get CFLAGS)
-CPPFLAGS := $(shell dpkg-buildflags --get CPPFLAGS)
-LDFLAGS := $(shell dpkg-buildflags --get LDFLAGS)
+override_dh_shlibdeps:
+ dh_shlibdeps -- -dPre-Depends
-BUILD_DATE := $(shell dpkg-parsechangelog | sed -n -e 's/^Date: //p')
-
-INSTALL = install
-INSTALL_FILE = $(INSTALL) -p -o root -g root -m 644
-INSTALL_PROGRAM = $(INSTALL) -p -o root -g root -m 755
-INSTALL_SCRIPT = $(INSTALL) -p -o root -g root -m 755
-INSTALL_DIR = $(INSTALL) -p -d -o root -g root -m 755
-
-ifeq ($(DEB_BUILD_GNU_TYPE),$(DEB_HOST_GNU_TYPE))
-STRIP := strip
-else
-STRIP := $(DEB_HOST_GNU_TYPE)-strip
-endif
-
-ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
-INSTALL_PROGRAM += -s
-ifneq (strip,$(STRIP))
-INSTALL_PROGRAM += --strip-program=$(STRIP)
-endif
-endif
-
-build: build-arch build-indep
-build-indep:
-
-build-arch: Makefile
- $(MAKE) INSTALL_PROGRAM="$(INSTALL_PROGRAM)"
-ifeq ($(DEB_BUILD_GNU_TYPE),$(DEB_HOST_GNU_TYPE))
-ifeq (,$(findstring nocheck,$(DEB_BUILD_OPTIONS)))
- LC_ALL=C $(MAKE) check
-endif
-endif
- touch build-arch
-
-clean:
- rm -f debian/substvars debian/files build-arch config.log config.cache
- rm -f build-aux/config.guess build-aux/config.sub
- rm -rf $(tmpdir) autom4te.cache
- find . -type f -a \( -name \#\*\# -o -name .\*\~ -o -name \*\~ -o -name DEADJOE -o -name \*.orig -o -name \*.rej -o -name \*.bak -o -name .\*.orig -o -name .\*.rej -o -name .SUMS -o -name TAGS -o -name core -o \( -path \*/.deps/\* -a -name \*.P \) \) -exec rm -f {} \;
- test ! -f Makefile || $(MAKE) distclean
-
-Makefile: Makefile.in
- cp -a /usr/share/misc/config.guess /usr/share/misc/config.sub \
- build-aux/
- ./configure --prefix=/usr \
- --exec-prefix=/ \
- --datadir=/usr/share \
- --mandir=/usr/share/man \
- --infodir=/usr/share/info \
- --enable-html \
- --without-included-regex \
- CFLAGS="$(CFLAGS)" \
- CPPFLAGS="$(CPPFLAGS)" \
- LDFLAGS="$(LDFLAGS)" \
- $(CONFARGS)
-
-
-binary: binary-indep binary-arch
-
-binary-indep:
-
-binary-arch: build checkroot
- -rm -rf $(tmpdir) debian/files debian/substvars
- install -d -o root -g root -m 755 $(tmpdir)$(docdir)/examples
-
-# Install sed
- $(MAKE) DESTDIR=$(tmpdir) install
-ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
- $(STRIP) --remove-section=.comment --remove-section=.note \
- --strip-unneeded $(tmpdir)/bin/sed
-endif
- rm -f $(tmpdir)/usr/share/info/dir*
- gzip -9n $(tmpdir)/usr/share/man/man1/*
- gzip -9n $(tmpdir)/usr/share/info/sed.info*
-
-# Install some documentation
- install -p -o root -g root -m 644 AUTHORS BUGS README THANKS \
- NEWS $(tmpdir)$(docdir)
- install -p -o root -g root -m 644 ChangeLog $(tmpdir)$(docdir)/changelog
- install -p -o root -g root -m 644 debian/changelog \
- $(tmpdir)$(docdir)/changelog.Debian
- install -p -o root -g root -m 644 debian/my/sedfaq.txt $(tmpdir)$(docdir)
- # We expect an error here for the examples-subdir
- -gzip -9n $(tmpdir)$(docdir)/*
- install -p -o root -g root -m 644 debian/copyright $(tmpdir)$(docdir)
- install -p -o root -g root -m 644 testsuite/dc.sed $(tmpdir)$(docdir)/examples/
-
-# Install Debian-specific stuff
- install -d -o root -g root -m 755 $(tmpdir)/DEBIAN
-
- cd $(tmpdir) && find * -type f ! -regex '^DEBIAN/.*' -print0 | LC_ALL=C sort -z | xargs -r0 md5sum > DEBIAN/md5sums
-
-# Build the package
- find $(tmpdir) ! -type l -print0 | xargs -0r chmod go=rX,u+rw,a-s
-
- dpkg-shlibdeps -dPre-Depends $(tmpdir)/bin/sed
- dpkg-gencontrol
- find $(tmpdir) -depth -newermt '$(BUILD_DATE)' -print0 | \
- xargs -0r touch --no-dereference --date='$(BUILD_DATE)'
- dpkg --build $(tmpdir) ..
-
-checkroot:
- test root = "`whoami`"
-
-
-.PHONY: checkroot binary build build-indep
+override_dh_auto_clean:
+ test ! -f Makefile || dh_auto_clean
diff --git a/debian/sed.docs b/debian/sed.docs
new file mode 100644
index 0000000..cd103bf
--- /dev/null
+++ b/debian/sed.docs
@@ -0,0 +1,6 @@
+AUTHORS
+BUGS
+README
+THANKS
+NEWS
+debian/my/sedfaq.txt
diff --git a/debian/sed.examples b/debian/sed.examples
new file mode 100644
index 0000000..2a8ff53
--- /dev/null
+++ b/debian/sed.examples
@@ -0,0 +1 @@
+testsuite/dc.sed