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 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161
|
#!/usr/bin/make -f
#enable hardening
export DEB_BUILD_MAINT_OPTIONS=hardening=+all
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
## use hardening flags
DPKG_EXPORT_BUILDFLAGS = 1
include /usr/share/dpkg/buildflags.mk
include /usr/share/dpkg/architecture.mk
include /usr/share/dpkg/pkg-info.mk
FLAVORS=pd32
builddir=debian/build/flavor-
pd64ext=$(shell /usr/share/puredata/debian/dekencpu $(DEB_HOST_ARCH))
ifneq ($(pd64ext), )
FLAVORS += pd64
endif
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
export PKGVERSION_CODENAME="Debian/$(DEB_VERSION)"
CPPFLAGS+=-DGEM_VERSION_CODENAME='"$(PKGVERSION_CODENAME)"'
archconfflags := \
--libdir=\$${exec_prefix}/lib \
--libexecdir=\$${exec_prefix}/lib \
--with-pd=/usr/include/pd \
--without-ALL \
--with-glfw3 \
--with-sdl \
--with-ftgl \
--with-fribidi \
--with-ImageMagick \
--with-jpeg \
--with-tiff \
--with-lqt \
--with-libquicktime \
--with-gmerlin_avdec \
--with-libmpeg3 \
--without-v4l \
--without-libv4l1 \
--with-v4l2 \
--with-libv4l2 \
--with-libdv \
--with-libdc1394_2 \
--with-libiec61883 \
--with-libraw1394 \
--with-unicap \
--with-libunicap \
--with-libvncclient \
--with-libvlc \
--with-DeckLink=local \
--with-assimp \
--with-build-date="on $(BUILD_DATE)" \
--with-default-font=/usr/share/fonts/truetype/dejavu/DejaVuSans.ttf
ifeq ($(DEB_HOST_ARCH_CPU), i386)
archconfflags += \
--disable-mmx \
$(empty)
endif
ifeq ($(DEB_HOST_ARCH_CPU), amd64)
archconfflags += \
--enable-sse2 \
$(empty)
endif
ifeq ($(DEB_HOST_ARCH_CPU), x32)
archconfflags += \
--enable-sse2 \
$(empty)
endif
ifeq ($(DEB_HOST_ARCH_CPU), ppc64el)
archconfflags += \
--disable-altivec \
$(empty)
CPPFLAGS+=-U__VEC__
endif
CONFIG_pd32=--with-extension=pd_linux
CONFIG_pd64=--with-extension=linux-$(pd64ext)-64.so --with-floatsize=64 --disable-plugins
%:
dh $@
override_dh_auto_configure: $(patsubst %,configure_%,$(FLAVORS))
configure_%:
CXXFLAGS="$(CXXFLAGS)" CFLAGS="$(CFLAGS)" dh_auto_configure --builddir $(builddir)$* -- \
$(strip $(archconfflags) $(CONFIG_$*))
override_dh_auto_build-arch: $(patsubst %,build_%,$(FLAVORS))
build_%:
dh_auto_build -a --builddir=$(builddir)$* || (cat $(builddir)$*/config.log && exit 1)
override_dh_auto_install: $(patsubst %,install_%,$(FLAVORS))
install_%:
dh_auto_install -B $(builddir)$*
override_dh_auto_test:
# no actual 'make test' target
override_dh_install:
find src/Output/ -name "*.cpp" -exec \
./debian/scripts/gemdefaultwindow.sh abstractions/gemdefaultwindow.pd.in {} +
-find debian/tmp/ -name gemdefaultwindow.pd -delete
# remove libtool files, they are not needed
-find debian/*/ -name '*.la' -print -delete
# remove some assets
-find debian/tmp/ -name '*.ttf' -delete
#-find debian/tmp/ -name '*.avi' -delete
#-find debian/tmp/ -name '*.mov' -delete
#-find debian/tmp/ -name '*.mpg' -delete
dh_install
# the following COPYING only contains license information for vera.ttf
# which is not included in the Debian package
-rm debian/gem-doc/usr/share/gem/examples/data/COPYING.txt
# remove extra LICENSE files for gem-extra
-rm -f debian/gem-extra/usr/lib/pd/extra/pix_mano/LICENSE.txt
-rm -f debian/gem-extra/usr/lib/pd/extra/pix_drum/LICENSE.txt
override_dh_installalternatives:
echo "With dh>=13.1 there's a new way to handle alternatives" 1>&2
echo "consider using it" 1>&2
override_dh_fixperms:
dh_fixperms -Xpd-gem
-chmod 0755 debian/gem/usr/bin/pd-gem
-find debian -name '*.pd_linux' -exec \
chmod 0644 {} +
override_dh_compress:
dh_compress -X.pd -X.TIF -X.obj
DEB_COPYRIGHT_CHECK_IGNORE_REGEX = \
debian/.*|doc/manual/.*\.jpg|doc/manual/.*\.gif|examples/10\.glsl/.*\.jpg|examples/12\.multi_screen_projection\/.*\.jpg|examples/data/.*|.*\.pdf|build/osx-dmginstaller/DS_Store|.\/build/travis-ci/travisci.enc
# 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
|