Debian Codegraph @

debian/rules

raw
1 #!/usr/bin/make -f
2 #DH_VERBOSE = 1
3
4 # Enable hardening build flags
5 export DEB_BUILD_MAINT_OPTIONS=hardening=+all
6
7 DPKG_EXPORT_BUILDFLAGS = 1
8 include /usr/share/dpkg/default.mk
9 include /usr/share/dpkg/pkg-info.mk
10
11 UPSTREAM_VERSION = $(shell echo $(DEB_VERSION_UPSTREAM) | sed -e 's/\+.*//')
12
13 archconfflags :=
14
15 ifeq ($(DEB_HOST_ARCH_OS),linux)
16 archconfflags += --enable-alsa
17 else
18 archconfflags += --disable-alsa
19 endif
20
21
22 ifeq ($(DEB_HOST_ARCH_OS),kfreebsd)
23 archconfflags += --enable-oss
24 else
25 archconfflags += --disable-oss
26 endif
27
28 archconfflags += --disable-public-libgsequencer --enable-introspection --enable-libinstpatch --with-poppler --with-gtk-unix-print --enable-upstream-gtk-doc --enable-gtk-doc --enable-gtk-doc-html
29
30 # provide some system dependent configuration as a C macro
31 CPPFLAGS += -DAGS_CSS_FILENAME=\"/usr/share/gsequencer/styles/ags.css\"
32 CPPFLAGS += -DAGS_ANIMATION_FILENAME=\"/usr/share/gsequencer/images/gsequencer-800x450.png\"
33 CPPFLAGS += -DAGS_LOGO_FILENAME=\"/usr/share/gsequencer/images/ags.png\"
34 CPPFLAGS += -DAGS_LICENSE_FILENAME=\"/usr/share/common-licenses/GPL-3\"
35 CPPFLAGS += -DAGS_ONLINE_HELP_A4_PDF_FILENAME=\"/usr/share/doc/gsequencer-doc/pdf/user-manual-a4.pdf\"
36 CPPFLAGS += -DAGS_ONLINE_HELP_LETTER_PDF_FILENAME=\"/usr/share/doc/gsequencer-doc/pdf/user-manual-letter.pdf\"
37
38 %:
39 dh $@ --with gir
40
41 override_dh_auto_configure:
42 dh_auto_configure -- $(archconfflags)
43
44 override_dh_auto_build:
45 dh_auto_build
46 $(MAKE) DESTDIR=$$(pwd)/debian/tmp html
47 $(MAKE) DESTDIR=$$(pwd)/debian/tmp fix-local-html
48 $(MAKE) DESTDIR=$$(pwd)/debian/tmp pdf
49
50 override_dh_auto_test:
51 xvfb-run --server-args="-screen 0 1920x1080x24" -a dh_auto_test -- CFLAGS="-fpermissive -Wno-error=incompatible-pointer-types -Wno-error=pedantic $(dpkg-buildflags --get CFLAGS)"
52
53 override_dh_auto_install:
54 dh_auto_install --no-parallel
55 $(MAKE) DESTDIR=$$(pwd)/debian/tmp install-html
56 $(MAKE) DESTDIR=$$(pwd)/debian/tmp install-pdf
57 find $$(pwd)/debian/tmp/usr/share -type f \
58 \( -name "htmlhelp.hhp" -or -name "toc.hhc" \) \
59 -delete
60 rm -f $$(pwd)/debian/tmp/usr/share/doc/libags-doc/api/libags
61 rm -f $$(pwd)/debian/tmp/usr/share/doc/libags-audio-doc/api/libags-audio
62 rm -f $$(pwd)/debian/tmp/usr/share/doc/libags-gui-doc/api/libags-gui
63 find $$(pwd)/debian/tmp/usr/lib -type f -name "*.la" -delete
64
65 override_dh_compress:
66 dh_compress -Xuser-manual-a4.pdf -Xuser-manual-letter.pdf -A
67
68 override_dh_makeshlibs:
69 dh_makeshlibs -Xlibgsequencer -- -v$(UPSTREAM_VERSION)
70
71 override_dh_clean:
72 find docs/ -type f -name "*.stamp" -delete
73 find docs/ -type f \( \
74 -name "*-decl-list.txt" \
75 -o -name "*-decl.txt" \
76 -o -name "*-undeclared.txt" \
77 -o -name "*-undocumented.txt" \
78 -o -name "*-unused.txt" \
79 \) -delete
80 find docs/ -type f \( \
81 -name "*.args" \
82 -o -name "*.hierarchy" \
83 -o -name "*.prerequisites" \
84 -o -name "*.signals" \
85 \) -delete
86 find docs/ -type d -name ".libs" -exec rm -rf {} +
87 find docs/ -type d -name "tmpl" -exec rm -rf {} +
88 dh_clean
89
90 # for integration tests (see tests/ags-integration-unit-test)
91 pre-integration-test:
92 dh_autoreconf
93 dh_auto_configure -- --libdir=/usr/lib/$(DEB_HOST_MULTIARCH) --enable-run-functional-tests --enable-run-system-tests $(archconfflags)