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
|
#!/usr/bin/make -f
# -*- makefile -*-
## use hardening some flags
DPKG_EXPORT_BUILDFLAGS = 1
DEB_BUILD_MAINT_OPTIONS=hardening=+format,-fortify,+stackprotector,+relro
export DEB_BUILD_MAINT_OPTIONS
include /usr/share/dpkg/buildflags.mk
## only link what is needed
LDFLAGS+=-Wl,--as-needed
DEB_HOST_ARCH_OS := $(shell dpkg-architecture -qDEB_HOST_ARCH_OS)
archconfflags :=
ifeq ($(DEB_HOST_ARCH_OS),linux)
archconfflags += --enable-alsa
else
archconfflags += --disable-alsa
endif
archconfflags += --enable-jack
ifeq ($(DEB_HOST_ARCH_OS),kfreebsd)
CFLAGS+=-D__BSD_VISIBLE
endif
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
%:
dh --with autoreconf $@
override_dh_autoreconf:
mkdir -p m4/generated
dh_autoreconf
override_dh_auto_configure:
CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" dh_auto_configure -- --program-transform-name='s/pd$$/puredata/' $(archconfflags)
override_dh_install:
dh_install -X "*.la" -X "LICENSE.txt"
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
|