Magellan Linux

Contents of /branches/R11-stable/extras/speech-dispatcher/speech-dispatcher-0.8.1-r1.smage2

Parent Directory Parent Directory | Revision Log Revision Log


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