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 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112
|
#!/usr/bin/make -f
# -*- makefile -*-
## use hardening some flags
DPKG_EXPORT_BUILDFLAGS = 1
# if you change values below, you might also need to fix d/salsa-ci.yml
DEB_BUILD_MAINT_OPTIONS=hardening=+format,-fortify,+stackprotector,+relro
export DEB_BUILD_MAINT_OPTIONS
include /usr/share/dpkg/buildflags.mk
include /usr/share/dpkg/pkg-info.mk
export DEB_CPPFLAGS_MAINT_APPEND=
## only link what is needed
export DEB_LDFLAGS_MAINT_APPEND=-Wl,--as-needed
archconfflags :=
ifeq ($(DEB_HOST_ARCH_OS),linux)
archconfflags += --enable-alsa
else
archconfflags += --disable-alsa
endif
archconfflags += --enable-jack
archconfflags += --without-local-portaudio --without-local-portmidi
ifeq ($(DEB_HOST_ARCH_OS),kfreebsd)
DEB_CPPFLAGS_MAINT_APPEND+=-D__BSD_VISIBLE
endif
## set timestamp for reproducible builds
DATE_FMT = %Y/%m/%d at %H:%M:%S UTC
ifdef SOURCE_DATE_EPOCH
BUILD_DATE ?= $(shell date -u -d "@$(SOURCE_DATE_EPOCH)" "+$(DATE_FMT)" 2>/dev/null || date -u -r "$(SOURCE_DATE_EPOCH)" "+$(DATE_FMT)" 2>/dev/null || date -u "+$(DATE_FMT)")
else
BUILD_DATE ?= $(shell date "+$(DATE_FMT)")
endif
CPPFLAGS_VERSION=-DPD_TIMESTAMP_STRING='\"compiled for Debian ($(DEB_VERSION)) on $(BUILD_DATE)\"' $(CPPFLAGS)
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
DEB_COPYRIGHT_CHECK_IGNORE_REGEX = \
^\./\.git|\./\.pc/.*|\./debian/|.*\.wav|.*\.aiff|.*\.png|.*\.jpg|.*\.ico|.*\.icns|.*\.gif|.*\.ttf|.*\.strings|.*\.zip|.*\.tgz$
%:
dh $@
override_dh_autoreconf:
mkdir -p m4/generated
dh_autoreconf
override_dh_auto_configure:
dh_auto_configure -- \
--program-transform-name='s/pd$$/puredata/' \
--libdir=/usr/lib/ \
$(archconfflags)
override_dh_auto_build: debian/gui-plugins/pd-gui-plugin.1
dh_auto_build -- CPPFLAGS="$(CPPFLAGS_VERSION)"
debian/gui-plugins/pd-gui-plugin.1: debian/gui-plugins/pd-gui-plugin
help2man -N -n "enable or disable a Pd GUI plugin" $< > $@
override_dh_install:
find debian/tmp -type f -name "pd.pc" -exec \
sed -e 's|^Libs: .*|Libs:|' -e 's| -fPIC||' -i {} +
dh_install -X "*.la" -X "LICENSE.txt" -X "Makefile.am"
rm -rf debian/puredata-doc/usr/share/puredata/doc/1.manual/1.introduction.txt
rm -rf debian/puredata-doc/usr/share/puredata/doc/5.reference
rm -rf debian/puredata-doc/usr/share/puredata/doc/7.stuff
override_dh_auto_clean:
-rm -f debian/gui-plugins/pd-gui-plugin.1
dh_auto_clean
override_dh_installchangelogs:
dh_installchangelogs src/CHANGELOG.txt
override_dh_fixperms:
dh_fixperms
ifneq (,$(findstring puredata-extra, $(shell dh_listpackages)))
find debian/puredata-extra/ -type f -name "*.pd_linux" -exec \
chmod 0644 {} +
endif
ifneq (,$(findstring puredata-gui, $(shell dh_listpackages)))
find debian/puredata-gui/ -type f -name "pkg_mkIndex.tcl" -exec \
chmod 0755 {} +
endif
override_dh_shlibdeps:
dh_shlibdeps
ifneq (,$(findstring puredata-extra, $(shell dh_listpackages)))
find debian/puredata-extra/ -type f -name "*.pd_linux" -exec \
dpkg-shlibdeps -Tdebian/puredata-extra.substvars {} +
endif
override_dh_strip:
dh_strip
ifneq (,$(findstring puredata-extra, $(shell dh_listpackages)))
find debian/puredata-extra/ -type f -name "*.pd_linux" -exec \
strip --remove-section=.comment --remove-section=.note --strip-unneeded {} +
endif
override_dh_compress:
dh_compress -X.pd -X.wav -X.aiff -X.txt
licensecheck:
LANG=C.UTF-8 licensecheck -i "$(DEB_COPYRIGHT_CHECK_IGNORE_REGEX)" --deb-machine -r . \
> debian/copyright_newhints
cmp debian/copyright_hints debian/copyright_newhints \
&& rm debian/copyright_newhints
|