#!/usr/bin/make -f export DEB_BUILD_MAINT_OPTIONS := hardening=+bindnow export DH_ALWAYS_EXCLUDE := COPYING:LICENSE export LANG:=C # Set FPCVER FPCVER=$(shell fpc -iV) # Get directories CURDIR:=$(shell pwd) TMP_DIR=$(CURDIR)/debian/tmp # Get current upstream CGE version as that is used in the path of it's files CGEVERSION := $(shell dpkg-query -f '$${Version}' -W 'fp-units-castle-game-engine' | sed -e 's/-[^-]*$$//g;s/+dfsg[0-9]*//g') # Set default compilation options DEB_HOST_MULTIARCH := $(shell dpkg-architecture -qDEB_HOST_MULTIARCH) LDFLAGS=$(strip $(shell DEB_BUILD_MAINT_OPTIONS=$(DEB_BUILD_MAINT_OPTIONS) \ dpkg-buildflags --get LDFLAGS | \ sed -e 's/-Wl,//g' -e 's/,/ /g' -e 's1-specs=/usr/share/dpkg/.*\.specs11')) BUILDOPTS=-k"${LDFLAGS}"\ -dRELEASE \ -Mobjfpc \ -Sh \ -Ci \ -Sm \ -Sc \ -Sg \ -Si \ -O2 \ -Xs \ -Fu/usr/lib/${DEB_HOST_MULTIARCH}/fp-units-${FPCVER}/castle-game-engine-${CGEVERSION}/ #export DH_VERBOSE=1 %: dh ${@} override_dh_auto_clean: $(MAKE) clean-code dh_auto_clean override_dh_auto_build-arch: mkdir -p $(TMP_DIR) # Once pasdoc ships file_to_pascal_string, the next lines can be simplified fpc -FE$(TMP_DIR) debian/file_to_pascal_string.dpr PATH=${PATH}:$(TMP_DIR) $(MAKE) generate-code fpc $(BUILDOPTS) code/view3dscene.lpr fpc $(BUILDOPTS) code/tovrmlx3d.lpr inkscape --export-width=48 --export-height=48 desktop/view3dscene.svg --export-png=desktop/view3dscene.png override_dh_auto_test: # Code to run the package test suite. # We need the directories where the files to test are to be # writeable by the current (non-root) user. Copying them in # the current tree is the easiest way to accomplish that. mkdir -p $(TMP_DIR)/whitedune cp -R /usr/share/doc/whitedune-docs/ $(TMP_DIR)/whitedune PATH=$$PATH:$(CURDIR)/code jenkins_scripts/run_tests.sh $(TMP_DIR)/run_tests_errors.txt $(TMP_DIR)/run_tests_output.txt cat $(TMP_DIR)/run_tests_errors.txt override_dh_auto_install: