1 %{!?_with_debug:%{!?_without_debug:%define _with_debug 1}}
2 %{!?_with_sphinx:%{!?_without_sphinx:%define _with_sphinx 1}}
3 %{!?_with_festival:%{!?_without_festival:%define _with_festival 1}}
4 %{!?_with_wrt:%{!?_without_wrt:%define _with_wrt 1}}
5 %{!?_with_dbus:%{!?_without_dbus:%define _without_dbus 1}}
7 Summary: Speech recognition service for Tizen
8 Name: speech-recognition
13 URL: https://github.com/otcshare/speech-recognition
14 Source0: %{name}-%{version}.tar.gz
16 BuildRequires: pkgconfig(libpulse)
17 BuildRequires: pkgconfig(murphy-common)
18 BuildRequires: pkgconfig(murphy-pulse)
19 BuildRequires: pkgconfig(murphy-glib)
20 BuildRequires: pkgconfig(libudev)
21 BuildRequires: pkgconfig(json)
22 %if %{?_with_sphinx:1}%{!?_with_sphinx:0}
23 BuildRequires: pkgconfig(pocketsphinx)
24 BuildRequires: pkgconfig(sphinxbase)
26 %if %{?_with_festival:1}%{!?_with_festival:0}
27 BuildRequires: festival-devel
29 %if %{?_with_dbus:1}%{!?_with_dbus:0}
30 BuildRequires: pkgconfig(dbus-1)
34 %if %{?_with_sphinx:1}%{!?_with_sphinx:0}
36 Requires: pocketsphinx
38 %if %{?_with_festival:1}%{!?_with_festival:0}
39 BuildRequires: festival-devel
45 SRS/Winthorpe speech recognition system service.
48 Summary: Documentation
49 Group: Development/Tools
52 Documentation for the speech recognition service.
55 %setup -q -n %{name}-%{version}
58 %if %{?_with_debug:1}%{!?_with_debug:0}
59 export CFLAGS="-O0 -g3"
60 export CXXFLAGS="-O0 -g3"
66 %if %{?_with_sphinx:1}%{!?_with_sphinx:0}
67 CONFIG_OPTIONS="$CONFIG_OPTIONS --enable-sphinx"
69 CONFIG_OPTIONS="$CONFIG_OPTIONS --disable-sphinx"
72 %if %{?_with_festival:1}%{!?_with_festival:0}
73 CONFIG_OPTIONS="$CONFIG_OPTIONS --enable-festival"
75 CONFIG_OPTIONS="$CONFIG_OPTIONS --disable-festival"
78 %if %{?_with_wrt:1}%{!?_with_wrt:0}
79 CONFIG_OPTIONS="$CONFIG_OPTIONS --enable-wrt-client"
81 CONFIG_OPTIONS="$CONFIG_OPTIONS --disable-wrt-client"
84 %if %{?_with_dbus:1}%{!?_with_dbus:0}
85 CONFIG_OPTIONS="$CONFIG_OPTIONS --enable-gpl --enable-dbus"
87 CONFIG_OPTIONS="$CONFIG_OPTIONS --disable-dbus"
92 %configure $CONFIG_OPTIONS && \
96 rm -fr $RPM_BUILD_ROOT
100 # Install dictionaries, configuration and service files.
101 mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig \
102 $RPM_BUILD_ROOT/lib/systemd/user \
103 $RPM_BUILD_ROOT%{_sysconfdir}/speech-recognition \
104 $RPM_BUILD_ROOT%{_datadir}/speech-recognition/dictionaries/demo \
105 $RPM_BUILD_ROOT%{_libdir}/srs/scripts \
106 $RPM_BUILD_ROOT%{_datadir}/dbus-1/services
108 /usr/bin/install -m 644 packaging/speech-recognition.conf \
109 $RPM_BUILD_ROOT%{_sysconfdir}/speech-recognition
110 /usr/bin/install -m 644 packaging/speech-recognition.env \
111 $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/speech-recognition
112 /usr/bin/install -m 644 packaging/speech-recognition.service \
113 $RPM_BUILD_ROOT/lib/systemd/user
114 /usr/bin/install -m 644 \
115 -t $RPM_BUILD_ROOT%{_datadir}/speech-recognition/dictionaries/demo \
116 dictionaries/demo/demo.*
117 /usr/bin/install -m 755 packaging/start-speech-service.sh \
118 $RPM_BUILD_ROOT%{_libdir}/srs/scripts
119 /usr/bin/install -m 755 packaging/org.tizen.srs.service \
120 $RPM_BUILD_ROOT%{_datadir}/dbus-1/services
123 rm -rf $RPM_BUILD_ROOT
132 %defattr(-,root,root,-)
133 %{_sbindir}/srs-daemon
134 %if %{?_with_dbus:1}%{!?_with_dbus:0}
135 %{_bindir}/srs-client
138 %{_sysconfdir}/speech-recognition/speech-recognition.conf
139 %{_sysconfdir}/sysconfig/speech-recognition
140 %{_datadir}/speech-recognition/dictionaries
141 /lib/systemd/user/speech-recognition.service
142 %{_datadir}/dbus-1/services/org.tizen.srs.service
145 %defattr(-,root,root,-)
146 %doc AUTHORS COPYING ChangeLog INSTALL NEWS README