#!/usr/bin/make -f export DH_VERBOSE = 1 export DEB_BUILD_MAINT_OPTIONS := hardening=+all export DH_ALWAYS_EXCLUDE := COPYING:LICENSE export LANG:=C INSTALL_DIR=${CURDIR}/debian/lazbuild override_dh_auto_build-indep: # Nothing to do in build-indep override_dh_auto_build-arch: make FPC=/usr/bin/fpc OPT='@hardening -gl -gw -Crtoi' lazbuild override_dh_auto_install-arch: # Fix permissions chmod a-x lcl/include/screen.inc chmod a+x components/aggpas/examples/build_find_compile/build* chmod a+x components/fpweb/images/make_fpweb_images_res.sh chmod a+x components/rtticontrols/fpdoc/*.sh # Remove extra license files -rm components/lazdebuggers/lazdebuggerfplldb/gpl*.txt -rm components/lazdebuggers/lazdebuggerlldb/gpl*.txt -rm components/lazreport/license.txt -rm lcl/interfaces/qt?/cbindings/COPYING.TXT # Remove empty MacOS folder -rmdir components/chmhelp/lhelp/lhelp.app/Contents/MacOS install -Dm755 lazbuild ${INSTALL_DIR}/usr/bin/lazbuild # check hardening (it varies by architecture) -hardening-check -Bsfqx ${INSTALL_DIR}/usr/bin/lazbuild # Install folders needed for lazbuild mkdir -p ${INSTALL_DIR}/usr/lib/lazarus cp -a components ${INSTALL_DIR}/usr/lib/lazarus cp -a ide ${INSTALL_DIR}/usr/lib/lazarus cp -a images ${INSTALL_DIR}/usr/lib/lazarus cp -a lcl ${INSTALL_DIR}/usr/lib/lazarus cp -a packager ${INSTALL_DIR}/usr/lib/lazarus override_dh_strip_nondeterminism: # strip_nondeterminism not needed, takes too long %: dh $@