#! /usr/bin/make -f # debian/rules # Part of Debian ‘python-adventure’ package. # # Copyright © 2009–2016 Ben Finney # This is free software; you may copy, modify, and/or distribute this work # under the terms of the GNU General Public License, version 3 or later. # No warranty expressed or implied. # See the file ‘/usr/share/common-licenses/GPL-3’ for details. # Send HTTP traffic to the “discard” service during packaging actions. export http_proxy = http://127.0.1.1:9/ export https_proxy = ${http_proxy} APP_PACKAGE = colossal-cave-adventure working_dir = debian/${APP_PACKAGE} package_share_dir = usr/share/${APP_PACKAGE} export PYBUILD_INSTALL_ARGS ?= \ --install-lib=${package_share_dir}/ \ --install-scripts=${package_share_dir}/ ### %: dh $@ --with python3 --buildsystem=pybuild ### .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.” .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: https_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) -r ${GENERATED_FILES} .PHONY: override_dh_python3 override_dh_python3: dh_python3 -p ${APP_PACKAGE} ${working_dir}/${package_share_dir}/ find ${working_dir}/${package_share_dir}/ \ -type d -name '__pycache__' -exec $(RM) -r \{} + ### # Local Variables: # mode: makefile # coding: utf-8 # End: # vim: filetype=make fileencoding=utf-8 :