File: rules

package info (click to toggle)
speech-dispatcher 0.11.5-5.1
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 34,936 kB
  • sloc: ansic: 26,664; sh: 5,336; python: 1,215; makefile: 989; lisp: 583; cpp: 404
file content (88 lines) | stat: -rwxr-xr-x 3,057 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
#!/usr/bin/make -f

export DEB_BUILD_MAINT_OPTIONS=hardening=+all
include /usr/share/dpkg/pkg-info.mk

export deb_systemdsystemunitdir = $(shell pkgconf --variable=systemdsystemunitdir systemd | sed s,^/,,)

# NAS is in universe in Ubuntu
ifeq ($(shell dpkg-vendor --derives-from Ubuntu && echo yes),yes)
	NAS = --with-nas=no
ifneq (,$(filter speech-dispatcher-festival,$(shell dh_listpackages)))
ifeq (${DEB_HOST_ARCH},i386)
	builddeb_overrides = -Nspeech-dispatcher-festival
endif
endif
endif

CONFIGURE=--with-module-bindir=\$${prefix}/lib/speech-dispatcher-modules \
		pidpath=/run/speech-dispatcher/ $(NAS)

ifeq ($(DEB_SOURCE),speech-dispatcher)
# disable non-free syntheses
CONFIGURE += --with-baratinoo=no --with-ibmtts=no --with-voxin=no --with-kali=no --with-ivona=no
endif

# Disable python discovery in binary-arch builds, so we can cross-compile
CONFIGURE_ARCH=--disable-python

%:
	dh $@

config/modules/espeak-ng-mbrola-generic.conf:
	for i in espeak-ng-mbrola-generic.conf \
	         espeak-mbrola-generic.conf ; do \
		sed < config/modules/$$i.in > config/modules/$$i -e "s/\$$DEB_HOST_MULTIARCH/$(DEB_HOST_MULTIARCH)/" ; \
	done

override_dh_auto_configure-arch: config/modules/espeak-ng-mbrola-generic.conf
	dh_auto_configure -- $(CONFIGURE) $(CONFIGURE_ARCH)

override_dh_auto_configure-indep: config/modules/espeak-ng-mbrola-generic.conf
	dh_auto_configure -- $(CONFIGURE)

override_dh_auto_install:
	# Bug#950793
	@echo blhc: ignore-line-regexp: libtool: link:.*
	dh_auto_install --destdir=debian/tmp

ifeq ($(DEB_SOURCE),speech-dispatcher)
override_dh_installinit:
	dh_installinit -a --error-handler=true --no-enable --no-start

override_dh_fixperms-arch:
	dh_fixperms
	chmod 700 $(CURDIR)/debian/speech-dispatcher/var/log/speech-dispatcher

override_dh_makeshlibs:
	dh_makeshlibs -plibspeechd2
endif

override_dh_builddeb:
	dh_builddeb ${builddeb_overrides}

override_dh_gencontrol:
	dh_gencontrol ${builddeb_overrides}

override_dh_installsystemd:
	dh_installsystemd --no-enable --no-start

# Switch to main rules
main:
	sed -i 's/^speech-dispatcher-contrib /speech-dispatcher /' debian/changelog
	sed -i '1s/^Source: speech-dispatcher-contrib$$/Source: speech-dispatcher/' debian/control
	sed -i 's/^ libttspico-dev/# libttspico-dev/' debian/control
	sed -i 's/^# help2man/ help2man/' debian/control
	sed -i '/^#start-contrib$$/,/^#end-contrib$$/s/^/#/' debian/control
	sed -i '/Package: speech-dispatcher$$/,$$s/^#*//' debian/control
	sed -i '1,/^$$/s_^Section: contrib/_Section: _' debian/control

# Switch to contrib rules
contrib:
	sed -i 's/^speech-dispatcher /speech-dispatcher-contrib /' debian/changelog
	sed -i '1s/^Source: speech-dispatcher$$/Source: speech-dispatcher-contrib/' debian/control
	sed -i 's/^#* libttspico-dev/ libttspico-dev/' debian/control
	sed -i 's/^ help2man/# help2man/' debian/control
	sed -i '/^##start-contrib$$/,/^##end-contrib$$/s/^#//' debian/control
	sed -i '/Package: speech-dispatcher$$/,$$s/^/#/' debian/control
	sed -i '1,/^$$/s_^Section: \([^/]*\)$$_Section: contrib/\1_' debian/control