From a0698b1be588a44c42115dc65fa385a7d12391e5 Mon Sep 17 00:00:00 2001 From: Didier Raboud Date: Fri, 17 Feb 2012 09:56:34 +0100 Subject: [PATCH] Reduce debian/rules using tiny dh7 style. - Bump debhelper B-D to >= 7.0.50~ - Rename all implicit debian/* files to package-specific names. Signed-off-by: Didier Raboud --- debian/control | 2 +- debian/lsb-base.install | 1 + debian/{config => lsb-core.config} | 0 debian/{dirs => lsb-core.dirs} | 0 debian/lsb-core.examples | 1 + debian/lsb-core.install | 4 + debian/{postinst => lsb-core.postinst} | 0 debian/{prerm => lsb-core.prerm} | 0 debian/{templates => lsb-core.templates} | 0 ...lease.bugscript => lsb-release.bug-script} | 0 debian/lsb-release.install | 2 + debian/po/POTFILES.in | 2 +- debian/rules | 119 +----------------- 13 files changed, 16 insertions(+), 115 deletions(-) create mode 100644 debian/lsb-base.install rename debian/{config => lsb-core.config} (100%) rename debian/{dirs => lsb-core.dirs} (100%) create mode 100644 debian/lsb-core.examples create mode 100644 debian/lsb-core.install rename debian/{postinst => lsb-core.postinst} (100%) rename debian/{prerm => lsb-core.prerm} (100%) rename debian/{templates => lsb-core.templates} (100%) rename debian/{lsb-release.bugscript => lsb-release.bug-script} (100%) create mode 100644 debian/lsb-release.install diff --git a/debian/control b/debian/control index 07023b5..9e02184 100644 --- a/debian/control +++ b/debian/control @@ -3,7 +3,7 @@ Section: misc Priority: extra Maintainer: Debian LSB Team Uploaders: Didier Raboud -Build-Depends: debhelper (>> 7), +Build-Depends: debhelper (>> 7.0.50~), po-debconf (>= 0.5.0), dpkg-dev (>= 1.10), python-support, python-all-dev diff --git a/debian/lsb-base.install b/debian/lsb-base.install new file mode 100644 index 0000000..a9b214a --- /dev/null +++ b/debian/lsb-base.install @@ -0,0 +1 @@ +init-functions /lib/lsb diff --git a/debian/config b/debian/lsb-core.config similarity index 100% rename from debian/config rename to debian/lsb-core.config diff --git a/debian/dirs b/debian/lsb-core.dirs similarity index 100% rename from debian/dirs rename to debian/lsb-core.dirs diff --git a/debian/lsb-core.examples b/debian/lsb-core.examples new file mode 100644 index 0000000..3ef7215 --- /dev/null +++ b/debian/lsb-core.examples @@ -0,0 +1 @@ +test/init-skeleton diff --git a/debian/lsb-core.install b/debian/lsb-core.install new file mode 100644 index 0000000..eaee1e9 --- /dev/null +++ b/debian/lsb-core.install @@ -0,0 +1,4 @@ +initdutils.py /usr/lib/lsb +install_initd /usr/lib/lsb +remove_initd /usr/lib/lsb +lsbinstall /usr/lib/lsb diff --git a/debian/postinst b/debian/lsb-core.postinst similarity index 100% rename from debian/postinst rename to debian/lsb-core.postinst diff --git a/debian/prerm b/debian/lsb-core.prerm similarity index 100% rename from debian/prerm rename to debian/lsb-core.prerm diff --git a/debian/templates b/debian/lsb-core.templates similarity index 100% rename from debian/templates rename to debian/lsb-core.templates diff --git a/debian/lsb-release.bugscript b/debian/lsb-release.bug-script similarity index 100% rename from debian/lsb-release.bugscript rename to debian/lsb-release.bug-script diff --git a/debian/lsb-release.install b/debian/lsb-release.install new file mode 100644 index 0000000..b28783d --- /dev/null +++ b/debian/lsb-release.install @@ -0,0 +1,2 @@ +lsb_release /usr/bin +lsb_release.py /usr/share/python-support/lsb-release diff --git a/debian/po/POTFILES.in b/debian/po/POTFILES.in index cef83a3..6370349 100644 --- a/debian/po/POTFILES.in +++ b/debian/po/POTFILES.in @@ -1 +1 @@ -[type: gettext/rfc822deb] templates +[type: gettext/rfc822deb] lsb-core.templates diff --git a/debian/rules b/debian/rules index 257144e..47ea9ec 100755 --- a/debian/rules +++ b/debian/rules @@ -1,9 +1,7 @@ #!/usr/bin/make -f -# Sample debian/rules that uses debhelper. -# GNU copyright 1997 to 1999 by Joey Hess. -# Uncomment this to turn on verbose mode. -#export DH_VERBOSE=1 +%: + dh $@ # These are used for cross-compiling and for saving the configure script # from having to guess our platform (since we know it already) @@ -11,13 +9,6 @@ DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) DEB_HOST_ARCH ?= $(shell dpkg-architecture -qDEB_HOST_ARCH) -ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS))) - CFLAGS += -g -endif -ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS))) - INSTALL_PROGRAM += -s -endif - # Map Debian architectures to LSB architectures lsbarch=${DEB_HOST_ARCH} ifeq (${lsbarch}, i386) @@ -47,95 +38,11 @@ ifeq (${lsbarch}, alpha) LIBC=libc6.1 (>> 2.3.5) endif -configure: configure-stamp -configure-stamp: - dh_testdir - # Add here commands to configure the package. - - touch configure-stamp - -build: build-stamp - -build-stamp: configure-stamp - dh_testdir - - # Add here commands to compile the package. - #$(MAKE) - #/usr/bin/docbook-to-man debian/lsb.sgml > lsb.1 - - touch build-stamp - -clean: - dh_testdir - dh_testroot - rm -f build-stamp configure-stamp *.py[co] debian/lsb*substvars - - # Add here commands to clean up after the build process. - +override_dh_clean: dh_clean + rm -f *.py[co] -install: build - dh_testdir - dh_testroot - dh_prep - dh_installdirs - - # Add here commands to install the package into debian/lsb. - #$(MAKE) install DESTDIR=$(CURDIR)/debian/lsb - cp -p initdutils.py install_initd remove_initd lsbinstall debian/lsb-core/usr/lib/lsb - cp -p init-functions debian/lsb-base/lib/lsb - cp -p lsb_release debian/lsb-release/usr/bin - cp -p lsb_release.py debian/lsb-release/usr/share/python-support/lsb-release - cp -p debian/lsb-release.bugscript debian/lsb-release/usr/share/bug/lsb-release - -# Build architecture-independent files here. -binary-indep: build install - dh_testdir - dh_testroot - dh_installdebconf -i - dh_installdocs -i -# dh_installlogrotate -# dh_installemacsen -# dh_installpam -# dh_installmime -# dh_installinit - dh_installcron -i - dh_installman -i - dh_installinfo -i -# dh_undocumented - dh_installchangelogs -i - dh_link -i - dh_strip -i - dh_compress -i - dh_fixperms -i -# dh_makeshlibs -# dh_perl - dh_pysupport -i -# dh_python - dh_installdeb -i - dh_shlibdeps -i - dh_gencontrol -i - dh_md5sums -i - dh_builddeb -i - -# Build architecture-dependent files here. -binary-arch: build install - dh_testdir - dh_testroot - dh_installdebconf -a - dh_installdocs -a - dh_installexamples -a test/init-skeleton - dh_installmenu -a -# dh_installlogrotate -# dh_installemacsen -# dh_installpam -# dh_installmime -# dh_installinit - dh_installcron -a - dh_installman -a - dh_installinfo -a -# dh_undocumented - dh_installchangelogs -a +override_dh_gencontrol: @echo >> debian/lsb-core.substvars "glibc=${LIBC}" # @[ ${DEB_HOST_GNU_TYPE} != 'arm-linux-gnueabi' ] && echo >> debian/lsb-cxx.substvars "depends=libstdc++5" || true @echo >> debian/lsb-core.substvars "provides=lsb-core-${lsbarch}" @@ -148,18 +55,4 @@ binary-arch: build install @echo >> debian/lsb-printing.substvars "provides=lsb-printing-${lsbarch}" @[ ${DEB_HOST_ARCH} = 'amd64' ] && echo >> debian/lsb-core.substvars "depends=libc6-i386, lib32z1" || true @[ ${DEB_HOST_ARCH} = 'kfreebsd-amd64' ] && echo >> debian/lsb-core.substvars "depends=libc0.1-i386, lib32z1" || true - dh_link -a - dh_strip -a - dh_compress -a - dh_fixperms -a - dh_pysupport -a -# dh_makeshlibs - dh_installdeb -a -# dh_perl - dh_shlibdeps -a - dh_gencontrol -a - dh_md5sums -a - dh_builddeb -a - -binary: binary-indep binary-arch -.PHONY: build clean binary-indep binary-arch binary install configure + dh_gencontrol -- 2.30.2