| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
export DEB_BUILD_MAINT_OPTIONS = hardening=+all |
| 7 |
|
| 8 |
FLAVORS = cli gui |
| 9 |
CONFIG = -Djack=enabled -Dqtversion=6 -Dlibsamplerate=enabled |
| 10 |
CONFIG_cli = -Dnogui=true -Drtaudio=disabled |
| 11 |
CONFIG_gui = -Dnogui=false -Drtaudio=enabled |
| 12 |
|
| 13 |
ifeq ($(strip $(filter $(DEB_HOST_ARCH), amd64 arm64 armhf i386)),) |
| 14 |
CONFIG += -Dnovs=true |
| 15 |
else |
| 16 |
QT_DEPENDS = \ |
| 17 |
qml6-module-qt5compat-graphicaleffects, \ |
| 18 |
qml6-module-qtqml-workerscript, \ |
| 19 |
qml6-module-qtquick-controls, \ |
| 20 |
qml6-module-qtquick-layouts, \ |
| 21 |
qml6-module-qtquick-templates, \ |
| 22 |
qml6-module-qtquick-window, \ |
| 23 |
qml6-module-qtwebchannel, \ |
| 24 |
qml6-module-qtwebengine |
| 25 |
endif |
| 26 |
|
| 27 |
|
| 28 |
|
| 29 |
builddir=debian/build/flavor- |
| 30 |
|
| 31 |
export QT_SELECT=qt6 |
| 32 |
DEB_SRCDIR = . |
| 33 |
|
| 34 |
%: |
| 35 |
dh $@ --sourcedirectory=$(DEB_SRCDIR) --buildsystem=meson |
| 36 |
|
| 37 |
|
| 38 |
override_dh_auto_configure-arch: $(patsubst %,configure_%,$(FLAVORS)) |
| 39 |
configure_%: |
| 40 |
dh_auto_configure -a -B $(builddir)$* -- $(strip $(CONFIG) $(CONFIG_$*)) |
| 41 |
|
| 42 |
|
| 43 |
override_dh_auto_build-arch: $(patsubst %,build_%,$(FLAVORS)) |
| 44 |
build_%: |
| 45 |
dh_auto_build -a -B $(builddir)$* |
| 46 |
|
| 47 |
|
| 48 |
|
| 49 |
override_dh_auto_test-arch: $(patsubst %,test_%,$(FLAVORS)) |
| 50 |
test_%: |
| 51 |
dh_auto_test -a -B $(builddir)$* |
| 52 |
|
| 53 |
|
| 54 |
override_dh_auto_install-arch: $(patsubst %,install_%,$(FLAVORS)) |
| 55 |
install_%: |
| 56 |
dh_auto_install -a -B $(builddir)$* |
| 57 |
-mv debian/tmp/usr/bin/jacktrip debian/tmp/usr/bin/jacktrip-$* |
| 58 |
|
| 59 |
mkdir -p debian/tmp/usr/share/man/man1/ |
| 60 |
test -e debian/tmp/usr/share/man/man1/jacktrip.1 || cp debian/jacktrip.1 debian/tmp/usr/share/man/man1/jacktrip.1 |
| 61 |
|
| 62 |
-mv debian/tmp/usr/share/man/man1/jacktrip.1 debian/tmp/usr/share/man/man1/jacktrip-$*.1 |
| 63 |
-mv debian/tmp/usr/share/man/man1/jacktrip.1.gz debian/tmp/usr/share/man/man1/jacktrip-$*.1.gz |
| 64 |
-find debian/tmp -type f -name "*.desktop" -exec sed -e "s|^\(Exec=jacktrip\)$$|\1-$*|" -i {} ";" |
| 65 |
|
| 66 |
override_dh_installchangelogs: |
| 67 |
dh_installchangelogs docs/changelog.yml |
| 68 |
|
| 69 |
override_dh_gencontrol: |
| 70 |
dh_gencontrol -- \ |
| 71 |
-Vqt:Depends="$(QT_DEPENDS)" |
| 72 |
|
| 73 |
|
| 74 |
|
| 75 |
DEB_COPYRIGHT_CHECK_IGNORE_REGEX = \ |
| 76 |
debian/.*|documentation/img/.*|docs/images/.*\.png|src/vs/.*\.png|src/images/.*\.png|src/images/jacktrip\.icns|src/gui/alt/.*\.png|src/gui/alt/Jacktrip\.ai|macos/jacktrip(_alt)?\.iconset/.*\.png|macos/jacktrip_alt\.icns |
| 77 |
|
| 78 |
.PHONY: licensecheck |
| 79 |
licensecheck: |
| 80 |
LANG=C.UTF-8 licensecheck \ |
| 81 |
-i "^($(DEB_COPYRIGHT_CHECK_IGNORE_REGEX))$$" \ |
| 82 |
--check '.*' --recursive --deb-machine --lines 0 * \ |
| 83 |
> debian/copyright_newhints |
| 84 |
cmp debian/copyright_hints debian/copyright_newhints \ |
| 85 |
&& rm debian/copyright_newhints |