From 2dc91c9441d64410ab781d56aff22f64d3024a38 Mon Sep 17 00:00:00 2001 From: Rhonda D'Vine Date: Tue, 12 Apr 2016 14:09:11 +0200 Subject: [PATCH] Convert to dh style rules file --- debian/beep-udeb.dirs | 1 + debian/beep.dirs | 2 + debian/changelog | 1 + debian/compat | 1 + debian/control | 7 ++- debian/docs | 2 + debian/rules | 129 ++++++------------------------------------ 7 files changed, 27 insertions(+), 116 deletions(-) create mode 100644 debian/beep-udeb.dirs create mode 100644 debian/beep.dirs create mode 100644 debian/compat create mode 100644 debian/docs diff --git a/debian/beep-udeb.dirs b/debian/beep-udeb.dirs new file mode 100644 index 0000000..e772481 --- /dev/null +++ b/debian/beep-udeb.dirs @@ -0,0 +1 @@ +usr/bin diff --git a/debian/beep.dirs b/debian/beep.dirs new file mode 100644 index 0000000..98d1583 --- /dev/null +++ b/debian/beep.dirs @@ -0,0 +1,2 @@ +usr/bin +usr/share/man/man1 diff --git a/debian/changelog b/debian/changelog index 96bc695..b3187fb 100644 --- a/debian/changelog +++ b/debian/changelog @@ -3,6 +3,7 @@ beep (1.3-4) unstable; urgency=low * Update my name. * Bump Standards-Version to 3.9.6. * Switch to source format 3.0 (quilt). + * Convert to dh style rules file. * New patch fix-makefile to make make clean not fail. * Add #DEBHELPER# to post{inst,rm} files. * Use pathfind() function instead of hardcoded path to dpkg-statoverride. 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 730a7e5..4bdf952 100644 --- a/debian/control +++ b/debian/control @@ -2,7 +2,7 @@ Source: beep Section: sound Priority: optional Maintainer: Rhonda D'Vine -Build-Depends: po-debconf, patch, quilt +Build-Depends: debhelper (>= 9~), po-debconf, patch Standards-Version: 3.9.6 Homepage: http://johnath.com/beep/ Vcs-Browser: http://git.deb.at/w/pkg/beep.git @@ -10,7 +10,7 @@ Vcs-Git: git://git.deb.at/pkg/beep.git Package: beep Architecture: any -Depends: ${shlibs:Depends}, debconf (>= 0.5) | debconf-2.0 +Depends: ${shlibs:Depends}, ${misc:Depends}, debconf (>= 0.5) | debconf-2.0 Description: advanced pc-speaker beeper beep does what you'd expect: it beeps. But unlike printf "\a" beep allows you to control pitch, duration, and repetitions. Its job is to live inside @@ -20,9 +20,10 @@ Description: advanced pc-speaker beeper gets hacked into) much more informative. Package: beep-udeb +Package-Type: udeb Architecture: any Section: debian-installer -Depends: ${shlibs:Depends} +Depends: ${shlibs:Depends}, ${misc:Depends} Description: advanced pc-speaker beeper - minimal package beep does what you'd expect: it beeps. However, it offers various additional features, such as the ability to control pitch, duration, diff --git a/debian/docs b/debian/docs new file mode 100644 index 0000000..94a0111 --- /dev/null +++ b/debian/docs @@ -0,0 +1,2 @@ +CREDITS +README diff --git a/debian/rules b/debian/rules index 4ff16bb..48c55d4 100755 --- a/debian/rules +++ b/debian/rules @@ -1,114 +1,17 @@ #!/usr/bin/make -f -# debian/rules file for beep -# copyright 2002-2011 by Rhonda D'Vine -# Licenced under WTFPLv2 - -PKG1 = beep -TMP1 = $(CURDIR)/debian/$(PKG1) -PKG2 = beep-udeb -TMP2 = $(CURDIR)/debian/$(PKG2) - -VERSION = $(shell dpkg-parsechangelog | grep "^Version:" | cut -d" " -f 2) -ARCH = $(shell dpkg-architecture -qDEB_HOST_ARCH) - -FLAGS = -g -Wall -INSTALL = install -INSTALL_FILE = $(INSTALL) -p -oroot -groot -m644 -INSTALL_PROGRAM = $(INSTALL) -p -oroot -groot -m755 -INSTALL_SCRIPT = $(INSTALL) -p -oroot -groot -m755 -INSTALL_DIR = $(INSTALL) -p -d -oroot -groot -m755 - -ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) - FLAGS += -O0 -else - FLAGS += -O2 -endif -ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS))) - INSTALL_PROGRAM += -s - STRIP = true -endif - - -include /usr/share/quilt/quilt.make - -clean: unpatch - $(checkdir) - $(checkroot) - -rm -rf $(TMP1) $(TMP2) debian/$(PKG1).substvars debian/$(PKG2).substvars debian/files build-stamp - [ ! -f beep ] || $(MAKE) clean - - -build: build-arch -build-arch: build-stamp -build-indep: -build-stamp: patch - $(checkdir) - $(MAKE) FLAGS="$(FLAGS)" - touch build-stamp - - -install: build - $(checkdir) - $(checkroot) - -rm -rf $(TMP1) $(TMP2) debian/$(PKG1).substvars debian/$(PKG2).substvars - $(INSTALL_DIR) $(TMP1) - cd $(TMP1) && $(INSTALL_DIR) usr/bin usr/share/man/man1 \ - usr/share/doc/$(PKG1) - $(INSTALL_PROGRAM) beep $(TMP1)/usr/bin - $(INSTALL_FILE) beep.1.gz $(TMP1)/usr/share/man/man1 - gunzip $(TMP1)/usr/share/man/man1/beep.1.gz - cd $(TMP1)/usr/share/man/man1 && patch beep.1 $(TMP1)/../beep.1.diff - -rm -f $(TMP1)/usr/share/man/man1/beep.1.orig - gzip --best $(TMP1)/usr/share/man/man1/beep.1 - chown root:audio $(TMP1)/usr/bin/beep - $(INSTALL_FILE) CREDITS README $(TMP1)/usr/share/doc/$(PKG1) - $(INSTALL_FILE) CHANGELOG $(TMP1)/usr/share/doc/$(PKG1)/changelog - cd $(TMP1)/usr/share/doc/$(PKG1) && gzip -9 changelog README - $(INSTALL_DIR) $(TMP2)/usr/bin - $(INSTALL_PROGRAM) beep $(TMP2)/usr/bin - test "$(STRIP)" != true || strip \ - --remove-section=.comment --remove-section=.note \ - $(TMP1)/usr/bin/beep $(TMP2)/usr/bin/beep - - -# Build architecture-independent files here. -binary-indep: build -# We have nothing to do by default. - - -binary-arch: build install - $(checkdir) - $(checkroot) - $(INSTALL_DIR) $(TMP1)/DEBIAN $(TMP2)/DEBIAN - $(INSTALL_FILE) debian/README.Debian debian/copyright \ - $(TMP1)/usr/share/doc/$(PKG1) - $(INSTALL_FILE) debian/changelog \ - $(TMP1)/usr/share/doc/$(PKG1)/changelog.Debian - gzip -9 $(TMP1)/usr/share/doc/$(PKG1)/changelog.Debian - $(INSTALL_SCRIPT) debian/postinst debian/postrm debian/config \ - $(TMP1)/DEBIAN - po2debconf debian/templates > $(TMP1)/DEBIAN/templates - dpkg-shlibdeps -Tdebian/$(PKG1).substvars -dDepends $(TMP1)/usr/bin/beep - dpkg-gencontrol -ldebian/changelog -isp -Tdebian/$(PKG1).substvars -p$(PKG1) \ - -P$(TMP1) - cd $(TMP1) && find * -type f ! -regex '^DEBIAN/.*' -print0 | \ - xargs -r0 md5sum > DEBIAN/md5sums - dpkg --build $(TMP1) .. - dpkg-shlibdeps -Tdebian/$(PKG2).substvars -dDepends -tudeb \ - $(TMP2)/usr/bin/beep - dpkg-gencontrol -ldebian/changelog -isp -Tdebian/$(PKG2).substvars -p$(PKG2) \ - -P$(TMP2) -UHomepage -n$(PKG2)_$(VERSION)_$(ARCH).udeb - dpkg --build $(TMP2) ../$(PKG2)_$(VERSION)_$(ARCH).udeb - - -binary: binary-arch - -define checkdir - test -f debian/rules -endef - -define checkroot - test root = "`whoami`" -endef - -.PHONY: clean build install binary-arch binary +#DH_VERBOSE = 1 + +%: + dh $@ + +override_dh_auto_build: + dh_auto_build -- FLAGS="$(shell dpkg-buildflags --get CFLAGS)" + +override_dh_auto_install: + cp beep debian/beep/usr/bin + cp beep debian/beep-udeb/usr/bin + cp beep.1.gz debian/beep/usr/share/man/man1 + gunzip debian/beep/usr/share/man/man1/beep.1.gz + cd debian/beep/usr/share/man/man1 && patch beep.1 ../../../../../beep.1.diff + -rm -f debian/beep/usr/share/man/man1/beep.1.orig + chown root:audio debian/beep/usr/bin/beep -- 2.39.2