1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92
|
#!/usr/bin/make -f
# Let's try to cut down noisy symbols to the official API
export DEB_CFLAGS_MAINT_APPEND = -fvisibility=hidden
export DEB_CXXFLAGS_MAINT_APPEND = -fvisibility=hidden
-include /usr/share/cdbs/1/rules/upstream-tarball.mk
-include /usr/share/cdbs/1/rules/utils.mk
include /usr/share/cdbs/1/rules/debhelper.mk
include /usr/share/cdbs/1/class/makefile.mk
# suppress optional build-dependencies
CDBS_BUILD_DEPENDS_rules_upstream-tarball =
CDBS_BUILD_DEPENDS_rules_utils_copyright-check =
# Explicitly require these versions until cdbs knows about multiarch
CDBS_BUILD_DEPENDS += , cdbs (>= 0.4.93~), debhelper (>= 9)
CDBS_BUILD_DEPENDS_rules_debhelper_buildinfo =
# Set tag to full 40 char git tag for git snapshot release
tag = $(DEB_UPSTREAM_TARBALL_VERSION)
DEB_UPSTREAM_URL = https://github.com/jackaudio/jack2/archive
DEB_UPSTREAM_TARBALL_BASENAME = $(tag)
DEB_UPSTREAM_TARBALL_SRCDIR = jack2-$(tag)
# unneeded and possibly sourceless binaries
DEB_UPSTREAM_REPACKAGE_EXCLUDES += *.a *.dll *.Lib
# unneeded sources copyright-protected without licence
DEB_UPSTREAM_REPACKAGE_EXCLUDES += ./windows/**.rc
# pure garbage in upstream tarball
DEB_UPSTREAM_REPACKAGE_EXCLUDES += .DS_Store
# Minimum assured version referenced upstream as library API/ABI
ABI = 0.118.0
WAF_EXTRA_ARGS = $(filter-out -j%,$(DEB_MAKE_EXTRA_ARGS))
waf-configure-options = --prefix=/usr --classic
waf-configure-options += --libdir=/usr/lib/$(DEB_HOST_MULTIARCH)
waf-configure-options += $(if $(filter linux,$(DEB_HOST_ARCH_OS)),--alsa --dbus)
waf-configure-options += $(if $(filter amd64 i386 powerpc,$(DEB_HOST_ARCH)),--firewire)
DEB_MAKE_INVOKE = $(WAF_EXTRA_ARGS) ./waf -v --destdir=$(CURDIR)/debian/tmp
DEB_MAKE_INSTALL_TARGET = install
# TODO: use distclean and drop related clean target, when (or if)
# upstream stop shipping waf dir
DEB_MAKE_CLEAN_TARGET = clean
clean::
rm -f .lock-wscript .lock-waf_linux2_build
find waflib -name "*.pyc" -delete || true
rm -f man/*.1
rm -rf build
rm -rf autooptions/__pycache__
DEB_DH_MAKESHLIBS_ARGS = -Xintime -Xinprocess -Xjack_alsa -Xjack_oss -Xjack_dummy -Xjack_firewire
# too noisy symbols, so only watch disappearing ones for now
DEB_DH_MAKESHLIBS_ARGS += -- -c1
# Generate (and cleanup) files containing variables static per build
infiles = $(filter-out debian/control.in, $(wildcard debian/*.in))
outfiles = $(basename $(infiles))
DEB_PHONY_RULES += $(outfiles)
pre-build:: $(outfiles)
$(outfiles): update-config debian/stamp-copyright-check
sed 's/__ABI__/$(ABI)/' <$@.in >$@
clean::
rm -f $(outfiles)
common-configure-arch common-configure-indep:: common-configure-impl
common-configure-impl:: debian/stamp-waf-configure
debian/stamp-waf-configure:
$(WAF_EXTRA_ARGS) ./waf configure $(waf-configure-options) $(DEB_MAKE_PARALLEL)
touch $@
clean::
rm -f debian/stamp-waf-configure
install/jackd2::
ifeq ($(DEB_HOST_ARCH_OS),linux)
dh_install -pjackd2 debian/tmp/usr/bin/alsa_in
dh_install -pjackd2 debian/tmp/usr/bin/alsa_out
dh_install -pjackd2 debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/jack/jack_alsa.so
dh_install -pjackd2 debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/jack/jack_alsarawmidi.so
dh_install -pjackd2 debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/jack/audioadapter.so
dh_install -pjackd2 debian/tmp/usr/share/dbus-1/*
endif
binary-install/jackd2::
dh_python3 -pjackd2
|