Commit e02a0ce63304267e6b39a2ff85634eb3486a584c

Authored by Ben Finney
1 parent f7aceaf9

Add build targets recommended by Debian Policy §4.9.

Showing 2 changed files with 29 additions and 0 deletions   Show diff stats
debian/changelog
... ... @@ -3,6 +3,7 @@ comixcursors (0.9-2) UNRELEASED; urgency=medium
3 3 * Use current HTTPS URL for copyright format reference.
4 4 * Update copyright years.
5 5 * Specify current VCS for Debian packaging work.
  6 + * Add build targets recommended by Debian Policy §4.9.
6 7  
7 8 --
8 9  
... ...
debian/rules
... ... @@ -92,6 +92,34 @@ override_dh_auto_clean:
92 92 make clean
93 93  
94 94  
  95 +.PHONY: get-packaged-orig-source
  96 +get-packaged-orig-source:
  97 + $(uscan-download-source) --download-current-version
  98 +
  99 +# Policy §4.9 strongly recommends the ‘get-orig-source’ target:
  100 +# “This target is optional, but providing it if possible is a good idea.”
  101 +#
  102 +# This target is an anomaly: per Policy §4.9, it fetches the *latest*
  103 +# upstream source, regardless of this package's version. To fetch the
  104 +# upstream source corresponding to this package's *declared* version
  105 +# in ‘debian/changelog’, use ‘get-packaged-orig-source’ instead.
  106 +.PHONY: get-orig-source
  107 +get-orig-source:
  108 + $(uscan-download-source)
  109 +
  110 +get-orig-source get-packaged-orig-source: http_proxy =
  111 +get-orig-source get-packaged-orig-source: makefile_dir = $(abspath $(dir $(firstword ${MAKEFILE_LIST})))
  112 +get-orig-source get-packaged-orig-source: package_dir = $(abspath $(dir ${makefile_dir}))
  113 +
  114 +define uscan-download-source
  115 + uscan --noconf --verbose \
  116 + --force-download \
  117 + --rename \
  118 + --destdir=$(CURDIR) \
  119 + --check-dirname-level=0 ${package_dir}
  120 +endef # uscan-download-source
  121 +
  122 +
95 123 .PHONY: override_dh_auto_build
96 124 override_dh_auto_build:
97 125 # Skip auto-detection of build tool.
... ...