File: rules

package info (click to toggle)
speech-tools 1:2.5.0-5
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 9,848 kB
  • sloc: cpp: 67,350; ansic: 12,175; sh: 4,047; java: 3,748; makefile: 1,109; lisp: 711; perl: 501; awk: 85; xml: 9
file content (76 lines) | stat: -rwxr-xr-x 2,446 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
#!/usr/bin/make -f

# export DH_VERBOSE=1

export DEB_BUILD_MAINT_OPTIONS = hardening=+all

# Nearly all binary files are linked with too many libraries, let's try to link
# with --as-needed
export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed

include /usr/share/dpkg/architecture.mk
-include /usr/share/dpkg/buildtools.mk
include /usr/share/dpkg/pkg-info.mk

export DEB_VERSION_UPSTREAM
export PROJECT_VERSION=$(DEB_VERSION_UPSTREAM)
export PROJECT_MAJOR_VERSION=$(shell echo $(DEB_VERSION_UPSTREAM) | sed 's/^\([^\.]\+\.[^\.]\)\.[^\.]\+$$/\1/')

SBT := $(shell pwd)/debian/speech-tools

S_SCRIPTS = raw_to_xgraph.prl make_wagon_desc.sh resynth.sh

override_dh_auto_test:
#Upstream states test is only for their local development not a functional test

override_dh_auto_build-arch:
	$(MAKE) CC='$(CC)' CXX='$(CXX) -fno-delete-null-pointer-checks'

override_dh_auto_build-indep:
	# Unfortunately the documentation is created by parsing the binaries that
	# are build. As such we need a much of a full build for the documentation.
	$(MAKE) CC='$(CC)' CXX='$(CXX) -fno-delete-null-pointer-checks'
	cd doc && $(MAKE) doc

override_dh_auto_clean:
	dh_autoreconf_clean
	dh_autoreconf
	dh_update_autotools_config
	dh_auto_configure
	$(MAKE) clean NO_DEPEND=1 SYSTEM_TYPE=unknown_DebianGNULinux
	dh_autoreconf_clean

override_dh_clean:
	find -name make.depend -print0 | xargs -0r $(RM)
	find -name make.include -print0 | xargs -0r $(RM)
	find bin/ \( -name SCCS -o -name RCS -o -name CVS \) -prune \
	     -o -type f ! -name Makefile -print0 | xargs -0r $(RM)
	dh_clean

override_dh_install-arch:
	dh_install
	mkdir -p $(SBT)/usr/bin
	(cd scripts && \
		for i in $(S_SCRIPTS); do \
			dest=`echo $$i | sed -e 's/\.\(prl\|sh\)$$//'`; \
			sed -e 's,__PERL__,/usr/bin/perl,g' \
				<$$i >$(SBT)/usr/bin/$$dest; \
			chmod +x $(SBT)/usr/bin/$$dest; \
		done)
	# Handle the install of pm which is renamed simple-pitchmark separately.
	(cd scripts && \
			sed -e 's,__PERL__,/usr/bin/perl,g' \
				<pm.prl >$(SBT)/usr/bin/simple-pitchmark; \
			chmod +x $(SBT)/usr/bin/simple-pitchmark;)

override_dh_fixperms-arch:
	dh_fixperms
	chmod +x debian/libestools-dev/usr/lib/speech_tools/config/rules/modules.sh
	chmod +x debian/libestools-dev/usr/lib/speech_tools/config/system.sh

override_dh_install-indep:
	dh_install
	debian/dh_doxygen -p speech-tools-doc usr/share/doc/speech-tools-doc/doc/

%:
	dh $@ --ddeb-migration='speech-tools-dbg (<< 1:2.4~release-2~)'