| 1 |
|
| 2 |
|
| 3 |
include /usr/share/dpkg/architecture.mk |
| 4 |
include /usr/share/dpkg/buildopts.mk |
| 5 |
|
| 6 |
export DEB_BUILD_MAINT_OPTIONS = hardening=+all |
| 7 |
|
| 8 |
CONFIGURE_EXTRA = CXX_WERROR=no --with-sqlite3 |
| 9 |
JOPT=$(addprefix -j,$(DEB_BUILD_OPTION_PARALLEL)) |
| 10 |
|
| 11 |
%: |
| 12 |
dh $@ |
| 13 |
|
| 14 |
override_dh_auto_configure:: |
| 15 |
dh_auto_configure --builddirectory=debian/obj/apl -- \ |
| 16 |
$(CONFIGURE_EXTRA) |
| 17 |
override_dh_auto_configure:: |
| 18 |
dh_auto_configure --builddirectory=debian/obj/libapl -- \ |
| 19 |
$(CONFIGURE_EXTRA) --with-libapl |
| 20 |
|
| 21 |
override_dh_auto_build:: |
| 22 |
dh_auto_build --builddirectory=debian/obj/apl -- $(JOPT) |
| 23 |
override_dh_auto_build:: |
| 24 |
dh_auto_build --builddirectory=debian/obj/libapl -- $(JOPT) |
| 25 |
|
| 26 |
override_dh_auto_test:: |
| 27 |
dh_auto_test --builddirectory=debian/obj/apl |
| 28 |
override_dh_auto_test:: |
| 29 |
dh_auto_test --builddirectory=debian/obj/libapl |
| 30 |
|
| 31 |
override_dh_auto_install:: |
| 32 |
dh_auto_install --builddirectory=debian/obj/apl |
| 33 |
override_dh_auto_install:: |
| 34 |
dh_auto_install --builddirectory=debian/obj/libapl |
| 35 |
execute_after_dh_auto_install: |
| 36 |
@echo "Remove .la files; these are private plugin modules, not public libraries" |
| 37 |
find debian/tmp/usr/lib -name "*.la" -delete |
| 38 |
@echo "Fix shebangs: upstream uses /usr/local/bin/apl; debian uses /usr/bin/." |
| 39 |
@echo 'Handle both "#!/usr/local/bin/apl" and "#! /usr/local/bin/apl" forms' |
| 40 |
find debian/tmp/usr/lib -name "*.apl" | \ |
| 41 |
xargs grep -lP '^#!\s*/usr/local/bin/apl' | \ |
| 42 |
xargs -r sed -i 's|^#!\s*/usr/local/bin/apl|#!/usr/bin/apl|' |
| 43 |
@echo "APL workspace files are library files loaded via )LOAD, not standalone scripts;" |
| 44 |
@echo "ensure they are not executable" |
| 45 |
find debian/tmp/usr/lib -name "*.apl" -executable -exec chmod --changes 644 {} + |
| 46 |
|
| 47 |
execute_after_dh_installinfo: |
| 48 |
-rm -f --verbose debian/apl/usr/share/info/dir.gz |
| 49 |
|
| 50 |
override_dh_shlibdeps: |
| 51 |
dh_shlibdeps --dpkg-shlibdeps-params=--ignore-missing-info |
| 52 |
|
| 53 |
override_dh_auto_clean:: |
| 54 |
dh_auto_clean --builddirectory=debian/obj/apl |
| 55 |
override_dh_auto_clean:: |
| 56 |
dh_auto_clean --builddirectory=debian/obj/libapl |