File: rules

package info (click to toggle)
speech-dispatcher 0.8.6-4+deb9u1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 5,724 kB
  • ctags: 2,247
  • sloc: ansic: 20,729; sh: 4,559; python: 581; lisp: 579; makefile: 376
file content (46 lines) | stat: -rwxr-xr-x 1,633 bytes parent folder | download | duplicates (2)
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
#!/usr/bin/make -f

source=$(shell dpkg-parsechangelog -S Source)

%:
	dh $@ --with autoreconf,python3

override_dh_auto_configure:
	dh_auto_configure -- --with-module-bindir=\$${prefix}/lib/speech-dispatcher-modules \
	                     pidpath=/var/run/speech-dispatcher/

override_dh_auto_install:
	dh_auto_install --destdir=debian/tmp

ifeq ($(source),speech-dispatcher)
override_dh_strip:
	dh_strip --ddeb-migration='speech-dispatcher-dbg (<< 0.8.3-2~)'

override_dh_installinit:
	dh_installinit -a --error-handler=true

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

override_dh_makeshlibs:
	dh_makeshlibs -plibspeechd2
endif

# Switch to main rules
main:
	sed -i '1s/^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 '/Package: speech-dispatcher-pico/,/^$$/s/^/#/' debian/control
	sed -i '/Package: speech-dispatcher$$/,$$s/^#*//' debian/control
	sed -i 's_^Section: contrib/_Section: _' debian/control

# Switch to contrib rules
contrib:
	sed -i '1s/^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 '/Package: speech-dispatcher-pico/,/^$$/s/^#*//' debian/control
	sed -i '/Package: speech-dispatcher$$/,$$s/^/#/' debian/control
	sed -i 's_^Section: \([^/]*\)$$_Section: contrib/\1_' debian/control