File: rules

package info (click to toggle)
espeakup 1%3A0.71-13
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 384 kB
  • sloc: ansic: 581; sh: 191; makefile: 79
file content (66 lines) | stat: -rwxr-xr-x 1,716 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
#!/usr/bin/make -f

DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
UDEB_CFLAGS ?= $(CFLAGS) -Os
UDEB_LDLIBS ?= /usr/lib/$(DEB_HOST_MULTIARCH)/libespeak.a /usr/lib/$(DEB_HOST_MULTIARCH)/libsonic.a /usr/lib/$(DEB_HOST_MULTIARCH)/libportaudio.a /usr/lib/$(DEB_HOST_MULTIARCH)/libjack.a -lm -lpthread -lasound -lrt
UDEB_LDFLAGS += -u _Unwind_Resume -u __gcc_personality_v0 -u _Unwind_ForcedUnwind -u _Unwind_GetCFA -u _Unwind_GetBSP -lgcc_s

export DEB_BUILD_HARDENING=1

clean:
	dh_testroot
	dh_clean
	debconf-updatepo
	$(MAKE) clean
	rm -f build-stamp
	rm -f espeakup
	rm -fr espeakup-udeb

build-espeakup: build-stamp
build-stamp:
	$(MAKE)

	mkdir espeakup-udeb
	ln *.c *.h espeakup-udeb/
	ln Makefile espeakup-udeb/

	DEB_BUILD_HARDENING=0 CFLAGS="$(UDEB_CFLAGS)" $(MAKE) -C espeakup-udeb LDLIBS="$(UDEB_LDLIBS)" LDFLAGS="$(UDEB_LDFLAGS)"

	touch $@

build: build-arch build-indep
build-indep:
build-arch: build-espeakup

binary-arch: build-espeakup
	dh_testroot
	dh_prep

	$(MAKE) install DESTDIR=`pwd`/debian/espeakup

	dh_install
	dh_installdirs
	install -m0644 debian/espeakup-udeb.start debian/espeakup-udeb/lib/debian-installer-startup.d/S38espeakup
	install -m0755 debian/espeakup-udeb.finish-install debian/espeakup-udeb/usr/lib/finish-install.d/06espeakup
	install -m0755 debian/espeakup-udeb.restart debian/espeakup-udeb/usr/lib/espeakup/espeakup.restart
	dh_installdebconf
	dh_installman
	dh_installdocs
	dh_installchangelogs
	dh_installinit -- start 10 S .

	dh_compress
	dh_fixperms
	dh_strip
	dh_shlibdeps

	dh_installdeb
	dh_gencontrol
	dh_md5sums
	dh_builddeb

binary-indep:

binary: binary-arch binary-indep

.PHONY: clean build build-espeakup binary binary-arch binary-indep