rules 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. #! /usr/bin/make -f
  2. #
  3. # debian/rules
  4. # Part of Debian ‘inform6-library’ package.
  5. #
  6. # Copyright © 2009–2016 Ben Finney <ben+debian@benfinney.id.au>
  7. #
  8. # This is free software; you may copy, modify, and/or distribute this
  9. # work under the terms of the GNU General Public License as published
  10. # by the Free Software Foundation; version 3 of that License or later.
  11. # No warranty expressed or implied.
  12. # See the file '/usr/share/common-licenses/GPL-3' for details.
  13. %:
  14. dh $@
  15. .PHONY: get-packaged-orig-source
  16. get-packaged-orig-source:
  17. $(uscan-download-source) --download-current-version
  18. # Policy §4.9 strongly recommends the ‘get-orig-source’ target:
  19. # “This target is optional, but providing it if possible is a good idea.”
  20. #
  21. # This target is an anomaly: per Policy §4.9, it fetches the *latest*
  22. # upstream source, regardless of this package's version. To fetch the
  23. # upstream source corresponding to this package's *declared* version
  24. # in ‘debian/changelog’, use ‘get-packaged-orig-source’ instead.
  25. .PHONY: get-orig-source
  26. get-orig-source:
  27. $(uscan-download-source)
  28. get-orig-source get-packaged-orig-source: http_proxy =
  29. get-orig-source get-packaged-orig-source: makefile_dir = $(abspath $(dir $(firstword ${MAKEFILE_LIST})))
  30. get-orig-source get-packaged-orig-source: package_dir = $(abspath $(dir ${makefile_dir}))
  31. define uscan-download-source
  32. uscan --noconf --verbose \
  33. --force-download \
  34. --rename \
  35. --destdir=$(CURDIR) \
  36. --check-dirname-level=0 ${package_dir}
  37. endef # uscan-download-source
  38. # Local variables:
  39. # mode: makefile
  40. # coding: utf-8
  41. # End:
  42. # vim: filetype=make fileencoding=utf-8 :