#!/usr/bin/make -f # Export all hardening flags export DEB_BUILD_MAINT_OPTIONS = hardening=+all FLAGS_profanity_light = \ --buildtype=release \ -Dc-plugins=enabled \ -Domemo=enabled \ -Domemo-backend=libomemo-c \ -Dotr=enabled \ -Dpgp=enabled FLAGS_profanity_full = $(FLAGS_profanity_light) \ -Dpython-plugins=enabled \ -Dnotifications=enabled \ -Dicons-and-clipboard=enabled \ -Dgdk-pixbuf=enabled \ -Domemo-qrcode=enabled \ -Dxscreensaver=enabled BUILDDIR_LIGHT := $(CURDIR)/debian/build-light BUILDDIR_FULL := $(CURDIR)/debian/build-full %: dh $@ --buildsystem=meson override_dh_auto_configure: src/gitversion.h.in dh_auto_configure --builddirectory=$(BUILDDIR_LIGHT) -- $(FLAGS_profanity_light) PYTHON_VERSION=3; export PYTHON_VERSION; \ dh_auto_configure --builddirectory=$(BUILDDIR_FULL) -- $(FLAGS_profanity_full) override_dh_auto_build: dh_auto_build --builddirectory=$(BUILDDIR_LIGHT) dh_auto_build --builddirectory=$(BUILDDIR_FULL) fix_whatis: -mkdir man for manpage in docs/*.1; do \ sed '0,/^\/.*/s|^\(/.*\)|\1 \\- the Profanity \1 command.|' < $$manpage > man/$$(basename $$manpage); \ done override_dh_auto_install: fix_whatis dh_auto_install --builddirectory=$(BUILDDIR_LIGHT) --destdir=$(BUILDDIR_LIGHT).inst dh_auto_install --builddirectory=$(BUILDDIR_FULL) --destdir=$(BUILDDIR_FULL).inst override_dh_auto_test: dh_auto_test --builddirectory=$(BUILDDIR_LIGHT) dh_auto_test --builddirectory=$(BUILDDIR_FULL) override_dh_auto_clean: dh_auto_clean rm -fr $(BUILDDIR_FULL) $(BUILDDIR_LIGHT) $(BUILDDIR_FULL).inst $(BUILDDIR_LIGHT).inst src/gitversion.h.in: echo "#ifndef PROF_GIT_BRANCH" > $@ echo "#define PROF_GIT_BRANCH \"debian/experimental\"" >> $@ echo "#endif" >> $@ echo "#ifndef PROF_GIT_REVISION" >> $@ echo "#define PROF_GIT_REVISION \"$(dpkg-parsechangelog --show-field Version)\"" >> $@ echo "#endif" >> $@ .PHONY: fix_whatis