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)
18 # Termporarily had to replace these with explicit package-dependencies,
19 # because the murphy pkgconfig files lack the correct version (needs to
20 # be fixed) and now we need a new enough murphy with native-types support.
21 # Switch these back once this is fixed on the murphy side.
23 # BuildRequires: pkgconfig(murphy-common) >= 0.0.42
24 # BuildRequires: pkgconfig(murphy-pulse) >= 0.0.42
25 # BuildRequires: pkgconfig(murphy-glib) >= 0.0.42
27 BuildRequires: murphy-devel >= 0.0.42
28 BuildRequires: murphy-glib-devel >= 0.0.42
29 BuildRequires: murphy-pulse-devel >= 0.0.42
31 BuildRequires: pkgconfig(libudev)
32 BuildRequires: pkgconfig(json)
33 %if %{?_with_sphinx:1}%{!?_with_sphinx:0}
34 BuildRequires: pkgconfig(pocketsphinx)
35 BuildRequires: pkgconfig(sphinxbase)
37 %if %{?_with_festival:1}%{!?_with_festival:0}
38 BuildRequires: festival-devel
40 %if %{?_with_dbus:1}%{!?_with_dbus:0}
41 BuildRequires: pkgconfig(dbus-1)
45 %if %{?_with_sphinx:1}%{!?_with_sphinx:0}
47 Requires: pocketsphinx
49 %if %{?_with_festival:1}%{!?_with_festival:0}
50 BuildRequires: festival-devel
56 SRS/Winthorpe speech recognition system service.
59 Summary: The header files and libraries needed for SRS/Winthorpe clients
60 Group: Development/Libraries
61 Requires: %{name} = %{version}
64 This package contains header files and libraries necessary for development.
67 Summary: Various test binaries for SRS/Winthorpe
68 Group: Development/Debug
69 Requires: %{name} = %{version}
72 This package contains various test binaries for SRS/Winthorpe.
75 %setup -q -n %{name}-%{version}
78 %if %{?_with_debug:1}%{!?_with_debug:0}
79 export CFLAGS="-O0 -g3"
80 export CXXFLAGS="-O0 -g3"
86 %if %{?_with_sphinx:1}%{!?_with_sphinx:0}
87 CONFIG_OPTIONS="$CONFIG_OPTIONS --enable-sphinx"
89 CONFIG_OPTIONS="$CONFIG_OPTIONS --disable-sphinx"
92 %if %{?_with_festival:1}%{!?_with_festival:0}
93 CONFIG_OPTIONS="$CONFIG_OPTIONS --enable-festival"
95 CONFIG_OPTIONS="$CONFIG_OPTIONS --disable-festival"
98 %if %{?_with_wrt:1}%{!?_with_wrt:0}
99 CONFIG_OPTIONS="$CONFIG_OPTIONS --enable-wrt-client"
101 CONFIG_OPTIONS="$CONFIG_OPTIONS --disable-wrt-client"
104 %if %{?_with_dbus:1}%{!?_with_dbus:0}
105 CONFIG_OPTIONS="$CONFIG_OPTIONS --enable-gpl --enable-dbus"
107 CONFIG_OPTIONS="$CONFIG_OPTIONS --disable-dbus"
112 %configure $CONFIG_OPTIONS && \
116 rm -fr $RPM_BUILD_ROOT
120 # Install dictionaries, configuration and service files.
121 mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig \
122 $RPM_BUILD_ROOT/lib/systemd/user \
123 $RPM_BUILD_ROOT%{_sysconfdir}/speech-recognition \
124 $RPM_BUILD_ROOT%{_datadir}/speech-recognition/dictionaries/demo \
125 $RPM_BUILD_ROOT%{_libdir}/srs/scripts \
126 $RPM_BUILD_ROOT%{_datadir}/dbus-1/services
128 /usr/bin/install -m 644 packaging/speech-recognition.conf \
129 $RPM_BUILD_ROOT%{_sysconfdir}/speech-recognition
130 /usr/bin/install -m 644 packaging/speech-recognition.env \
131 $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/speech-recognition
132 /usr/bin/install -m 644 packaging/speech-recognition.service \
133 $RPM_BUILD_ROOT/lib/systemd/user
134 /usr/bin/install -m 644 \
135 -t $RPM_BUILD_ROOT%{_datadir}/speech-recognition/dictionaries/demo \
136 dictionaries/demo/demo.*
137 /usr/bin/install -m 755 packaging/start-speech-service.sh \
138 $RPM_BUILD_ROOT%{_libdir}/srs/scripts
139 /usr/bin/install -m 755 packaging/org.tizen.srs.service \
140 $RPM_BUILD_ROOT%{_datadir}/dbus-1/services
143 rm -rf $RPM_BUILD_ROOT
152 %defattr(-,root,root,-)
153 %{_sbindir}/srs-daemon
154 %if %{?_with_dbus:1}%{!?_with_dbus:0}
155 %{_bindir}/srs-client
158 %{_libdir}/libsrs*.so.*
159 %{_sysconfdir}/speech-recognition/speech-recognition.conf
160 %{_sysconfdir}/sysconfig/speech-recognition
161 %{_datadir}/speech-recognition/dictionaries
162 /lib/systemd/user/speech-recognition.service
163 %{_datadir}/dbus-1/services/org.tizen.srs.service
166 %defattr(-,root,root,-)
168 %{_libdir}/libsrs*.so
169 %{_libdir}/pkgconfig/srs*.pc
172 %defattr(-,root,root,-)
173 %{_bindir}/srs-native-client