Refresh packaging and use new debhelper style
authorMichael Prokop <mika@grml.org>
Fri, 7 May 2021 14:44:32 +0000 (16:44 +0200)
committerMichael Prokop <mika@grml.org>
Fri, 7 May 2021 15:17:29 +0000 (17:17 +0200)
* Bump Standards-Version to 4.5.1
* Add debian/source/format, marking package as 3.0 (native)
* Refresh debian/grml-autoconfig.lintian-overrides, also
  clarify the overrides

debian/control
debian/grml-autoconfig.dirs [new file with mode: 0644]
debian/grml-autoconfig.docs [new file with mode: 0644]
debian/grml-autoconfig.install
debian/grml-autoconfig.links [new file with mode: 0644]
debian/grml-autoconfig.lintian-overrides [new file with mode: 0644]
debian/grml-autoconfig.manpages [new file with mode: 0644]
debian/overrides [deleted file]
debian/rules
debian/source/format [new file with mode: 0644]

index 2f90ae6..6726934 100644 (file)
@@ -3,7 +3,7 @@ Section: grml
 Priority: optional
 Maintainer: Michael Prokop <mika@grml.org>
 Build-Depends: debhelper (>= 10~)
-Standards-Version: 4.3.0
+Standards-Version: 4.5.1
 Build-Depends-Indep: asciidoc,
                      docbook-xsl,
                      xsltproc,
diff --git a/debian/grml-autoconfig.dirs b/debian/grml-autoconfig.dirs
new file mode 100644 (file)
index 0000000..e909d4a
--- /dev/null
@@ -0,0 +1,5 @@
+etc/grml
+etc/init.d
+usr/bin
+usr/sbin
+usr/share/doc/grml-saveconfig
diff --git a/debian/grml-autoconfig.docs b/debian/grml-autoconfig.docs
new file mode 100644 (file)
index 0000000..a9b9955
--- /dev/null
@@ -0,0 +1,4 @@
+doc/grml-autoconfig.1.html
+doc/grml-autoconfig.8.html
+doc/restore-config.1.html
+doc/save-config.1.html
index 1676ff5..4f452b4 100644 (file)
@@ -1 +1,10 @@
+autoconfig           /etc/grml/
+autoconfig.functions /etc/grml/
+autoconfig.local     /etc/grml/
+bin/restore-config /usr/bin/
+bin/save-config /usr/bin/
+etc/* /etc/
+grml-autoconfig      /etc/init.d/
+language-functions   /etc/grml/
+sbin/grml-autoconfig /usr/sbin/
 systemd/* lib/systemd/system/
diff --git a/debian/grml-autoconfig.links b/debian/grml-autoconfig.links
new file mode 100644 (file)
index 0000000..959e857
--- /dev/null
@@ -0,0 +1 @@
+/usr/share/doc/grml-autoconfig/grml-autoconfig.1.html /usr/share/doc/grml-saveconfig/grml-config.html
diff --git a/debian/grml-autoconfig.lintian-overrides b/debian/grml-autoconfig.lintian-overrides
new file mode 100644 (file)
index 0000000..17a6cec
--- /dev/null
@@ -0,0 +1,9 @@
+# grml specific packaging
+grml-autoconfig: unknown-section grml
+grml-autoconfig: bugs-field-does-not-refer-to-debian-infrastructure mailto:bugs@grml.org
+# we have our custom look'n'feel
+grml-autoconfig: init.d-script-does-not-source-init-functions etc/init.d/grml-autoconfig
+# we have our custom target
+grml-autoconfig: systemd-service-file-refers-to-unusual-wantedby-target lib/systemd/system/grml-autoconfig.service grml-boot.target
+# we have no better way yet
+grml-autoconfig: systemd-service-file-wraps-init-script lib/systemd/system/grml-autoconfig.service ExecStart
diff --git a/debian/grml-autoconfig.manpages b/debian/grml-autoconfig.manpages
new file mode 100644 (file)
index 0000000..eb6c3bc
--- /dev/null
@@ -0,0 +1,4 @@
+doc/grml-autoconfig.1.gz
+doc/grml-autoconfig.8.gz
+doc/restore-config.1.gz
+doc/save-config.1.gz
diff --git a/debian/overrides b/debian/overrides
deleted file mode 100644 (file)
index 85bb9a9..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-grml-autoconfig: unknown-section grml
-grml-autoconfig: script-in-etc-init.d-not-registered-via-update-rc.d /etc/init.d/grml-autoconfig.strace
index 1e38b6e..b332450 100755 (executable)
@@ -9,70 +9,15 @@
 # Uncomment this to turn on verbose mode.
 #export DH_VERBOSE=1
 
-build: build-stamp
+%:
+       dh $@
 
-build-stamp:
-       dh_testdir
-       # tests against shunit2 2.1.6-1 fail in unstable envs as of 2019-03-21
-       # (cd tests && ./run_tests.sh)
-       (cd doc && $(MAKE))
-
-       touch build-stamp
-
-clean:
-       dh_testdir
-       dh_testroot
-       rm -f build-stamp
-       cd doc && $(MAKE) clean && cd ..
-
-       dh_clean
-
-install: build
-       dh_testdir
-       dh_testroot
-       dh_clean -k
-       dh_installdirs etc/grml etc/init.d usr/sbin usr/bin usr/share/doc/grml-saveconfig
-
-       # Add here commands to install the package into debian/grml-autoconfig.
-       install -m 755 grml-autoconfig      debian/grml-autoconfig/etc/init.d/grml-autoconfig
-       install -m 644 autoconfig           debian/grml-autoconfig/etc/grml/autoconfig
-       install -m 644 autoconfig.local     debian/grml-autoconfig/etc/grml/autoconfig.local
-       install -m 755 autoconfig.functions debian/grml-autoconfig/etc/grml/autoconfig.functions
-       install -m 644 language-functions   debian/grml-autoconfig/etc/grml/language-functions
-       install -m 755 sbin/grml-autoconfig debian/grml-autoconfig/usr/sbin/grml-autoconfig
+# tests against shunit2 2.1.6-1 fail in unstable envs since 2019-03-21 :-/
+#ifeq (,$(findstring nocheck,$(DEB_BUILD_OPTIONS)))
+#override_dh_auto_test:
+#      (cd tests && ./run_tests.sh)
+#      make shellcheck
+#endif
 
-       install -m 755 bin/restore-config debian/grml-autoconfig/usr/bin/restore-config
-       install -m 755 bin/save-config debian/grml-autoconfig/usr/bin/save-config
-
-       # just as a "backup" solution:
-       cp -a etc/* debian/grml-autoconfig/etc/
-
-# Build architecture-dependent files here.
-binary-arch: build install
-# We have nothing to do by default.
-
-# Build architecture-independent files here.
-binary-indep: build install
-       dh_testdir
-       dh_testroot
-       dh_install
-       dh_installchangelogs
-       dh_installdocs doc/grml-autoconfig.1.html doc/grml-autoconfig.8.html \
-                       doc/restore-config.1.html doc/save-config.1.html
-       dh_installman doc/grml-autoconfig.1.gz doc/grml-autoconfig.8.gz \
-                       doc/restore-config.1.gz doc/save-config.1.gz
-       # backward compability:
-       dh_link /usr/share/doc/grml-autoconfig/grml-autoconfig.1.html /usr/share/doc/grml-saveconfig/grml-config.html
-       dh_strip
-       dh_compress
-       mkdir -p $(CURDIR)/debian/grml-autoconfig/usr/share/lintian/overrides/
-       cp -av debian/overrides $(CURDIR)/debian/grml-autoconfig/usr/share/lintian/overrides/grml-autoconfig
-       dh_fixperms
-       dh_installdeb
-       dh_shlibdeps
-       dh_gencontrol
-       dh_md5sums
-       dh_builddeb
-
-binary: binary-indep binary-arch
-.PHONY: build clean binary-indep binary-arch binary install
+override_dh_auto_build:
+       (cd doc && $(MAKE))
diff --git a/debian/source/format b/debian/source/format
new file mode 100644 (file)
index 0000000..89ae9db
--- /dev/null
@@ -0,0 +1 @@
+3.0 (native)