#!/usr/bin/make -f # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 export DEB_BUILD_MAINT_OPTIONS = hardening=+all CPPFLAGS:=$(shell dpkg-buildflags --get CPPFLAGS) CFLAGS:=$(shell dpkg-buildflags --get CFLAGS) CXXFLAGS:=$(shell dpkg-buildflags --get CXXFLAGS) LDFLAGS:=$(shell dpkg-buildflags --get LDFLAGS) LDFLAGS2:=-Wl,-z,defs -Wl,-as-needed -Wl,--no-undefined DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH) RENPY_DEPS_INSTALL="/usr::/usr/lib/$(DEB_HOST_MULTIARCH)" %: dh $@ --with python2,sphinxdoc override_dh_install-indep: chmod +x renpy.py # Convert hicolor MacOS icons to png icns2png -x -s 128x128 -d 32 launcher/icon.icns mv icon_128x128x32.png renpy.png icns2png -x -s 128x128 -d 32 the_question/icon.icns mv icon_128x128x32.png renpy-thequestion.png dh_install override_dh_auto_build: find */ -name "*.py" | while read F; do chmod --verbose 644 "$$F"; done export RENPY_DEPS_INSTALL=$(RENPY_DEPS_INSTALL) ; \ CFLAGS="$(CFLAGS) $(CPPFLAGS)" \ LDFLAGS="$(LDFLAGS) $(LDFLAGS2)" \ cd module && python$* setup.py build export http_proxy=127.0.0.1:9 PYTHONPATH=. sphinx-build -N -bhtml sphinx/source/ build/html # HTML generator override_dh_auto_install: export RENPY_DEPS_INSTALL=$(RENPY_DEPS_INSTALL) ; \ cd module && python$* setup.py install \ --no-compile \ --root=$(CURDIR)/debian/python-renpy \ ; override_dh_compress: dh_compress --exclude=.js --exclude=.pdf --exclude=.py --exclude=.txt override_dh_clean: dh_clean rm -fv `find . -name "*.pyc"` rm -fv `find . -name "*.so"` rm -fv `find . -name "*.o"` rm -rf module/build/ rm -fv module/gen/* $(RM) renpy.png renpy-thequestion.png get-orig-source: uscan --download-current-version --force-download --repack --compression xz