File: rules

package info (click to toggle)
gem 1:0.94-3
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 25,320 kB
  • sloc: cpp: 174,266; ansic: 42,129; makefile: 3,848; sh: 1,096; objc: 389
file content (138 lines) | stat: -rwxr-xr-x 3,746 bytes parent folder | download
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
#!/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

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)"'

ifeq ($(DEB_HOST_ARCH_CPU), ppc64el)
  CXXFLAGS+=-m64 -mcpu=powerpc
  CFLAGS+=-m64 -mcpu=powerpc
endif


archconfflags := \
	--libdir=\$${exec_prefix}/lib \
	--libexecdir=\$${exec_prefix}/lib \
	--with-pd=/usr/include/pd \
	--with-extension=pd_linux \
	--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

DEB_COPYRIGHT_CHECK_IGNORE_REGEX = \
	^\./\.git/.*|\.\/\.pc/.*|\./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$

%:
	dh $@

override_dh_auto_clean:
	dh_clean
	-rm -f gemdefaultwindow-*.pd

override_dh_auto_configure:
	CXXFLAGS="$(CXXFLAGS)" CFLAGS="$(CFLAGS)" dh_auto_configure -- $(archconfflags)

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

licensecheck:
	licensecheck -i "$(DEB_COPYRIGHT_CHECK_IGNORE_REGEX)" --deb-machine -r . \
		> debian/copyright_newhints
	cmp debian/copyright_hints debian/copyright_newhints \
		&& rm debian/copyright_newhints