File: rules

package info (click to toggle)
gsequencer 2.1.53-2
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 30,300 kB
  • sloc: ansic: 404,880; xml: 10,705; sh: 5,129; makefile: 2,702; sed: 16
file content (103 lines) | stat: -rwxr-xr-x 3,468 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
#!/usr/bin/make -f
#DH_VERBOSE = 1

DPKG_EXPORT_BUILDFLAGS = 1
include /usr/share/dpkg/default.mk
include /usr/share/dpkg/pkg-info.mk

archconfflags :=

ifeq ($(DEB_HOST_ARCH_OS),linux)
  archconfflags += --enable-alsa
else
  archconfflags += --disable-alsa
endif


ifeq ($(DEB_HOST_ARCH_OS),kfreebsd)
  archconfflags += --enable-oss
else
  archconfflags += --disable-oss
endif

archconfflags += --enable-libinstpatch --enable-gtk-doc --enable-gtk-doc-html

# provide some system dependent configuration as a C macro
CPPFLAGS += -DAGS_RC_FILENAME=\"/usr/share/gsequencer/styles/ags.rc\"
CPPFLAGS += -DAGS_ANIMATION_FILENAME=\"/usr/share/gsequencer/images/ags_supermoon-800x450.png\"
CPPFLAGS += -DAGS_LOGO_FILENAME=\"/usr/share/gsequencer/images/ags.png\"
CPPFLAGS += -DAGS_LICENSE_FILENAME=\"/usr/share/common-licenses/GPL-3\"

# Gets only the upstream version of the package
DEB_UPSTREAM_MINOR_VERSION := $(shell echo $(DEB_VERSION_UPSTREAM) | sed -r 's/([0-9]+).([0-9]+).([0-9]+)/\1.\2.x/')

# Sets build tarball-dir if not provided by command line
TARBALL_DIR ?= ../tarballs

# Sets export-dir if not provided by command line
EXPORT_DIR ?= ../build-area

# Sets download mirror if not provided by command line
DOWNLOAD_MIRROR ?= http://download.savannah.gnu.org/releases/gsequencer

get-orig-source:
	mkdir -p $(TARBALL_DIR)
	mkdir -p $(EXPORT_DIR)
	wget --method=GET -O "$(TARBALL_DIR)/$(DEB_SOURCE)_$(DEB_VERSION_UPSTREAM).orig.tar.gz" -c "$(DOWNLOAD_MIRROR)/$(DEB_UPSTREAM_MINOR_VERSION)/$(DEB_SOURCE)-$(DEB_VERSION_UPSTREAM).tar.gz"
	wget --method=GET -O "$(TARBALL_DIR)/$(DEB_SOURCE)_$(DEB_VERSION_UPSTREAM).orig.tar.gz.asc" -c "$(DOWNLOAD_MIRROR)/$(DEB_UPSTREAM_MINOR_VERSION)/$(DEB_SOURCE)-$(DEB_VERSION_UPSTREAM).tar.gz.sig"
	ln -s "$(TARBALL_DIR)/$(DEB_SOURCE)_$(DEB_VERSION_UPSTREAM).orig.tar.gz.asc" $(EXPORT_DIR)

pre-integration-test:
	dh_autoreconf
	dh_auto_configure -- --libdir=/usr/lib/$(DEB_HOST_MULTIARCH) $(archconfflags)

override_dh_auto_configure:
	dh_auto_configure -- $(archconfflags)
	$(MAKE) gen-symbols-all

override_dh_auto_build:
	dh_auto_build --parallel

override_dh_auto_test:
	xvfb-run --server-args="-screen 0 1920x1080x24" -a dh_auto_test

override_dh_auto_install:
	dh_auto_install --no-parallel
	$(MAKE) DESTDIR=$$(pwd)/debian/tmp install-html
	find $$(pwd)/debian/tmp/usr/share -type f \
		\( -name "htmlhelp.hhp" -or -name "toc.hhc" \) \
		-delete
	rm -f $$(pwd)/debian/tmp/usr/share/doc/libags-doc/api/libags
	rm -f $$(pwd)/debian/tmp/usr/share/doc/libags-audio-doc/api/libags-audio
	rm -f $$(pwd)/debian/tmp/usr/share/doc/libags-gui-doc/api/libags-gui
	find $$(pwd)/debian/tmp/usr/lib -type f -name "*.la" -delete

# main packaging script based on dh7 syntax
override_dh_shlibdeps:
	dh_shlibdeps --dpkg-shlibdeps-params=--ignore-missing-info

%:
	dh $@

override_dh_clean:
	rm -f docs/reference/libgsequencer/libgsequencer-sections.txt
	find docs/ -type f -name "*.stamp" -delete
	find docs/ -type f \( \
		   -name "*-decl-list.txt" \
		-o -name "*-decl.txt" \
		-o -name "*-undeclared.txt" \
		-o -name "*-undocumented.txt" \
		-o -name "*-unused.txt" \
		\) -delete
	find docs/ -type f \( \
		   -name "*.args" \
		-o -name "*.hierarchy" \
		-o -name "*.interfaces" \
		-o -name "*.prerequisites" \
		-o -name "*.signals" \
		\) -delete
	rm -f docs/reference/libgsequencer/libgsequencer.types
	find docs/ -type d -name ".libs" -exec rm -rf {} +
	find docs/ -type d -name "tmpl" -exec rm -rf {} +
	rm lib*.sym
	dh_clean