#!/usr/bin/make -f # Copyright © 2025 IOhannes m zmölnig #enable hardening export DEB_BUILD_MAINT_OPTIONS=hardening=+all pd64ext:=$(shell /usr/share/puredata/debian/dekencpu $(DEB_HOST_ARCH)) FLAVORS = single double builddir=debian/build/flavor- CONFIG = \ -DVST2=ON -DVST2DIR=/usr/include \ -DVST3=ON -DVST3DIR=/usr/include/vst3sdk \ -DPD_INSTALLDIR=/usr/lib/pd/extra \ -DSC_INSTALLDIR=/usr/share/SuperCollider/Extensions/ \ -DSC_INCLUDEDIR=/usr/include/SuperCollider \ $(empty) ## per flavor configure options CONFIG_single = -DSC=ON -DPD=ON CONFIG_double = -DSC=OFF -DPD=ON -DPD_EXTENSION=linux-$(pd64ext)-64.so -DPD_FLOATSIZE=64 %: dh $@ override_dh_auto_configure: $(patsubst %,configure_%,$(FLAVORS)) override_dh_auto_build-arch: $(patsubst %,build_%,$(FLAVORS)) override_dh_auto_install: $(patsubst %,install_%,$(FLAVORS)) mkdir -p $(CURDIR)/debian/tmp/usr/lib/SuperCollider/plugins -mv $(CURDIR)/debian/tmp/usr/share/SuperCollider/Extensions/VSTPlugin/plugins $(CURDIR)/debian/tmp/usr/lib/SuperCollider/plugins/VSTPlugin configure_%: mkdir -p $(builddir)$* dh_auto_configure --builddirectory=$(builddir)$* -- $(strip $(CONFIG) $(CONFIG_$*)) build_%: dh_auto_build -a --builddirectory=$(builddir)$* install_%: dh_auto_install --builddirectory=$(builddir)$* DEB_COPYRIGHT_CHECK_IGNORE_REGEX = \ debian/.*|sc/HelpSource/Classes/[^/]*\.jpg|sc/HelpSource/Classes/noparams\.JPG|sc/icons/sc_cube\.ico # licensecheck v1 .PHONY: licensecheck licensecheck: LANG=C.UTF-8 licensecheck \ -i "^($(DEB_COPYRIGHT_CHECK_IGNORE_REGEX))$$" \ --check '.*' --recursive --deb-machine --lines 0 * \ > debian/copyright_newhints cmp debian/copyright_hints debian/copyright_newhints \ && rm debian/copyright_newhints