1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889 |
- #! /usr/bin/make -f
- #
- # debian/rules
- # Part of Debian ‘inform6-compiler’ package.
- #
- # Copyright © 2009–2016 Ben Finney <bignose@debian.org>
- #
- # This is free software; you may copy, modify, and/or distribute this
- # work under the terms of the GNU General Public License as published
- # by the Free Software Foundation; version 3 of that License or later.
- # No warranty expressed or implied.
- # See the file '/usr/share/common-licenses/GPL-3' for details.
- export DEB_BUILD_MAINT_OPTIONS = hardening=+all
- DPKG_EXPORT_BUILDFLAGS = 1
- include /usr/share/dpkg/buildflags.mk
- package_resources_dir = /usr/share/inform6
- inform_library = ${package_resources_dir}/library
- inform_modules = ${package_resources_dir}/modules
- export CFLAGS
- CFLAGS += -DInclude_Directory="\"${inform_library}\""
- CFLAGS += -DModule_Directory="\"${inform_modules}\""
- ifeq ($(dpkg-architecture --query DEB_HOST_ARCH_BITS),64)
- # From ‘header.h’: “for Unix under gcc”
- CFLAGS += -DUNIX
- else
- # From ‘header.h’: “for 64-bit Unix under gcc”
- CFLAGS += -DUNIX64
- endif # DEB_HOST_ARCH_BITS
- MAKEFILE = ${CURDIR}/Makefile
- GENERATED_FILES += ${MAKEFILE}
- %:
- dh $@
- .PHONY: get-packaged-orig-source
- get-packaged-orig-source:
- $(uscan-download-source) --download-current-version
- # Policy §4.9 strongly recommends the ‘get-orig-source’ target:
- # “This target is optional, but providing it if possible is a good idea.”
- #
- # This target is an anomaly: per Policy §4.9, it fetches the *latest*
- # upstream source, regardless of this package's version. To fetch the
- # upstream source corresponding to this package's *declared* version
- # in ‘debian/changelog’, use ‘get-packaged-orig-source’ instead.
- .PHONY: get-orig-source
- get-orig-source:
- $(uscan-download-source)
- get-orig-source get-packaged-orig-source: http_proxy =
- get-orig-source get-packaged-orig-source: makefile_dir = $(abspath $(dir $(firstword ${MAKEFILE_LIST})))
- get-orig-source get-packaged-orig-source: package_dir = $(abspath $(dir ${makefile_dir}))
- define uscan-download-source
- uscan --noconf --verbose \
- --force-download \
- --rename \
- --destdir=$(CURDIR) \
- --check-dirname-level=0 ${package_dir}
- endef # uscan-download-source
- .PHONY: override_dh_auto_clean
- override_dh_auto_clean:
- dh_auto_clean
- $(RM) ${GENERATED_FILES}
- .PHONY: override_dh_auto_build
- override_dh_auto_build:
- cp ${CURDIR}/debian/Makefile.upstream ${MAKEFILE}
- dh_auto_build
- .PHONY: override_dh_installchangelogs
- override_dh_installchangelogs:
- dh_installchangelogs ReleaseNotes.html
- # Local variables:
- # mode: makefile
- # coding: utf-8
- # End:
- # vim: filetype=make fileencoding=utf-8 :
|