Magellan Linux

Contents of /branches/R11-stable/extras/speech-dispatcher/speech-dispatcher-0.8-r4.smage2

Parent Directory Parent Directory | Revision Log Revision Log


Revision 20208 - (show annotations) (download)
Tue Nov 26 11:47:00 2013 UTC (10 years, 6 months ago) by niro
File size: 2001 byte(s)
-release branches/R11-stable
1 # $Id$
2
3 PNAME="speech-dispatcher"
4 PVER="0.8"
5 PBUILD="r4"
6
7 PCAT="media-sound"
8
9 DESCRIPTION="High-level device independent layer for speech synthesis interface."
10 HOMEPAGE="http://devel.freebsoft.org/speechd"
11
12 # todo espeak, flite support
13 DEPEND=">= dev-libs/glib2-2.36
14 >= dev-libs/dotconf-1.3
15 >= media-libs/alsa-lib-1.0.27
16 >= media-libs/libao-1.1
17 >= media-libs/nas-1.9
18 >= media-sound/libpulse-4.0
19 >= sys-libs/libltdl-2.4"
20
21 SDEPEND=">= virtual/sed
22 >= sys-dev/libtool-2.4"
23 # >= dev-lang/python-2.7
24
25 SRCFILE="${PNAME}-${PVER}.tar.gz"
26 SRCDIR="${BUILDDIR}/${PNAME}-${PVER}"
27
28 sminclude python mbuild mtools systemd
29
30 SRC_URI=(
31 http://devel.freebsoft.org/pub/projects/speechd/${SRCFILE}
32 mirror://${PNAME}/${SRCFILE}
33 mirror://${PNAME}/speech-dispatcherd.service
34 )
35
36 UP2DATE="updatecmd 'http://devel.freebsoft.org/pub/projects/speechd/?C=M;O=A' | lasttarball gz"
37
38 src_prepare()
39 {
40 munpack ${SRCFILE} || die
41 cd ${SRCDIR}
42
43 # multilib fix
44 sed -i 's:NAS_LIBS = -laudio -L/usr/X11R6/lib:NAS_LIBS = -laudio:' src/audio/Makefile.am || die
45 }
46
47 src_compile()
48 {
49 cd ${SRCDIR}
50
51 # python bindings require python3
52 mconfigure \
53 --disable-static \
54 --disable-python \
55 --with-alsa \
56 --with-pulse \
57 --with-libao \
58 --with-nas \
59 --without-espeak \
60 --without-flite \
61 || die
62
63 mmake || die
64
65 # python modules
66 # cd ${SRCDIR}/src/python
67 # python_docompile || die
68 }
69
70 src_install()
71 {
72 cd ${SRCDIR}
73 mmake DESTDIR=${BINDIR} install || die
74
75 # cd ${SRCDIR}/src/python
76 # python_doinstall || die
77
78 # disable espeak, flite is already disabled by upstream
79 sed -i 's/^AddModule "espeak"/#AddModule "espeak"/' \
80 ${BINDIR}/etc/speech-dispatcher/speechd.conf || die
81
82 # default to pulseaudio, but use alsa as fallback
83 sed -i 's/# AudioOutputMethod "pulse,alsa"/AudioOutputMethod "pulse,alsa"/' \
84 ${BINDIR}/etc/speech-dispatcher/speechd.conf || die
85
86 minstallunit speech-dispatcherd.service || die
87 }
88
89 postinstall()
90 {
91 mstartunit speech-dispatcherd.service
92 }
93
94 postremove()
95 {
96 mstopunit speech-dispatcherd.service
97 }