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: The header files and libraries needed for SRS/Winthorpe clients
49 Group: Development/Libraries
50 Requires: %{name} = %{version}
53 This package contains header files and libraries necessary for development.
56 Summary: Various test binaries for SRS/Winthorpe
57 Group: Development/Debug
58 Requires: %{name} = %{version}
61 This package contains various test binaries for SRS/Winthorpe.
64 %setup -q -n %{name}-%{version}
67 %if %{?_with_debug:1}%{!?_with_debug:0}
68 export CFLAGS="-O0 -g3"
69 export CXXFLAGS="-O0 -g3"
75 %if %{?_with_sphinx:1}%{!?_with_sphinx:0}
76 CONFIG_OPTIONS="$CONFIG_OPTIONS --enable-sphinx"
78 CONFIG_OPTIONS="$CONFIG_OPTIONS --disable-sphinx"
81 %if %{?_with_festival:1}%{!?_with_festival:0}
82 CONFIG_OPTIONS="$CONFIG_OPTIONS --enable-festival"
84 CONFIG_OPTIONS="$CONFIG_OPTIONS --disable-festival"
87 %if %{?_with_wrt:1}%{!?_with_wrt:0}
88 CONFIG_OPTIONS="$CONFIG_OPTIONS --enable-wrt-client"
90 CONFIG_OPTIONS="$CONFIG_OPTIONS --disable-wrt-client"
93 %if %{?_with_dbus:1}%{!?_with_dbus:0}
94 CONFIG_OPTIONS="$CONFIG_OPTIONS --enable-gpl --enable-dbus"
96 CONFIG_OPTIONS="$CONFIG_OPTIONS --disable-dbus"
101 %configure $CONFIG_OPTIONS && \
105 rm -fr $RPM_BUILD_ROOT
109 # Install dictionaries, configuration and service files.
110 mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig \
111 $RPM_BUILD_ROOT/lib/systemd/user \
112 $RPM_BUILD_ROOT%{_sysconfdir}/speech-recognition \
113 $RPM_BUILD_ROOT%{_datadir}/speech-recognition/dictionaries/demo \
114 $RPM_BUILD_ROOT%{_libdir}/srs/scripts \
115 $RPM_BUILD_ROOT%{_datadir}/dbus-1/services
117 /usr/bin/install -m 644 packaging/speech-recognition.conf \
118 $RPM_BUILD_ROOT%{_sysconfdir}/speech-recognition
119 /usr/bin/install -m 644 packaging/speech-recognition.env \
120 $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/speech-recognition
121 /usr/bin/install -m 644 packaging/speech-recognition.service \
122 $RPM_BUILD_ROOT/lib/systemd/user
123 /usr/bin/install -m 644 \
124 -t $RPM_BUILD_ROOT%{_datadir}/speech-recognition/dictionaries/demo \
125 dictionaries/demo/demo.*
126 /usr/bin/install -m 755 packaging/start-speech-service.sh \
127 $RPM_BUILD_ROOT%{_libdir}/srs/scripts
128 /usr/bin/install -m 755 packaging/org.tizen.srs.service \
129 $RPM_BUILD_ROOT%{_datadir}/dbus-1/services
132 rm -rf $RPM_BUILD_ROOT
141 %defattr(-,root,root,-)
142 %{_sbindir}/srs-daemon
143 %if %{?_with_dbus:1}%{!?_with_dbus:0}
144 %{_bindir}/srs-client
147 %{_libdir}/libsrs*.so.*
148 %{_sysconfdir}/speech-recognition/speech-recognition.conf
149 %{_sysconfdir}/sysconfig/speech-recognition
150 %{_datadir}/speech-recognition/dictionaries
151 /lib/systemd/user/speech-recognition.service
152 %{_datadir}/dbus-1/services/org.tizen.srs.service
155 %defattr(-,root,root,-)
157 %{_libdir}/libsrs*.so
158 %{_libdir}/pkgconfig/srs*.pc
161 %defattr(-,root,root,-)
162 %{_bindir}/srs-native-client