From 1a42a93b11c48e696446250f2a1f1ca71b350e9b Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Tue, 14 May 2024 22:15:44 +0200 Subject: Adding upstream version 13.3.4. Signed-off-by: Daniel Baumann --- .dir-locals.el | 7 + .gitlab-ci.yml | 31 + CONTRIBUTING.md | 194 + GPL | 340 + Makefile | 140 + autoscripts/maintscript-helper | 1 + autoscripts/postinst-alternatives | 3 + autoscripts/postinst-emacsen | 5 + autoscripts/postinst-icons | 5 + autoscripts/postinst-init | 6 + autoscripts/postinst-init-nostart | 5 + autoscripts/postinst-init-restart | 11 + autoscripts/postinst-init-tmpfiles | 7 + autoscripts/postinst-menu | 3 + autoscripts/postinst-menu-method | 7 + autoscripts/postinst-modules | 5 + autoscripts/postinst-systemd-dont-enable | 15 + autoscripts/postinst-systemd-enable | 15 + autoscripts/postinst-systemd-restart | 11 + autoscripts/postinst-systemd-restartnostart | 8 + autoscripts/postinst-systemd-start | 6 + autoscripts/postinst-systemd-user-dont-enable | 15 + autoscripts/postinst-systemd-user-enable | 15 + autoscripts/postinst-sysusers | 3 + autoscripts/postinst-ucf | 4 + autoscripts/postinst-usrlocal | 29 + autoscripts/postinst-wm | 6 + autoscripts/postinst-wm-noman | 4 + autoscripts/postinst-xfonts | 3 + autoscripts/postrm-debconf | 4 + autoscripts/postrm-icons | 3 + autoscripts/postrm-init | 3 + autoscripts/postrm-menu | 1 + autoscripts/postrm-menu-method | 3 + autoscripts/postrm-modules | 3 + autoscripts/postrm-sgmlcatalog | 3 + autoscripts/postrm-systemd | 12 + autoscripts/postrm-systemd-reload-only | 3 + autoscripts/postrm-systemd-user | 12 + autoscripts/postrm-ucf | 12 + autoscripts/postrm-xfonts | 3 + autoscripts/preinst-emacsen | 5 + autoscripts/prerm-alternatives | 3 + autoscripts/prerm-emacsen | 3 + autoscripts/prerm-init | 3 + autoscripts/prerm-init-norestart | 3 + autoscripts/prerm-systemd | 3 + autoscripts/prerm-systemd-restart | 3 + autoscripts/prerm-usrlocal | 7 + autoscripts/prerm-wm | 3 + debhelper-obsolete-compat.pod | 128 + debhelper.pod | 1637 +++ dh | 743 + dh_auto_build | 63 + dh_auto_clean | 65 + dh_auto_configure | 68 + dh_auto_install | 107 + dh_auto_test | 74 + dh_bugfiles | 145 + dh_builddeb | 192 + dh_clean | 199 + dh_compress | 252 + dh_dwz | 171 + dh_fixperms | 174 + dh_gconf | 116 + dh_gencontrol | 218 + dh_icons | 87 + dh_install | 387 + dh_installalternatives | 181 + dh_installcatalogs | 138 + dh_installchangelogs | 310 + dh_installcron | 88 + dh_installdeb | 422 + dh_installdebconf | 138 + dh_installdirs | 141 + dh_installdocs | 464 + dh_installemacsen | 149 + dh_installexamples | 188 + dh_installgsettings | 106 + dh_installifupdown | 82 + dh_installinfo | 133 + dh_installinit | 444 + dh_installinitramfs | 103 + dh_installlogcheck | 91 + dh_installlogrotate | 63 + dh_installman | 427 + dh_installmanpages | 208 + dh_installmenu | 100 + dh_installmime | 73 + dh_installmodules | 119 + dh_installpam | 72 + dh_installppp | 78 + dh_installsystemd | 453 + dh_installsystemduser | 268 + dh_installsysusers | 110 + dh_installtmpfiles | 126 + dh_installudev | 112 + dh_installwm | 142 + dh_installxfonts | 100 + dh_link | 176 + dh_lintian | 72 + dh_listpackages | 44 + dh_makeshlibs | 466 + dh_md5sums | 128 + dh_missing | 271 + dh_movefiles | 171 + dh_perl | 184 + dh_prep | 80 + dh_shlibdeps | 214 + dh_strip | 445 + dh_systemd_enable | 289 + dh_systemd_start | 288 + dh_testdir | 72 + dh_testroot | 103 + dh_ucf | 111 + dh_update_autotools_config | 82 + dh_usrlocal | 146 + doc/PROGRAMMING | 598 + doc/README | 1 + doc/SUPPORT-POLICY | 20 + doc/TODO | 24 + examples/rules.tiny | 3 + lib/Debian/Debhelper/Buildsystem.pm | 605 + lib/Debian/Debhelper/Buildsystem/ant.pm | 52 + lib/Debian/Debhelper/Buildsystem/autoconf.pm | 92 + lib/Debian/Debhelper/Buildsystem/cmake.pm | 178 + lib/Debian/Debhelper/Buildsystem/makefile.pm | 198 + lib/Debian/Debhelper/Buildsystem/meson.pm | 139 + lib/Debian/Debhelper/Buildsystem/ninja.pm | 90 + lib/Debian/Debhelper/Buildsystem/perl_build.pm | 97 + lib/Debian/Debhelper/Buildsystem/perl_makemaker.pm | 104 + .../Debhelper/Buildsystem/python_distutils.pm | 214 + lib/Debian/Debhelper/Buildsystem/qmake.pm | 103 + lib/Debian/Debhelper/Buildsystem/qmake_qt4.pm | 15 + lib/Debian/Debhelper/DH/AddonAPI.pm | 220 + lib/Debian/Debhelper/DH/SequenceState.pm | 31 + lib/Debian/Debhelper/Dh_Buildsystems.pm | 315 + lib/Debian/Debhelper/Dh_Getopt.pm | 333 + lib/Debian/Debhelper/Dh_Lib.pm | 2969 ++++ lib/Debian/Debhelper/Sequence.pm | 131 + lib/Debian/Debhelper/Sequence/build_stamp.pm | 10 + lib/Debian/Debhelper/Sequence/dwz.pm | 14 + lib/Debian/Debhelper/Sequence/elf_tools.pm | 14 + lib/Debian/Debhelper/Sequence/installinitramfs.pm | 14 + lib/Debian/Debhelper/Sequence/python_support.pm | 10 + lib/Debian/Debhelper/Sequence/root_sequence.pm | 114 + lib/Debian/Debhelper/Sequence/systemd.pm | 19 + lib/Debian/Debhelper/SequencerUtil.pm | 836 ++ man/po4a/add.de | 23 + man/po4a/add.fr | 17 + man/po4a/add.pt | 10 + man/po4a/add1.es | 8 + man/po4a/add2.es | 8 + man/po4a/add3.es | 8 + man/po4a/po/de.po | 12376 ++++++++++++++++ man/po4a/po/debhelper.pot | 9376 ++++++++++++ man/po4a/po/es.po | 13374 +++++++++++++++++ man/po4a/po/fr.po | 14697 +++++++++++++++++++ man/po4a/po/ja.po | 11924 +++++++++++++++ man/po4a/po/pt.po | 13037 ++++++++++++++++ man/po4a/po4a.cfg | 66 + run | 16 + strings-kept-translations.pod | 12 + t/Dh_Lib/00-use.t | 20 + t/Dh_Lib/control-parsing.t | 36 + t/Dh_Lib/debian/changelog | 5 + t/Dh_Lib/debian/control | 19 + t/Dh_Lib/path.t | 26 + t/Test/DH.pm | 205 + t/buildsystems/01-build-system-basic-api.t | 43 + t/buildsystems/02-make-jobserver-makeflags.t | 57 + t/buildsystems/03-bs-auto-buildable.t | 218 + t/buildsystems/04-dh_auto_do_autoconf.t | 88 + t/buildsystems/05-load-build-system.t | 55 + t/buildsystems/06-buildsystem-mkdir-rmdir.t | 51 + t/buildsystems/autoconf/configure | 84 + t/buildsystems/buildsystem_tests.t | 293 + t/buildsystems/debian/changelog | 5 + t/buildsystems/debian/control | 12 + t/buildsystems/load-bs.pl | 16 + t/buildsystems/parallel.mk | 21 + t/debhelper-compat/debian/control | 12 + t/debhelper-compat/syntax.t | 82 + t/dh-lib.t | 63 + t/dh-sequencer.t | 282 + t/dh_compress.t | 114 + t/dh_install/01-basics.t | 33 + t/dh_install/02-bugs-53XXXX.t | 65 + t/dh_install/03-866570-dont-install-from-host.t | 24 + t/dh_install/04-sourcedir.t | 84 + .../01-868204-ignore-broken-symlinks.t | 30 + t/dh_installdocs/debian/changelog | 5 + t/dh_installdocs/debian/control | 21 + t/dh_installdocs/debian/copyright | 1 + t/dh_installdocs/debian/docfile | 1 + t/dh_installdocs/dh_installdocs.t | 75 + t/dh_installgsettings/debian/changelog | 5 + t/dh_installgsettings/debian/control | 17 + t/dh_installgsettings/dh_installgsettings.t | 49 + t/dh_installinit/debian/bar.other.init | 4 + t/dh_installinit/debian/changelog | 5 + t/dh_installinit/debian/control | 20 + t/dh_installinit/debian/foo.service | 5 + t/dh_installinit/dh_installinit.t | 44 + t/dh_installman/01-basics.t | 71 + t/dh_installman/manpage-compressed.pod | 17 + t/dh_installman/manpage-uncompressed.pod | 17 + t/dh_installsystemd/debian/changelog | 5 + t/dh_installsystemd/debian/control | 20 + t/dh_installsystemd/debian/foo.init | 4 + t/dh_installsystemd/debian/foo.service | 8 + t/dh_installsystemd/debian/foo2.service | 8 + t/dh_installsystemd/dh_installsystemd.t | 232 + t/dh_installsystemd/dh_installsystemd_tmpfiles.t | 87 + t/dh_installsystemd/dh_systemd.t | 127 + t/dh_installsystemd/simple/debian/changelog | 5 + t/dh_installsystemd/simple/debian/control | 10 + t/dh_installsystemd/simple/debian/foo.service | 8 + t/dh_installsystemduser/debian/baz.user.service | 8 + t/dh_installsystemduser/debian/changelog | 5 + t/dh_installsystemduser/debian/control | 10 + t/dh_installsystemduser/debian/foo.user.service | 8 + t/dh_installsystemduser/dh_installsystemduser.t | 75 + t/dh_link/01-basic.t | 50 + t/dh_link/02-346405.t | 29 + t/dh_link/03-894229.t | 55 + t/dh_missing/01-no-missing.t | 28 + t/dh_missing/02-fail-on-missing.t | 33 + t/dh_missing/03-dh_install-redirection.t | 30 + t/dh_missing/04-not-installed-glob.t | 37 + t/dh_missing/template/Makefile | 7 + t/dh_missing/template/debian/changelog | 5 + t/dh_missing/template/debian/control | 20 + t/dh_missing/template/debian/foo.install | 1 + t/dh_missing/template/file-for-foo | 1 + t/dh_usrlocal/01-basic.t | 157 + t/maintscript.t | 70 + t/override_target.t | 30 + t/pod.t | 10 + t/size.t | 32 + t/syntax/syntax-libs.t | 1 + t/syntax/syntax-progs.t | 28 + 242 files changed, 100955 insertions(+) create mode 100644 .dir-locals.el create mode 100644 .gitlab-ci.yml create mode 100644 CONTRIBUTING.md create mode 100644 GPL create mode 100644 Makefile create mode 100644 autoscripts/maintscript-helper create mode 100644 autoscripts/postinst-alternatives create mode 100644 autoscripts/postinst-emacsen create mode 100644 autoscripts/postinst-icons create mode 100644 autoscripts/postinst-init create mode 100644 autoscripts/postinst-init-nostart create mode 100644 autoscripts/postinst-init-restart create mode 100644 autoscripts/postinst-init-tmpfiles create mode 100644 autoscripts/postinst-menu create mode 100644 autoscripts/postinst-menu-method create mode 100644 autoscripts/postinst-modules create mode 100644 autoscripts/postinst-systemd-dont-enable create mode 100644 autoscripts/postinst-systemd-enable create mode 100644 autoscripts/postinst-systemd-restart create mode 100644 autoscripts/postinst-systemd-restartnostart create mode 100644 autoscripts/postinst-systemd-start create mode 100644 autoscripts/postinst-systemd-user-dont-enable create mode 100644 autoscripts/postinst-systemd-user-enable create mode 100644 autoscripts/postinst-sysusers create mode 100644 autoscripts/postinst-ucf create mode 100644 autoscripts/postinst-usrlocal create mode 100644 autoscripts/postinst-wm create mode 100644 autoscripts/postinst-wm-noman create mode 100644 autoscripts/postinst-xfonts create mode 100644 autoscripts/postrm-debconf create mode 100644 autoscripts/postrm-icons create mode 100644 autoscripts/postrm-init create mode 100644 autoscripts/postrm-menu create mode 100644 autoscripts/postrm-menu-method create mode 100644 autoscripts/postrm-modules create mode 100644 autoscripts/postrm-sgmlcatalog create mode 100644 autoscripts/postrm-systemd create mode 100644 autoscripts/postrm-systemd-reload-only create mode 100644 autoscripts/postrm-systemd-user create mode 100644 autoscripts/postrm-ucf create mode 100644 autoscripts/postrm-xfonts create mode 100644 autoscripts/preinst-emacsen create mode 100644 autoscripts/prerm-alternatives create mode 100644 autoscripts/prerm-emacsen create mode 100644 autoscripts/prerm-init create mode 100644 autoscripts/prerm-init-norestart create mode 100644 autoscripts/prerm-systemd create mode 100644 autoscripts/prerm-systemd-restart create mode 100644 autoscripts/prerm-usrlocal create mode 100644 autoscripts/prerm-wm create mode 100644 debhelper-obsolete-compat.pod create mode 100644 debhelper.pod create mode 100755 dh create mode 100755 dh_auto_build create mode 100755 dh_auto_clean create mode 100755 dh_auto_configure create mode 100755 dh_auto_install create mode 100755 dh_auto_test create mode 100755 dh_bugfiles create mode 100755 dh_builddeb create mode 100755 dh_clean create mode 100755 dh_compress create mode 100755 dh_dwz create mode 100755 dh_fixperms create mode 100755 dh_gconf create mode 100755 dh_gencontrol create mode 100755 dh_icons create mode 100755 dh_install create mode 100755 dh_installalternatives create mode 100755 dh_installcatalogs create mode 100755 dh_installchangelogs create mode 100755 dh_installcron create mode 100755 dh_installdeb create mode 100755 dh_installdebconf create mode 100755 dh_installdirs create mode 100755 dh_installdocs create mode 100755 dh_installemacsen create mode 100755 dh_installexamples create mode 100755 dh_installgsettings create mode 100755 dh_installifupdown create mode 100755 dh_installinfo create mode 100755 dh_installinit create mode 100755 dh_installinitramfs create mode 100755 dh_installlogcheck create mode 100755 dh_installlogrotate create mode 100755 dh_installman create mode 100755 dh_installmanpages create mode 100755 dh_installmenu create mode 100755 dh_installmime create mode 100755 dh_installmodules create mode 100755 dh_installpam create mode 100755 dh_installppp create mode 100755 dh_installsystemd create mode 100755 dh_installsystemduser create mode 100755 dh_installsysusers create mode 100755 dh_installtmpfiles create mode 100755 dh_installudev create mode 100755 dh_installwm create mode 100755 dh_installxfonts create mode 100755 dh_link create mode 100755 dh_lintian create mode 100755 dh_listpackages create mode 100755 dh_makeshlibs create mode 100755 dh_md5sums create mode 100755 dh_missing create mode 100755 dh_movefiles create mode 100755 dh_perl create mode 100755 dh_prep create mode 100755 dh_shlibdeps create mode 100755 dh_strip create mode 100755 dh_systemd_enable create mode 100755 dh_systemd_start create mode 100755 dh_testdir create mode 100755 dh_testroot create mode 100755 dh_ucf create mode 100755 dh_update_autotools_config create mode 100755 dh_usrlocal create mode 100644 doc/PROGRAMMING create mode 100644 doc/README create mode 100644 doc/SUPPORT-POLICY create mode 100644 doc/TODO create mode 100755 examples/rules.tiny create mode 100644 lib/Debian/Debhelper/Buildsystem.pm create mode 100644 lib/Debian/Debhelper/Buildsystem/ant.pm create mode 100644 lib/Debian/Debhelper/Buildsystem/autoconf.pm create mode 100644 lib/Debian/Debhelper/Buildsystem/cmake.pm create mode 100644 lib/Debian/Debhelper/Buildsystem/makefile.pm create mode 100644 lib/Debian/Debhelper/Buildsystem/meson.pm create mode 100644 lib/Debian/Debhelper/Buildsystem/ninja.pm create mode 100644 lib/Debian/Debhelper/Buildsystem/perl_build.pm create mode 100644 lib/Debian/Debhelper/Buildsystem/perl_makemaker.pm create mode 100644 lib/Debian/Debhelper/Buildsystem/python_distutils.pm create mode 100644 lib/Debian/Debhelper/Buildsystem/qmake.pm create mode 100644 lib/Debian/Debhelper/Buildsystem/qmake_qt4.pm create mode 100644 lib/Debian/Debhelper/DH/AddonAPI.pm create mode 100644 lib/Debian/Debhelper/DH/SequenceState.pm create mode 100644 lib/Debian/Debhelper/Dh_Buildsystems.pm create mode 100644 lib/Debian/Debhelper/Dh_Getopt.pm create mode 100644 lib/Debian/Debhelper/Dh_Lib.pm create mode 100644 lib/Debian/Debhelper/Sequence.pm create mode 100644 lib/Debian/Debhelper/Sequence/build_stamp.pm create mode 100644 lib/Debian/Debhelper/Sequence/dwz.pm create mode 100644 lib/Debian/Debhelper/Sequence/elf_tools.pm create mode 100644 lib/Debian/Debhelper/Sequence/installinitramfs.pm create mode 100644 lib/Debian/Debhelper/Sequence/python_support.pm create mode 100644 lib/Debian/Debhelper/Sequence/root_sequence.pm create mode 100644 lib/Debian/Debhelper/Sequence/systemd.pm create mode 100644 lib/Debian/Debhelper/SequencerUtil.pm create mode 100644 man/po4a/add.de create mode 100644 man/po4a/add.fr create mode 100644 man/po4a/add.pt create mode 100644 man/po4a/add1.es create mode 100644 man/po4a/add2.es create mode 100644 man/po4a/add3.es create mode 100644 man/po4a/po/de.po create mode 100644 man/po4a/po/debhelper.pot create mode 100644 man/po4a/po/es.po create mode 100644 man/po4a/po/fr.po create mode 100644 man/po4a/po/ja.po create mode 100644 man/po4a/po/pt.po create mode 100644 man/po4a/po4a.cfg create mode 100755 run create mode 100644 strings-kept-translations.pod create mode 100755 t/Dh_Lib/00-use.t create mode 100755 t/Dh_Lib/control-parsing.t create mode 100644 t/Dh_Lib/debian/changelog create mode 100644 t/Dh_Lib/debian/control create mode 100755 t/Dh_Lib/path.t create mode 100644 t/Test/DH.pm create mode 100755 t/buildsystems/01-build-system-basic-api.t create mode 100755 t/buildsystems/02-make-jobserver-makeflags.t create mode 100755 t/buildsystems/03-bs-auto-buildable.t create mode 100755 t/buildsystems/04-dh_auto_do_autoconf.t create mode 100755 t/buildsystems/05-load-build-system.t create mode 100755 t/buildsystems/06-buildsystem-mkdir-rmdir.t create mode 100755 t/buildsystems/autoconf/configure create mode 100755 t/buildsystems/buildsystem_tests.t create mode 100644 t/buildsystems/debian/changelog create mode 100644 t/buildsystems/debian/control create mode 100755 t/buildsystems/load-bs.pl create mode 100644 t/buildsystems/parallel.mk create mode 100644 t/debhelper-compat/debian/control create mode 100755 t/debhelper-compat/syntax.t create mode 100755 t/dh-lib.t create mode 100755 t/dh-sequencer.t create mode 100755 t/dh_compress.t create mode 100755 t/dh_install/01-basics.t create mode 100755 t/dh_install/02-bugs-53XXXX.t create mode 100755 t/dh_install/03-866570-dont-install-from-host.t create mode 100755 t/dh_install/04-sourcedir.t create mode 100755 t/dh_installdocs/01-868204-ignore-broken-symlinks.t create mode 100644 t/dh_installdocs/debian/changelog create mode 100644 t/dh_installdocs/debian/control create mode 100644 t/dh_installdocs/debian/copyright create mode 100644 t/dh_installdocs/debian/docfile create mode 100755 t/dh_installdocs/dh_installdocs.t create mode 100644 t/dh_installgsettings/debian/changelog create mode 100644 t/dh_installgsettings/debian/control create mode 100755 t/dh_installgsettings/dh_installgsettings.t create mode 100644 t/dh_installinit/debian/bar.other.init create mode 100644 t/dh_installinit/debian/changelog create mode 100644 t/dh_installinit/debian/control create mode 100644 t/dh_installinit/debian/foo.service create mode 100755 t/dh_installinit/dh_installinit.t create mode 100755 t/dh_installman/01-basics.t create mode 100644 t/dh_installman/manpage-compressed.pod create mode 100644 t/dh_installman/manpage-uncompressed.pod create mode 100644 t/dh_installsystemd/debian/changelog create mode 100644 t/dh_installsystemd/debian/control create mode 100644 t/dh_installsystemd/debian/foo.init create mode 100644 t/dh_installsystemd/debian/foo.service create mode 100644 t/dh_installsystemd/debian/foo2.service create mode 100755 t/dh_installsystemd/dh_installsystemd.t create mode 100755 t/dh_installsystemd/dh_installsystemd_tmpfiles.t create mode 100755 t/dh_installsystemd/dh_systemd.t create mode 100644 t/dh_installsystemd/simple/debian/changelog create mode 100644 t/dh_installsystemd/simple/debian/control create mode 100644 t/dh_installsystemd/simple/debian/foo.service create mode 100644 t/dh_installsystemduser/debian/baz.user.service create mode 100644 t/dh_installsystemduser/debian/changelog create mode 100644 t/dh_installsystemduser/debian/control create mode 100644 t/dh_installsystemduser/debian/foo.user.service create mode 100644 t/dh_installsystemduser/dh_installsystemduser.t create mode 100755 t/dh_link/01-basic.t create mode 100755 t/dh_link/02-346405.t create mode 100755 t/dh_link/03-894229.t create mode 100755 t/dh_missing/01-no-missing.t create mode 100755 t/dh_missing/02-fail-on-missing.t create mode 100755 t/dh_missing/03-dh_install-redirection.t create mode 100755 t/dh_missing/04-not-installed-glob.t create mode 100644 t/dh_missing/template/Makefile create mode 100644 t/dh_missing/template/debian/changelog create mode 100644 t/dh_missing/template/debian/control create mode 100644 t/dh_missing/template/debian/foo.install create mode 100644 t/dh_missing/template/file-for-foo create mode 100755 t/dh_usrlocal/01-basic.t create mode 100755 t/maintscript.t create mode 100755 t/override_target.t create mode 100755 t/pod.t create mode 100755 t/size.t create mode 120000 t/syntax/syntax-libs.t create mode 100755 t/syntax/syntax-progs.t diff --git a/.dir-locals.el b/.dir-locals.el new file mode 100644 index 0000000..50364f2 --- /dev/null +++ b/.dir-locals.el @@ -0,0 +1,7 @@ +((perl-mode + (tab-width . 4) + (indent-tabs-mode . t)) + (cperl-mode + (cperl-indent-level . 4) + (tab-width . 4) + (indent-tabs-mode . t))) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..713ae1a --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,31 @@ +tests-stable-backports: + stage: test + image: debian:stable-backports + script: + - apt-get update + - apt-get build-dep -y . + - dpkg-buildpackage -us -uc -tc + +tests-testing: + stage: test + image: debian:testing + script: + - apt-get update + - apt-get build-dep -y . + - dpkg-buildpackage -us -uc -tc + +tests-unstable-all: + stage: test + image: debian:unstable + script: + - apt-get update + - apt-get build-dep -y -Ppkg.debhelper.ci . + - dpkg-buildpackage -us -uc -tc + +tests-unstable: + stage: test + image: debian:unstable + script: + - apt-get update + - apt-get build-dep -y . + - dpkg-buildpackage -us -uc -tc diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..688aed7 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,194 @@ +# Contributing to debhelper + +Thanks for your interest in improving debhelper. + +No matter how you identify yourself or how others perceive you: we +welcome you. We welcome contributions from you as long as they +interact constructively with our community. See also [Code of +Conduct, Social rules and conflict +resolution](#code-of-conduct-social-rules-and-conflict-resolution). + +This document will cover what you need to get started on working with +debhelper, where to submit patches or contributions and what we expect +from contributors. + + +## Getting started + + + +This section helps you get started with working on debhelper. It +assumes you are comfortable with `git`. + +First clone the debhelper git repository and install build-dependencies: + + git clone https://salsa.debian.org/debian/debhelper.git + cd debhelper + apt-get build-dep ./ + # Used for running the test suite + apt-get install perl + +Running the test suite: + + # Available from the perl package. + prove -lr -j`nproc` t + + +Doing a test build / release build of debhelper: + + # Consider doing it in a chroot to verify that the Build-Depends are correct. + dpkg-buildpackage -us -uc + # installing it for further testing + apt-get install ../debhelper__all.deb + + +Please have a look at `doc/PROGRAMMING`, which have guidelines for +debhelper code. + + +## Balancing simplicity, ease-of-use, performance, etc. + +At times, there are conflicting wishes for debhelper. We cannot +satisfy all requirements and we sometimes have to say no thanks to a +particular change because it conflicts with design goal, or if it is +better suited in a different project, etc. + +Here are some guidelines that may be useful: + + * New build systems or helpers that are language/framework specific + or have a narrow scope are generally better shipped in a separate + package. If the scope becomes more general, the tooling can be + merged in to debhelper at a later stage. + + * Examples: Most `dh-*` packages in Debian are examples of this. + + * Changes that affect performance considerably generally must only + affect packages that need them and only affect a limited subset of + packages and a limited subset of `dh_*`-tools. Particularly, be + careful of `Dpkg::*`-modules, which tend to have very high load + costs. + + * Helpers / tools should generally *do the right thing* by default + (subject to backwards compatibility). If most people neeed some + particular option to make the tool work for them, then the default + should be changed (again, subject to backwards compatibility). + + +## Handling backwards compatibility for consumers + +While changes in debhelper should avoid breaking consumers, some times +we need to implement a backwards incompatible change (e.g. to improve +defaults to match the current packaging norms or fix a bug). + + * For non-trivial breakage, we use compat bumps and migrate to the new + functionality by default in the new major version of debhelper. + (see the `compat` function) + + * For trivial issues or (mostly) unused functionality/bugs, then we + can make exceptions. Preferably, have all consumers migrate away + from the feature being changed (in Debian `unstable`) before + applying it. + +Note that we tend to support compat levels for a long time (10+ +years). When changing behaviour via a compat bump, please take an +extra look to ensure the change is sufficient (this is easier said +than done). See `doc/SUPPORT-POLICY` for more information. + +## Debian support baseline for debhelper + +The debhelper project aims to support the Debian `unstable`, +`testing`, and `stable-backports` suites by default. For this to work, +we work based on the following guidelines: + + 1) it should be trivial to use/Build-Depend on debhelper in + `stable-backports`, and + 2) the debhelper in `stable-backports` should behave the same as + in `testing` when backporting a package from `testing`. + + * Note that we do not require feature/bug compatibility with + debhelper in `stable` (as most packages will still use + debhelper from `stable`). + +In some cases, we can disable some *minor* functionality in +`stable-backports` (previous cases being `dbgsym` and `R³`). + +Where possible, use versioned `Breaks` against other packages to +make it easier to support packages in `stable-backports` +(e.g. debhelper had a `Breaks` against `meson` to ensure packages +used a recent enough version of `meson` when using the debhelper +from `stretch-backports`). + +## Submitting your contribution + +We accept merge requests on [salsa.debian.org] and in general prefer +these to bug reports with patches. This is because the merge requests +will run our CI to ensure the tests still pass. When opening a merge +request, please consider allowing committers to edit the branch as +this enables us to rebase it for you. + +However, we fully respect that not everyone may want to sign up on a +Debian service (e.g. it might be a steep overhead for a one-time +contribution). Therefore, we also accepts bug reports against the +debhelper package in Debian with either patches (`git format-patch` +format preferred) or links to public git repositories with reference +to branches. Please see [Submitting a bug +report](#submitting-a-bug-report) for the guide on how to do that. + +Please see [getting started](#getting-started) for how to obtain the +source code and run the test suite. + +[salsa]: https://salsa.debian.org/debian/debhelper + + +## Submitting a bug report + +If you want to submit a bug report against debhelper, please see +[https://www.debian.org/Bugs/Reporting]() for how to report the bug in the +Debian bug tracker (please file it against the `debhelper` package). + +Users of Debian can use `reportbug debhelper` if they have the +reportbug tool installed. + +You can find the list of open bugs against debhelper at: +[https://bugs.debian.org/src:debhelper](). + + +## Code of Conduct, Social rules and conflict resolution + +The debhelper suite is a part of Debian. Accordingly, the Code of +Conduct, Social rules and conflict resolution from Debian applies to +debhelper and all of its contributors. + +As a guiding principle, we strive to have an open welcoming community +working on making Debian packaging easier. Hopefully, this will be +sufficient for most contributors. For more details, please consider +reading (some) of the documents below. + + + * [Debian's Code of Conduct](https://www.debian.org/code_of_conduct) + + * If you feel a contributor is violating the code of contact, please + contact the [Debian anti-harassment team](https://wiki.debian.org/AntiHarassment) + if you are uncomfortable with engaging with them directly. + + * [Debian's Diversity Statement](https://www.debian.org/intro/diversity) + + * Note that `interact constructively with our community` has the + implication that contributors extend the same acceptance and + welcome to others as they can expect from others based on the + diversity statement. + + * The rationale for this implication is based on the + [Paradoc of tolerance](https://en.wikipedia.org/wiki/Paradox_of_tolerance). + + + * [Debian's Social Contract and Free Software Guidelines](https://www.debian.org/social_contract). + + * (very optional read) [Debian's Constitution](https://www.debian.org/devel/constitution). + + * The primary point of importance from this document is the + debhelper project is subject the Debian's technical committee and + the Debian General Resolution (GR) process. These + bodies/processes can make decisions that the debhelper project + must follow. Notably, the GR process is used for updating the + Debian documents above. diff --git a/GPL b/GPL new file mode 100644 index 0000000..d60c31a --- /dev/null +++ b/GPL @@ -0,0 +1,340 @@ + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc. + 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Library General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may +be called something other than `show w' and `show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + , 1 April 1989 + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Library General +Public License instead of this License. diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..d0b4079 --- /dev/null +++ b/Makefile @@ -0,0 +1,140 @@ +PERL ?= perl +PO4A ?= po4a +POD2MAN ?= pod2man + +# List of files of dh_* commands. Sorted for debhelper man page. +COMMANDS=$(shell find . -maxdepth 1 -type f -perm /100 -name "dh_*" -printf "%f\n" | grep -v '~$$' | LC_ALL=C sort) +MANPAGES=$(COMMANDS:=.1) dh.1 + +# Find deprecated commands by looking at their synopsis. +DEPRECATED=$(shell egrep -l '^dh_.* - .*deprecated' $(COMMANDS)) + +ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS))) + TEST_JOBS = $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS))) +else + TEST_JOBS = 1 +endif + +# Figure out the `current debhelper version. +VERSION=$(shell dpkg-parsechangelog -SVersion) + +# This generates a list of synopses of debhelper commands, and substitutes +# it in to the #LIST# line on the man page fed to it on stdin. Must be passed +# parameters of all the executables or pod files to get the synopses from. +# For correct conversion of pod tags (like S< >) #LIST# must be substituted in +# the pod file and not in the troff file. +MAKEMANLIST=$(PERL) -e ' \ + undef $$/; \ + foreach (@ARGV) { \ + open (IN, $$_) or die "$$_: $$!"; \ + $$file=; \ + close IN; \ + if ($$file=~m/=head1 .*?\n\n(.*?) - (.*?)\n\n/s) { \ + my $$item="=item $$1(1)\n\n$$2\n\n"; \ + if (" $(DEPRECATED) " !~ / $$1 /) { \ + $$list.=$$item; \ + } \ + else { \ + $$list_deprecated.=$$item; \ + } \ + } \ + } \ + END { \ + my $$recommended_compat = q{$(VERSION)}; \ + $$recommended_compat =~ s{^\d+\K(?:\D.*|\..*)?}{}; \ + while () { \ + s/\#LIST\#/$$list/g; \ + s/\#LIST_DEPRECATED\#/$$list_deprecated/g; \ + s/\#RECOMMENDED_COMPAT\#/$$recommended_compat/g; \ + print; \ + }; \ + }' + +PERLLIBDIR=$(shell $(PERL) -MConfig -e 'print $$Config{vendorlib}')/Debian/Debhelper + +PREFIX=/usr + +POD2MAN_FLAGS=--utf8 -c Debhelper -r "$(VERSION)" + +ifneq ($(USE_NLS),no) +# l10n to be built is determined from .po files +LANGS?=$(notdir $(basename $(wildcard man/po4a/po/*.po))) +LANG_TARGETS = $(foreach L,$(LANGS),translated-$(L)-stamp) +else +LANGS= +LANG_TARGETS = +endif + +build: $(LANG_TARGETS) version debhelper.7 debhelper-obsolete-compat.7 $(MANPAGES) + + +po4a-stamp: + $(PO4A) --previous -L UTF-8 man/po4a/po4a.cfg + touch $@ + +translated-%-stamp: po4a-stamp + set -e; \ + lang=$* ; \ + dir=man/$$lang; \ + for file in $$dir/dh*.pod; do \ + prog=`basename $$file | sed 's/.pod//'`; \ + $(POD2MAN) $(POD2MAN_FLAGS) $$file $$prog.$$lang.1; \ + done; \ + if [ -e $$dir/debhelper.pod ]; then \ + cat $$dir/debhelper.pod | \ + $(MAKEMANLIST) `find $$dir -type f -maxdepth 1 -name "dh_*.pod" | LC_ALL=C sort` | \ + $(POD2MAN) $(POD2MAN_FLAGS) --name="debhelper" --section=7 > debhelper.$$lang.7; \ + fi; \ + if [ -e $$dir/debhelper-obsolete-compat.pod ]; then \ + $(POD2MAN) $(POD2MAN_FLAGS) --name="debhelper" --section=7 $$dir/debhelper-obsolete-compat.pod > debhelper-obsolete-compat.$$lang.7; \ + fi + touch $@ + +version: + printf "package Debian::Debhelper::Dh_Version;\n\$$version='$(VERSION)';\n1" > \ + lib/Debian/Debhelper/Dh_Version.pm + +dh_%.1: dh_% + $(POD2MAN) $(POD2MAN_FLAGS) $^ $@ + +dh.1: dh + $(POD2MAN) $(POD2MAN_FLAGS) $^ $@ + +debhelper.7: debhelper.pod + cat debhelper.pod | \ + $(MAKEMANLIST) $(COMMANDS) | \ + $(POD2MAN) $(POD2MAN_FLAGS) --name="debhelper" --section=7 > $@ + +debhelper-obsolete-compat.7: debhelper-obsolete-compat.pod + $(POD2MAN) $(POD2MAN_FLAGS) --name="debhelper" --section=7 $^ > $@ + +clean: + rm -f *-stamp *.1 *.7 lib/Debian/Debhelper/Dh_Version.pm +ifneq ($(USE_NLS),no) + $(PO4A) --previous --rm-translations --rm-backups man/po4a/po4a.cfg +endif + for lang in $(LANGS); do \ + if [ -e man/$$lang ]; then rmdir man/$$lang; fi; \ + done; + +install: + install -d $(DESTDIR)$(PREFIX)/bin \ + $(DESTDIR)$(PREFIX)/share/debhelper/autoscripts \ + $(DESTDIR)$(PERLLIBDIR)/Sequence \ + $(DESTDIR)$(PERLLIBDIR)/Buildsystem \ + $(DESTDIR)$(PERLLIBDIR)/DH + install dh $(COMMANDS) $(DESTDIR)$(PREFIX)/bin + install -m 0644 autoscripts/* $(DESTDIR)$(PREFIX)/share/debhelper/autoscripts + install -m 0644 lib/Debian/Debhelper/*.pm $(DESTDIR)$(PERLLIBDIR) + [ "$(PREFIX)" = /usr ] || \ + sed -i '/$$prefix=/s@/usr@$(PREFIX)@g' $(DESTDIR)$(PERLLIBDIR)/Dh_Lib.pm + if [ "$(VERSION)" ]; then \ + MV=$$(echo "$(VERSION)" | $(PERL) -ne 'print $$1 if /^(\d+)[~.]/;') ; \ + sed -i "/constant HIGHEST_STABLE_COMPAT_LEVEL =>/s@=>.*;@=> $${MV};@g" $(DESTDIR)$(PERLLIBDIR)/Dh_Lib.pm ; \ + fi + install -m 0644 lib/Debian/Debhelper/Sequence/*.pm $(DESTDIR)$(PERLLIBDIR)/Sequence + install -m 0644 lib/Debian/Debhelper/Buildsystem/*.pm $(DESTDIR)$(PERLLIBDIR)/Buildsystem + install -m 0644 lib/Debian/Debhelper/DH/*.pm $(DESTDIR)$(PERLLIBDIR)/DH + +test: version + MAKEFLAGS= HARNESS_OPTIONS=j$(TEST_JOBS) ./run perl -MTest::Harness -e 'runtests grep { ! /CVS/ && ! /\.svn/ && -f && -x && m/\.t$$/ } @ARGV' t/* t/*/* diff --git a/autoscripts/maintscript-helper b/autoscripts/maintscript-helper new file mode 100644 index 0000000..c7e06c4 --- /dev/null +++ b/autoscripts/maintscript-helper @@ -0,0 +1 @@ +dpkg-maintscript-helper #PARAMS# -- "$@" diff --git a/autoscripts/postinst-alternatives b/autoscripts/postinst-alternatives new file mode 100644 index 0000000..eb59f69 --- /dev/null +++ b/autoscripts/postinst-alternatives @@ -0,0 +1,3 @@ +if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ] || [ "$1" = "abort-deconfigure" ] || [ "$1" = "abort-remove" ]; then + update-alternatives #INSTALL_OPTIONS# +fi diff --git a/autoscripts/postinst-emacsen b/autoscripts/postinst-emacsen new file mode 100644 index 0000000..0d3fd13 --- /dev/null +++ b/autoscripts/postinst-emacsen @@ -0,0 +1,5 @@ +if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ] || [ "$1" = "abort-deconfigure" ] || [ "$1" = "abort-remove" ] ; then + if [ -e /var/lib/emacsen-common/state/package/installed/emacsen-common -a -x /usr/lib/emacsen-common/emacs-package-install ] ; then + /usr/lib/emacsen-common/emacs-package-install --postinst #PACKAGE# + fi +fi diff --git a/autoscripts/postinst-icons b/autoscripts/postinst-icons new file mode 100644 index 0000000..aa2eed0 --- /dev/null +++ b/autoscripts/postinst-icons @@ -0,0 +1,5 @@ +if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ] || [ "$1" = "abort-deconfigure" ] || [ "$1" = "abort-remove" ] ; then + if which update-icon-caches >/dev/null 2>&1 ; then + update-icon-caches #DIRLIST# + fi +fi diff --git a/autoscripts/postinst-init b/autoscripts/postinst-init new file mode 100644 index 0000000..535b40c --- /dev/null +++ b/autoscripts/postinst-init @@ -0,0 +1,6 @@ +if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ] || [ "$1" = "abort-deconfigure" ] || [ "$1" = "abort-remove" ] ; then + if [ -x "/etc/init.d/#SCRIPT#" ]; then + update-rc.d #SCRIPT# #INITPARMS# >/dev/null + invoke-rc.d #INVOKE_RCD_PARAMS##SCRIPT# start || #ERROR_HANDLER# + fi +fi diff --git a/autoscripts/postinst-init-nostart b/autoscripts/postinst-init-nostart new file mode 100644 index 0000000..820a106 --- /dev/null +++ b/autoscripts/postinst-init-nostart @@ -0,0 +1,5 @@ +if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ] || [ "$1" = "abort-deconfigure" ] || [ "$1" = "abort-remove" ] ; then + if [ -x "/etc/init.d/#SCRIPT#" ]; then + update-rc.d #SCRIPT# #INITPARMS# >/dev/null || #ERROR_HANDLER# + fi +fi diff --git a/autoscripts/postinst-init-restart b/autoscripts/postinst-init-restart new file mode 100644 index 0000000..19dff68 --- /dev/null +++ b/autoscripts/postinst-init-restart @@ -0,0 +1,11 @@ +if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ] || [ "$1" = "abort-deconfigure" ] || [ "$1" = "abort-remove" ] ; then + if [ -x "/etc/init.d/#SCRIPT#" ]; then + update-rc.d #SCRIPT# #INITPARMS# >/dev/null + if [ -n "$2" ]; then + _dh_action=restart + else + _dh_action=start + fi + invoke-rc.d #INVOKE_RCD_PARAMS##SCRIPT# $_dh_action || #ERROR_HANDLER# + fi +fi diff --git a/autoscripts/postinst-init-tmpfiles b/autoscripts/postinst-init-tmpfiles new file mode 100644 index 0000000..f258293 --- /dev/null +++ b/autoscripts/postinst-init-tmpfiles @@ -0,0 +1,7 @@ +if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ] || [ "$1" = "abort-deconfigure" ] || [ "$1" = "abort-remove" ] ; then + # In case this system is running systemd, we need to ensure that all + # necessary tmpfiles (if any) are created before starting. + if [ -d /run/systemd/system ] ; then + systemd-tmpfiles --create #TMPFILES# >/dev/null || true + fi +fi diff --git a/autoscripts/postinst-menu b/autoscripts/postinst-menu new file mode 100644 index 0000000..b56a346 --- /dev/null +++ b/autoscripts/postinst-menu @@ -0,0 +1,3 @@ +if [ "$1" = "configure" ] && [ -x "`which update-menus 2>/dev/null`" ]; then + update-menus +fi diff --git a/autoscripts/postinst-menu-method b/autoscripts/postinst-menu-method new file mode 100644 index 0000000..c56d625 --- /dev/null +++ b/autoscripts/postinst-menu-method @@ -0,0 +1,7 @@ +inst=/etc/menu-methods/#PACKAGE# +if [ -f $inst ]; then + chmod a+x $inst + if [ -x "`which update-menus 2>/dev/null`" ]; then + update-menus + fi +fi diff --git a/autoscripts/postinst-modules b/autoscripts/postinst-modules new file mode 100644 index 0000000..9f8d205 --- /dev/null +++ b/autoscripts/postinst-modules @@ -0,0 +1,5 @@ +if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ] || [ "$1" = "abort-deconfigure" ] || [ "$1" = "abort-remove" ] ; then + if [ -e /boot/System.map-#KVERS# ]; then + depmod -a -F /boot/System.map-#KVERS# #KVERS# || true + fi +fi diff --git a/autoscripts/postinst-systemd-dont-enable b/autoscripts/postinst-systemd-dont-enable new file mode 100644 index 0000000..6ecec62 --- /dev/null +++ b/autoscripts/postinst-systemd-dont-enable @@ -0,0 +1,15 @@ +if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ] || [ "$1" = "abort-deconfigure" ] || [ "$1" = "abort-remove" ] ; then + if deb-systemd-helper debian-installed #UNITFILE#; then + # This will only remove masks created by d-s-h on package removal. + deb-systemd-helper unmask #UNITFILE# >/dev/null || true + + if deb-systemd-helper --quiet was-enabled #UNITFILE#; then + # Create new symlinks, if any. + deb-systemd-helper enable #UNITFILE# >/dev/null || true + fi + fi + + # Update the statefile to add new symlinks (if any), which need to be cleaned + # up on purge. Also remove old symlinks. + deb-systemd-helper update-state #UNITFILE# >/dev/null || true +fi diff --git a/autoscripts/postinst-systemd-enable b/autoscripts/postinst-systemd-enable new file mode 100644 index 0000000..c0b2574 --- /dev/null +++ b/autoscripts/postinst-systemd-enable @@ -0,0 +1,15 @@ +if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ] || [ "$1" = "abort-deconfigure" ] || [ "$1" = "abort-remove" ] ; then + # This will only remove masks created by d-s-h on package removal. + deb-systemd-helper unmask #UNITFILE# >/dev/null || true + + # was-enabled defaults to true, so new installations run enable. + if deb-systemd-helper --quiet was-enabled #UNITFILE#; then + # Enables the unit on first installation, creates new + # symlinks on upgrades if the unit file has changed. + deb-systemd-helper enable #UNITFILE# >/dev/null || true + else + # Update the statefile to add new symlinks (if any), which need to be + # cleaned up on purge. Also remove old symlinks. + deb-systemd-helper update-state #UNITFILE# >/dev/null || true + fi +fi diff --git a/autoscripts/postinst-systemd-restart b/autoscripts/postinst-systemd-restart new file mode 100644 index 0000000..8155bc0 --- /dev/null +++ b/autoscripts/postinst-systemd-restart @@ -0,0 +1,11 @@ +if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ] || [ "$1" = "abort-deconfigure" ] || [ "$1" = "abort-remove" ] ; then + if [ -d /run/systemd/system ]; then + systemctl --system daemon-reload >/dev/null || true + if [ -n "$2" ]; then + _dh_action=#RESTART_ACTION# + else + _dh_action=start + fi + deb-systemd-invoke $_dh_action #UNITFILES# >/dev/null || true + fi +fi diff --git a/autoscripts/postinst-systemd-restartnostart b/autoscripts/postinst-systemd-restartnostart new file mode 100644 index 0000000..d3f199c --- /dev/null +++ b/autoscripts/postinst-systemd-restartnostart @@ -0,0 +1,8 @@ +if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ] || [ "$1" = "abort-deconfigure" ] || [ "$1" = "abort-remove" ] ; then + if [ -d /run/systemd/system ]; then + systemctl --system daemon-reload >/dev/null || true + if [ -n "$2" ]; then + deb-systemd-invoke #RESTART_ACTION# #UNITFILES# >/dev/null || true + fi + fi +fi diff --git a/autoscripts/postinst-systemd-start b/autoscripts/postinst-systemd-start new file mode 100644 index 0000000..6a24ad8 --- /dev/null +++ b/autoscripts/postinst-systemd-start @@ -0,0 +1,6 @@ +if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ] || [ "$1" = "abort-deconfigure" ] || [ "$1" = "abort-remove" ] ; then + if [ -d /run/systemd/system ]; then + systemctl --system daemon-reload >/dev/null || true + deb-systemd-invoke start #UNITFILES# >/dev/null || true + fi +fi diff --git a/autoscripts/postinst-systemd-user-dont-enable b/autoscripts/postinst-systemd-user-dont-enable new file mode 100644 index 0000000..0837257 --- /dev/null +++ b/autoscripts/postinst-systemd-user-dont-enable @@ -0,0 +1,15 @@ +if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ] || [ "$1" = "abort-deconfigure" ] || [ "$1" = "abort-remove" ] ; then + if deb-systemd-helper --user debian-installed #UNITFILE# ; then + # This will only remove masks created by d-s-h on package removal. + deb-systemd-helper --user unmask #UNITFILE# >/dev/null || true + + if deb-systemd-helper --quiet --user was-enabled #UNITFILE# ; then + # Create new symlinks, if any. + deb-systemd-helper --user enable #UNITFILE# >/dev/null || true + fi + fi + + # Update the statefile to add new symlinks (if any), which need to be cleaned + # up on purge. Also remove old symlinks. + deb-systemd-helper --user update-state #UNITFILE# >/dev/null || true +fi diff --git a/autoscripts/postinst-systemd-user-enable b/autoscripts/postinst-systemd-user-enable new file mode 100644 index 0000000..b16f61f --- /dev/null +++ b/autoscripts/postinst-systemd-user-enable @@ -0,0 +1,15 @@ +if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ] || [ "$1" = "abort-deconfigure" ] || [ "$1" = "abort-remove" ] ; then + # This will only remove masks created by d-s-h on package removal. + deb-systemd-helper --user unmask #UNITFILE# >/dev/null || true + + # was-enabled defaults to true, so new installations run enable. + if deb-systemd-helper --quiet --user was-enabled #UNITFILE# ; then + # Enables the unit on first installation, creates new + # symlinks on upgrades if the unit file has changed. + deb-systemd-helper --user enable #UNITFILE# >/dev/null || true + else + # Update the statefile to add new symlinks (if any), which need to be + # cleaned up on purge. Also remove old symlinks. + deb-systemd-helper --user update-state #UNITFILE# >/dev/null || true + fi +fi diff --git a/autoscripts/postinst-sysusers b/autoscripts/postinst-sysusers new file mode 100644 index 0000000..7784e53 --- /dev/null +++ b/autoscripts/postinst-sysusers @@ -0,0 +1,3 @@ +if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ] || [ "$1" = "abort-deconfigure" ] || [ "$1" = "abort-remove" ] ; then + systemd-sysusers #CONFILE_BASENAME# +fi diff --git a/autoscripts/postinst-ucf b/autoscripts/postinst-ucf new file mode 100644 index 0000000..7445e94 --- /dev/null +++ b/autoscripts/postinst-ucf @@ -0,0 +1,4 @@ +if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ]; then + ucf "#UCFSRC#" "#UCFDEST#" + ucfr #PACKAGE# "#UCFDEST#" +fi diff --git a/autoscripts/postinst-usrlocal b/autoscripts/postinst-usrlocal new file mode 100644 index 0000000..e856e0f --- /dev/null +++ b/autoscripts/postinst-usrlocal @@ -0,0 +1,29 @@ +if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ] || [ "$1" = "abort-deconfigure" ] || [ "$1" = "abort-remove" ]; then +( + default_mode=0755 + default_user=root + default_group=root + if [ -e /etc/staff-group-for-usr-local ]; then + default_mode=02775 + default_group=staff + fi + while read line; do + set -- $line + dir="$1"; mode="$2"; user="$3"; group="$4" + if [ "$mode" = "default" ]; then + mode="$default_mode" + user="$default_user" + group="$default_group" + fi + if [ ! -e "$dir" ]; then + if mkdir "$dir" 2>/dev/null; then + if chown "$user":"$group" "$dir" ; then + chmod "$mode" "$dir" || true + fi + fi + fi + done +) << DATA +#DIRS# +DATA +fi diff --git a/autoscripts/postinst-wm b/autoscripts/postinst-wm new file mode 100644 index 0000000..be00872 --- /dev/null +++ b/autoscripts/postinst-wm @@ -0,0 +1,6 @@ +if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ] || [ "$1" = "abort-deconfigure" ] || [ "$1" = "abort-remove" ]; then + update-alternatives --install /usr/bin/x-window-manager \ + x-window-manager #WM# #PRIORITY# \ + --slave /usr/share/man/man1/x-window-manager.1.gz \ + x-window-manager.1.gz #WMMAN# +fi diff --git a/autoscripts/postinst-wm-noman b/autoscripts/postinst-wm-noman new file mode 100644 index 0000000..07e8d9a --- /dev/null +++ b/autoscripts/postinst-wm-noman @@ -0,0 +1,4 @@ +if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ] || [ "$1" = "abort-deconfigure" ] || [ "$1" = "abort-remove" ] ; then + update-alternatives --install /usr/bin/x-window-manager \ + x-window-manager #WM# #PRIORITY# +fi diff --git a/autoscripts/postinst-xfonts b/autoscripts/postinst-xfonts new file mode 100644 index 0000000..96390e4 --- /dev/null +++ b/autoscripts/postinst-xfonts @@ -0,0 +1,3 @@ +if which update-fonts-dir >/dev/null 2>&1; then + #CMDS# +fi diff --git a/autoscripts/postrm-debconf b/autoscripts/postrm-debconf new file mode 100644 index 0000000..5a61724 --- /dev/null +++ b/autoscripts/postrm-debconf @@ -0,0 +1,4 @@ +if [ "$1" = purge ] && [ -e /usr/share/debconf/confmodule ]; then + . /usr/share/debconf/confmodule + db_purge +fi diff --git a/autoscripts/postrm-icons b/autoscripts/postrm-icons new file mode 100644 index 0000000..9e00f03 --- /dev/null +++ b/autoscripts/postrm-icons @@ -0,0 +1,3 @@ +if which update-icon-caches >/dev/null 2>&1 ; then + update-icon-caches #DIRLIST# +fi diff --git a/autoscripts/postrm-init b/autoscripts/postrm-init new file mode 100644 index 0000000..1c29298 --- /dev/null +++ b/autoscripts/postrm-init @@ -0,0 +1,3 @@ +if [ "$1" = "purge" ] ; then + update-rc.d #SCRIPT# remove >/dev/null +fi diff --git a/autoscripts/postrm-menu b/autoscripts/postrm-menu new file mode 100644 index 0000000..a180558 --- /dev/null +++ b/autoscripts/postrm-menu @@ -0,0 +1 @@ +if [ -x "`which update-menus 2>/dev/null`" ]; then update-menus ; fi diff --git a/autoscripts/postrm-menu-method b/autoscripts/postrm-menu-method new file mode 100644 index 0000000..ffa1e48 --- /dev/null +++ b/autoscripts/postrm-menu-method @@ -0,0 +1,3 @@ +inst=/etc/menu-methods/#PACKAGE# +if [ "$1" = "remove" ] && [ -f "$inst" ]; then chmod a-x $inst ; fi +if [ -x "`which update-menus 2>/dev/null`" ]; then update-menus ; fi diff --git a/autoscripts/postrm-modules b/autoscripts/postrm-modules new file mode 100644 index 0000000..c2577dd --- /dev/null +++ b/autoscripts/postrm-modules @@ -0,0 +1,3 @@ +if [ -e /boot/System.map-#KVERS# ]; then + depmod -a -F /boot/System.map-#KVERS# #KVERS# || true +fi diff --git a/autoscripts/postrm-sgmlcatalog b/autoscripts/postrm-sgmlcatalog new file mode 100644 index 0000000..f8278e6 --- /dev/null +++ b/autoscripts/postrm-sgmlcatalog @@ -0,0 +1,3 @@ +if [ "$1" = "purge" ]; then + rm -f #CENTRALCAT#.old +fi diff --git a/autoscripts/postrm-systemd b/autoscripts/postrm-systemd new file mode 100644 index 0000000..d95013b --- /dev/null +++ b/autoscripts/postrm-systemd @@ -0,0 +1,12 @@ +if [ "$1" = "remove" ]; then + if [ -x "/usr/bin/deb-systemd-helper" ]; then + deb-systemd-helper mask #UNITFILES# >/dev/null || true + fi +fi + +if [ "$1" = "purge" ]; then + if [ -x "/usr/bin/deb-systemd-helper" ]; then + deb-systemd-helper purge #UNITFILES# >/dev/null || true + deb-systemd-helper unmask #UNITFILES# >/dev/null || true + fi +fi diff --git a/autoscripts/postrm-systemd-reload-only b/autoscripts/postrm-systemd-reload-only new file mode 100644 index 0000000..c251c34 --- /dev/null +++ b/autoscripts/postrm-systemd-reload-only @@ -0,0 +1,3 @@ +if [ -d /run/systemd/system ] && [ "$1" = remove ]; then + systemctl --system daemon-reload >/dev/null || true +fi diff --git a/autoscripts/postrm-systemd-user b/autoscripts/postrm-systemd-user new file mode 100644 index 0000000..bf48d1a --- /dev/null +++ b/autoscripts/postrm-systemd-user @@ -0,0 +1,12 @@ +if [ "$1" = "remove" ]; then + if [ -x "/usr/bin/deb-systemd-helper" ] ; then + deb-systemd-helper --user mask #UNITFILES# >/dev/null || true + fi +fi + +if [ "$1" = "purge" ]; then + if [ -x "/usr/bin/deb-systemd-helper" ] ; then + deb-systemd-helper --user purge #UNITFILES# >/dev/null || true + deb-systemd-helper --user unmask #UNITFILES# >/dev/null || true + fi +fi diff --git a/autoscripts/postrm-ucf b/autoscripts/postrm-ucf new file mode 100644 index 0000000..da37572 --- /dev/null +++ b/autoscripts/postrm-ucf @@ -0,0 +1,12 @@ +if [ "$1" = "purge" ]; then + for ext in .ucf-new .ucf-old .ucf-dist ""; do + rm -f "#UCFDEST#$ext" + done + + if [ -x "`which ucf 2>/dev/null`" ]; then + ucf --purge "#UCFDEST#" + fi + if [ -x "`which ucfr 2>/dev/null`" ]; then + ucfr --purge #PACKAGE# "#UCFDEST#" + fi +fi diff --git a/autoscripts/postrm-xfonts b/autoscripts/postrm-xfonts new file mode 100644 index 0000000..cd476a3 --- /dev/null +++ b/autoscripts/postrm-xfonts @@ -0,0 +1,3 @@ +if [ -x "`which update-fonts-dir 2>/dev/null`" ]; then + #CMDS# +fi diff --git a/autoscripts/preinst-emacsen b/autoscripts/preinst-emacsen new file mode 100644 index 0000000..c4285d9 --- /dev/null +++ b/autoscripts/preinst-emacsen @@ -0,0 +1,5 @@ +if ( [ "$1" = "install" ] || [ "$1" = "upgrade" ] ) \ + && [ -e /var/lib/emacsen-common/state/package/installed/emacsen-common -a -x /usr/lib/emacsen-common/emacs-package-install ] +then + /usr/lib/emacsen-common/emacs-package-install --preinst #PACKAGE# +fi diff --git a/autoscripts/prerm-alternatives b/autoscripts/prerm-alternatives new file mode 100644 index 0000000..72eb2cf --- /dev/null +++ b/autoscripts/prerm-alternatives @@ -0,0 +1,3 @@ +if [ "$1" = "remove" ]; then + update-alternatives #RM_OPTIONS# +fi diff --git a/autoscripts/prerm-emacsen b/autoscripts/prerm-emacsen new file mode 100644 index 0000000..4c7c2b0 --- /dev/null +++ b/autoscripts/prerm-emacsen @@ -0,0 +1,3 @@ +if [ -e /var/lib/emacsen-common/state/package/installed/emacsen-common -a -x /usr/lib/emacsen-common/emacs-package-remove ] ; then + /usr/lib/emacsen-common/emacs-package-remove --prerm #PACKAGE# +fi diff --git a/autoscripts/prerm-init b/autoscripts/prerm-init new file mode 100644 index 0000000..f8707b9 --- /dev/null +++ b/autoscripts/prerm-init @@ -0,0 +1,3 @@ +if [ -x "/etc/init.d/#SCRIPT#" ]; then + invoke-rc.d #INVOKE_RCD_PARAMS##SCRIPT# stop || #ERROR_HANDLER# +fi diff --git a/autoscripts/prerm-init-norestart b/autoscripts/prerm-init-norestart new file mode 100644 index 0000000..97f2174 --- /dev/null +++ b/autoscripts/prerm-init-norestart @@ -0,0 +1,3 @@ +if [ -x "/etc/init.d/#SCRIPT#" ] && [ "$1" = remove ]; then + invoke-rc.d #INVOKE_RCD_PARAMS##SCRIPT# stop || #ERROR_HANDLER# +fi diff --git a/autoscripts/prerm-systemd b/autoscripts/prerm-systemd new file mode 100644 index 0000000..d85223f --- /dev/null +++ b/autoscripts/prerm-systemd @@ -0,0 +1,3 @@ +if [ -d /run/systemd/system ]; then + deb-systemd-invoke stop #UNITFILES# >/dev/null || true +fi diff --git a/autoscripts/prerm-systemd-restart b/autoscripts/prerm-systemd-restart new file mode 100644 index 0000000..13b0388 --- /dev/null +++ b/autoscripts/prerm-systemd-restart @@ -0,0 +1,3 @@ +if [ -d /run/systemd/system ] && [ "$1" = remove ]; then + deb-systemd-invoke stop #UNITFILES# >/dev/null || true +fi diff --git a/autoscripts/prerm-usrlocal b/autoscripts/prerm-usrlocal new file mode 100644 index 0000000..baafc23 --- /dev/null +++ b/autoscripts/prerm-usrlocal @@ -0,0 +1,7 @@ +( + while read dir; do + rmdir "$dir" 2>/dev/null || true + done +) << DATA +#JUSTDIRS# +DATA diff --git a/autoscripts/prerm-wm b/autoscripts/prerm-wm new file mode 100644 index 0000000..b97d627 --- /dev/null +++ b/autoscripts/prerm-wm @@ -0,0 +1,3 @@ +if [ "$1" = "remove" ]; then + update-alternatives --remove x-window-manager #WM# +fi diff --git a/debhelper-obsolete-compat.pod b/debhelper-obsolete-compat.pod new file mode 100644 index 0000000..4c98ac3 --- /dev/null +++ b/debhelper-obsolete-compat.pod @@ -0,0 +1,128 @@ +=head1 NAME + +debhelper-obsolete-compat - List of no longer supported compat levels + +=head1 SYNOPSIS + +This document contains the upgrade guidelines from all compat levels +which are no longer supported. Accordingly it is mostly for +historical purposes and to assist people upgrading from a +non-supported compat level to a supported level. + +For upgrades from supported compat levels, please see L. + +=head1 UPGRADE LIST FOR COMPAT LEVELS + +The following is the list of now obsolete compat levels and their +changes. + +=over 4 + +=item v1 + +This is the original debhelper compatibility level, and so it is the default +one. In this mode, debhelper will use F as the package tree +directory for the first binary package listed in the control file, while using +debian/I for all other packages listed in the F file. + +This mode is deprecated. + +=item v2 + +In this mode, debhelper will consistently use debian/I +as the package tree directory for every package that is built. + +This mode is deprecated. + +=item v3 + +This mode works like v2, with the following additions: + +=over 8 + +=item - + +Debhelper config files support globbing via B<*> and B, when appropriate. To +turn this off and use those characters raw, just prefix with a backslash. + +=item - + +B makes the F and F scripts call B. + +=item - + +Every file in F is automatically flagged as a conffile by B. + +=back + +This mode is deprecated. + +=item v4 + +Changes from v3 are: + +=over 8 + +=item - + +B will not include the Debian part of the version number in +the generated dependency line in the shlibs file. + +=item - + +You are encouraged to put the new B<${misc:Depends}> into F to +supplement the B<${shlibs:Depends}> field. + +=item - + +B will make all files in F directories and in F +executable. + +=item - + +B will correct existing links to conform with policy. + +=back + +This mode is deprecated. + +=item v5 + +This is the lowest supported compatibility level. + +Changes from v4 are: + +=over 8 + +=item - + +Comments are ignored in debhelper config files. + +=item - + +B now specifies the name of a package to put debugging +symbols in, not the packages to take the symbols from. + +=item - + +B skips installing empty files. + +=item - + +B errors out if wildcards expand to nothing. + +=back + +=back + +=head1 SEE ALSO + +L + +=head1 AUTHORS + +Niels Thykier + +Joey Hess + +=cut diff --git a/debhelper.pod b/debhelper.pod new file mode 100644 index 0000000..9b00ec7 --- /dev/null +++ b/debhelper.pod @@ -0,0 +1,1637 @@ +=encoding UTF-8 + +=head1 NAME + +debhelper - the debhelper tool suite + +=head1 SYNOPSIS + +BI<*> [B<-v>] [B<-a>] [B<-i>] [B<--no-act>] [B<-p>I] [B<-N>I] [B<-P>I] + +=head1 DESCRIPTION + +Debhelper is used to help you build a Debian package. The philosophy behind +debhelper is to provide a collection of small, simple, and easily +understood tools that are used in F to automate various common +aspects of building a package. This means less work for you, the packager. +It also, to some degree means that these tools can be changed if Debian +policy changes, and packages that use them will require only a rebuild to +comply with the new policy. + +A typical F file that uses debhelper will call several debhelper +commands in sequence, or use L to automate this process. Examples of +rules files that use debhelper are in F + +To create a new Debian package using debhelper, you can just copy one of +the sample rules files and edit it by hand. Or you can try the B +package, which contains a L command that partially +automates the process. For a more gentle introduction, the B Debian +package contains a tutorial about making your first package using debhelper. + +Except where the tool explicitly denotes otherwise, all of the debhelper +tools assume that they run from the root directory of an unpacked source +package. This is so they can locate find files like F +when needed. + +=head1 DEBHELPER COMMANDS + +Here is the list of debhelper commands you can use. See their man +pages for additional documentation. + +=over 4 + +#LIST# + +=back + +=head2 Deprecated Commands + +A few debhelper commands are deprecated and should not be used. + +=over 4 + +#LIST_DEPRECATED# + +=back + +=head2 Other Commands + +If a program's name starts with B, and the program is not on the above +lists, then it is not part of the debhelper package, but it should still +work like the other programs described on this page. + +=head1 DEBHELPER CONFIG FILES + +Many debhelper commands make use of files in F to control what they +do. Besides the common F and F, which are +in all packages, not just those using debhelper, some additional files can +be used to configure the behavior of specific debhelper commands. These +files are typically named debian/I.foo (where I of course, +is replaced with the package that is being acted on). + +For example, B uses files named F to list +the documentation files it will install. See the man pages of individual +commands for details about the names and formats of the files they use. +Generally, these files will list files to act on, one file per line. Some +programs in debhelper use pairs of files and destinations or slightly more +complicated formats. + +Note for the first (or only) binary package listed in +F, debhelper will use F when there's no +F.foo> file. However, it is often a good idea to keep +the F.> prefix as it is more explicit. The primary exception +to this are files that debhelper by default installs in every binary +package when it does not have a package prefix (such as +F or F). + +In some rare cases, you may want to have different versions of these files +for different architectures or OSes. If files named debian/I.foo.I +or debian/I.foo.I exist, where I and I are the same as the +output of "B" / +"B", +then they will be used in preference to other, more general files. + +Mostly, these config files are used to specify lists of various types of +files. Documentation or example files to install, files to move, and so on. +When appropriate, in cases like these, you can use standard shell wildcard +characters (B and B<*> and B<[>I<..>B<]> character classes) in the files. +You can also put comments in these files; lines beginning with B<#> are +ignored. + +The syntax of these files is intentionally kept very simple to make them +easy to read, understand, and modify. + +=head2 Substitutions in debhelper config files + +In compatibility level 13 and later, it is possible to use simple +substitutions in debhelper config files for the following tools: + +=over 4 + +=item * + +dh_clean + +=item * + +dh_install + +=item * + +dh_installcatalogs + +=item * + +dh_installdeb + +=item * + +dh_installdirs + +=item * + +dh_installdocs + +=item * + +dh_installexamples + +=item * + +dh_installinfo + +=item * + +dh_installman + +=item * + +dh_installwm + +=item * + +dh_link + +=item * + +dh_missing + +=item * + +dh_ucf + +=back + +All substitution variables are of the form I<${foo}> and the braces +are mandatory. Variable names are case-sensitive and consist of +alphanumerics (a-zA-Z0-9), hyphens (-), underscores (_), and colons (:). +The first character must be an alphanumeric. + +If you need a literal dollar sign that cannot trigger a substitution, +you can either use the B<${Dollar}> substitution or the sequence B<${}>. + +The following expansions are available: + +=over 4 + +=item B, B, B + +Expands to the relevant L value (similar to +I). + +When in doubt, the B variant is the one that will work both +for native and cross builds. + +For performance reasons, debhelper will attempt to resolve these +names from the environment first before consulting +L. This is mostly mentioned for completeness +as it will not matter for most cases. + +=item B + +Expands to a single literal B<$>-symbol. This symbol will I +be considered part of a substitution variable. That is: + + # Triggers an error + ${NO_SUCH_TOKEN} + # Expands to the literal value "${NO_SUCH_TOKEN}" + ${Dollar}{NO_SUCH_TOKEN} + +This variable equivalent to the sequence B<${}> and the two can be +used interchangeably. + +=item B, B, B + +Expands to a single ASCII newline, space and tab respectively. + +This can be useful if you need to include a literal whitespace +character (e.g. space) where it would otherwise be stripped or +used as a separator. + +=item B<< env:I >> + +Expands to the environment variable I. The environment +variable must be set (but can be set to the empty string). + +=back + +Note that all variables must expand to a defined value. As an example, +if debhelper sees I<${env:FOO}>, then it will insist that the environment +variable I is set (it can be set to the empty string). + +=head3 Substitution limits + +To avoid infinite loops and resource exhaustion, debhelper will stop +with an error if the text contains many substitution variables (50) or +they expand beyond a certain size (4096 characters or 3x length of +the original input - whichever is bigger). + +=head2 Executable debhelper config files + +If you need additional flexibility, many of the debhelper tools +(e.g. L) support executing a config file as a script. + +To use this feature, simply mark the config file as executable +(e.g. B<< chmod +x debian/I.install >>) and the tool will +attempt to execute it and use the output of the script. In many +cases, you can use L as interpreter of the config file to +retain most of the original syntax while getting the additional +flexibility you need. + + +When using executable debhelper config files, please be aware of the +following: + +=over 4 + +=item * + +The executable config file B exit with success (i.e. its return +code should indicate success). + +=item * + +In compatibility level 13+, the output will be subject to substitutions +(see L) where the tool +support these. Remember to be careful if your generator I provides +substitutions as this can cause unnecessary confusion. + +Otherwise, the output will be used exactly as-is. Notably, debhelper +will I expand wildcards or strip comments or strip whitespace +in the output. + +=back + +If you need the package to build on a file system where you cannot +disable the executable bit, then you can use L and its +B script. + +=head1 SHARED DEBHELPER OPTIONS + +The following command line options are supported by all debhelper programs. + +=over 4 + +=item B<-v>, B<--verbose> + +Verbose mode: show all commands that modify the package build directory. + +=item B<--no-act> + +Do not really do anything. If used with -v, the result is that the command +will output what it would have done. + +=item B<-a>, B<--arch> + +Act on architecture dependent packages that should be built for the +B architecture. + +=item B<-i>, B<--indep> + +Act on all architecture independent packages. + +=item B<-p>I, B<--package=>I + +Act on the package named I. This option may be specified multiple +times to make debhelper operate on a given set of packages. + +=item B<-s>, B<--same-arch> + +Deprecated alias of B<-a>. + +This option is removed in compat 12. + +=item B<-N>I, B<--no-package=>I + +Do not act on the specified package even if an B<-a>, B<-i>, or B<-p> option lists +the package as one that should be acted on. + +=item B<--remaining-packages> + +Do not act on the packages which have already been acted on by this debhelper +command earlier (i.e. if the command is present in the package debhelper log). +For example, if you need to call the command with special options only for a +couple of binary packages, pass this option to the last call of the command to +process the rest of packages with default settings. + +=item B<-P>I, B<--tmpdir=>I + +Use I for package build directory. The default is debian/I + +=item B<--mainpackage=>I + +This little-used option changes the package which debhelper considers the +"main package", that is, the first one listed in F, and the +one for which F files can be used instead of the usual +F files. + +=item B<-O=>I