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
|
#!/usr/bin/make -f
# -*- makefile -*-
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
soname=libespeak.so.1
#version=$(shell dpkg-parsechangelog|sed -n -e 's/^Version: //p'|cut -d- -f1)
version=1.45
CFLAGS = -Wall -g
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
CFLAGS += -O0
else
CFLAGS += -O2
endif
build: build-stamp
build-stamp:
dh_testdir
cp src/portaudio19.h src/portaudio.h
cd src && CXXFLAGS="$(CXXFLAGS) $(CFLAGS)" $(MAKE)
# Build static speak binary
cd platforms/big_endian && CFLAGS="$(CFLAGS)" $(MAKE)
# Build voice metadata.
cp -a $(CURDIR)/espeak-data $(CURDIR)/espeak-data-local
$(CURDIR)/platforms/big_endian/espeak-phoneme-data $(CURDIR)/espeak-data-local $(CURDIR)/espeak-data-local $(CURDIR)/platforms/big_endian/phondata-manifest
touch build-stamp
clean:
dh_testdir
dh_testroot
rm -f build-stamp
-cd src && $(MAKE) distclean
cp -f src/portaudio18.h src/portaudio.h
-cd platforms/big_endian && $(MAKE) clean
rm -fr espeak-data-local
dh_clean
install: build
dh_testdir
dh_testroot
dh_clean -k
dh_installdirs
install -m 755 -o root -g root src/espeak $(CURDIR)/debian/espeak/usr/bin/espeak
cp -r espeak-data-local $(CURDIR)/debian/espeak-data/usr/share/espeak-data
find $(CURDIR)/debian/espeak-data/usr/share -type f -exec chmod 644 {} \;
find $(CURDIR)/debian/espeak-data/usr/share -type d -exec chmod 755 {} \;
cp -al $(CURDIR)/debian/espeak-data/usr $(CURDIR)/debian/espeak-data-udeb
rm -fr $(CURDIR)/debian/espeak-data-udeb/usr/share/espeak-data/mbrola* $(CURDIR)/debian/espeak-data-udeb/usr/share/espeak-data/voices/mb $(CURDIR)/debian/espeak-data-udeb/usr/share/espeak-data/voices/test
install -m 644 -o root -g root src/$(soname).$(version) $(CURDIR)/debian/libespeak1/usr/lib/$(soname).$(version)
cd $(CURDIR)/debian/libespeak1/usr/lib && ln -s $(soname).$(version) $(soname)
cd $(CURDIR)/debian/libespeak1/usr/lib && ln -s $(soname).$(version) libespeak.so
mv $(CURDIR)/debian/libespeak1/usr/lib/libespeak.so $(CURDIR)/debian/libespeak-dev/usr/lib
install -m 644 -o root -g root src/libespeak.a $(CURDIR)/debian/libespeak-dev/usr/lib
install -m 644 -o root -g root src/speak_lib.h $(CURDIR)/debian/libespeak-dev/usr/include/espeak
# Build architecture-independent files here.
binary-indep: build install
# We have nothing to do by default.
# Build architecture-dependent files here.
binary-arch: build install
dh_testdir
dh_testroot
dh_installchangelogs ChangeLog.txt
dh_installdocs
dh_installman debian/espeak.1
dh_link
dh_strip --dbg-package=espeak-dbg
dh_compress
dh_fixperms
dh_makeshlibs -V
dh_shlibdeps -L libespeak1 -l debian/libespeak1/usr/lib
dh_installdeb -v
dh_gencontrol
dh_md5sums
dh_builddeb
binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary install
|