Source: qr-tools Severity: wishlist Tags: patch Hello. The attached commits arguably improve the Debian packaging, without changing the binary packages as far as I know. Please apply the ones you find relevant. Thanks.
>From 4d854152b72c73a2b51444e2f03e733cce7a35bd Mon Sep 17 00:00:00 2001 From: Nicolas Boulenguez <nico...@debian.org> Date: Thu, 19 May 2022 16:10:56 +0200 Subject: [PATCH 1/5] Replace get-orig-source with Files-Excluded
The Debian policy recommends to replace the get-orig-source target in debian/rules with a debian/watch file when possible. The Files-Excluded field in debian/copyright now allows uscan to fully replace a hand-written target. --- debian/copyright | 1 + debian/rules | 16 ---------------- 2 files changed, 1 insertion(+), 16 deletions(-) diff --git a/debian/copyright b/debian/copyright index a43fbe6..4439bbf 100644 --- a/debian/copyright +++ b/debian/copyright @@ -1,6 +1,7 @@ Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Upstream-Name: qr-tools Source: https://launchpad.net/qr-tools +Files-Excluded: *.old *.qm Files: * Copyright: 2011 David Green <david4...@gmail.com> diff --git a/debian/rules b/debian/rules index a00d717..ad434a4 100755 --- a/debian/rules +++ b/debian/rules @@ -17,19 +17,3 @@ execute_after_dh_auto_clean: echo $(DEB_VERSION_UPSTREAM) rm -rf $(CURDIR)/build find -name "*.qm" | xargs rm -f - -PACKAGE = qr-tools - -BZR_REVISION := $(shell echo $(DEB_VERSION_UPSTREAM) | awk -F"~" '{ print $$2 }' | sed 's/bzr//' ) -TARBALL = $(PACKAGE)_$(DEB_VERSION_UPSTREAM).orig.tar -.PHONY: get-orig-source -get-orig-source: - echo $(DEB_VERSION_UPSTREAM) - bzr export $(CURDIR)/$(TARBALL) -r $(BZR_REVISION) "lp:qr-tools" - tar xf $(CURDIR)/$(TARBALL) - find $(PACKAGE)_$(DEB_VERSION_UPSTREAM).orig -name "*.qm" | xargs rm -f - find $(PACKAGE)_$(DEB_VERSION_UPSTREAM).orig -name "*.old" | xargs rm -f - tar cf $(CURDIR)/$(TARBALL) $(PACKAGE)_$(DEB_VERSION_UPSTREAM).orig - xz -9 $(CURDIR)/$(TARBALL) - rm -rf $(PACKAGE)_$(DEB_VERSION_UPSTREAM).orig - echo " "$(TARBALL).xz" created; move it to the right destination to build the package" -- 2.30.2
>From c1788d799f7495070354198d8fcc9a0e29ab80cc Mon Sep 17 00:00:00 2001 From: Nicolas Boulenguez <nico...@debian.org> Date: Thu, 19 May 2022 16:13:54 +0200 Subject: [PATCH 2/5] debian/rules: replace override_dh_clean with debian/clean A separate debian/clean file seems consistent with qtqr.dirs. --- debian/clean | 2 ++ debian/rules | 6 ------ 2 files changed, 2 insertions(+), 6 deletions(-) create mode 100644 debian/clean diff --git a/debian/clean b/debian/clean new file mode 100644 index 0000000..7045335 --- /dev/null +++ b/debian/clean @@ -0,0 +1,2 @@ +build/ +*.qm diff --git a/debian/rules b/debian/rules index ad434a4..2925b96 100755 --- a/debian/rules +++ b/debian/rules @@ -1,7 +1,6 @@ #!/usr/bin/make -f export QT_SELECT := 5 -include /usr/share/dpkg/pkg-info.mk %: dh $@ --buildsystem=pybuild @@ -12,8 +11,3 @@ execute_after_dh_auto_build: execute_after_dh_auto_install: install -m 644 $(CURDIR)/qtqr.py $(CURDIR)/debian/qtqr/usr/bin/qtqr install -m 644 $(CURDIR)/icon.png $(CURDIR)/debian/qtqr/usr/share/pixmaps/qtqr.png - -execute_after_dh_auto_clean: - echo $(DEB_VERSION_UPSTREAM) - rm -rf $(CURDIR)/build - find -name "*.qm" | xargs rm -f -- 2.30.2
>From 918bbe8a0b42207d57c7b70201344c7a2ee87f6a Mon Sep 17 00:00:00 2001 From: Nicolas Boulenguez <nico...@debian.org> Date: Thu, 19 May 2022 16:20:19 +0200 Subject: [PATCH 3/5] Update copyright years for the packaging --- debian/copyright | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/debian/copyright b/debian/copyright index 4439bbf..c724391 100644 --- a/debian/copyright +++ b/debian/copyright @@ -8,8 +8,9 @@ Copyright: 2011 David Green <david4...@gmail.com> License: GPL-3+ Files: debian/* -Copyright: 2012 Koichi Akabe <vbkaise...@gmail.com> - 2017 Boyuan Yang <073p...@gmail.com> +Copyright: 2022 Georges Khaznadar <georg...@debian.org> + 2012-2014 Koichi Akabe <vbkaise...@gmail.com> + 2017-2021 Boyuan Yang <073p...@gmail.com> 2019 Gianfranco Costamagna <locutusofb...@debian.org> License: GPL-3+ -- 2.30.2
>From edb05c34672c8f9127f3365095599f41c13af5c8 Mon Sep 17 00:00:00 2001 From: Nicolas Boulenguez <nico...@debian.org> Date: Thu, 19 May 2022 16:21:24 +0200 Subject: [PATCH 4/5] debian/rules: prefer Make loops over shell loops so that each executed command is visible in logs. --- debian/rules | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/debian/rules b/debian/rules index 2925b96..e906aad 100755 --- a/debian/rules +++ b/debian/rules @@ -5,8 +5,11 @@ export QT_SELECT := 5 %: dh $@ --buildsystem=pybuild -execute_after_dh_auto_build: - (for i in $(CURDIR)/qtqr_*.ts; do lrelease -nounfinished $$i -qm $$(echo $$i | sed -e 's/ts$$/qm/g'); done) +ts = $(wildcard qtqr_*.ts) +qm = $(ts:ts=qm) +execute_after_dh_auto_build: $(qm) +$(qm): %.qm: %.ts + lrelease -nounfinished $< -qm $@ execute_after_dh_auto_install: install -m 644 $(CURDIR)/qtqr.py $(CURDIR)/debian/qtqr/usr/bin/qtqr -- 2.30.2
>From 3b769904826760d932f7b0f4e803b7aef45ac813 Mon Sep 17 00:00:00 2001 From: Nicolas Boulenguez <nico...@debian.org> Date: Thu, 19 May 2022 16:22:41 +0200 Subject: [PATCH 5/5] debian/rules: remove unneeded CURDIR The policy requires that main targets are executed in the top source directory. --- debian/rules | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/debian/rules b/debian/rules index e906aad..66bd901 100755 --- a/debian/rules +++ b/debian/rules @@ -12,5 +12,5 @@ $(qm): %.qm: %.ts lrelease -nounfinished $< -qm $@ execute_after_dh_auto_install: - install -m 644 $(CURDIR)/qtqr.py $(CURDIR)/debian/qtqr/usr/bin/qtqr - install -m 644 $(CURDIR)/icon.png $(CURDIR)/debian/qtqr/usr/share/pixmaps/qtqr.png + install -m 644 qtqr.py debian/qtqr/usr/bin/qtqr + install -m 644 icon.png debian/qtqr/usr/share/pixmaps/qtqr.png -- 2.30.2