File speechd.spec of Package speechd

#
# spec file for package speechd (Version 0.6.7)
#
# Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#

# norootforbuild

Url:            http://www.brailcom.org

Name:           speechd
BuildRequires:  alsa-devel dotconf-devel espeak-devel gcc-c++ glib2-devel pulseaudio-devel python-devel
Version:        0.6.7
Release:        9
License:        GPL v2 only ; GPL v2 or later
AutoReqProv:    on
Group:          Productivity/Multimedia/Sound/Utilities
Source:         %{name}-%{version}.tbz2
Patch:          suse_python.diff
Patch1:         speechd-getline.diff
Summary:        speech-dispatcher - speech server
PreReq:         %insserv_prereq
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
Requires:       alsa espeak
%if %suse_version <= 1110
%define python_sitelib %{py_sitedir}
%endif

%description
speech-dispatcher is able to manage different TTS-systems like espeak,
festival, ibmtts. speech-dispatcher provides a generic interface to
control TTS-systems.

%package python
License:        GPL v2 only ; GPL v2 or later
Summary:        speech-dispatcher - speech server
Group:          Productivity/Multimedia/Sound/Utilities
Requires:       speechd = %version
%py_requires

%description python
speech-dispatcher is able to manage different TTS-systems like espeak,
festival, ibmtts speech-dispatcher provides a genereic interface to
control TTS-systems

%package devel
License:        GPL v2 only ; GPL v2 or later
Summary:        speech-dispatcher - speech server
Group:          Productivity/Multimedia/Sound/Utilities
Requires:       %name = %version

%description devel
Files necessary to develop against speechd

%prep
%setup -n %{name}-%{version}
find -name "CVS" | xargs rm -rfv
%patch -p1
%patch1

%build
./build.sh
%configure --disable-static --with-pic --with-alsa --with-pulse --with-espeak
%{__make} %{?jobs:-j%jobs}

%install 
make DESTDIR=%{buildroot} install
install -d %{buildroot}/etc/init.d
install -m 755 suse/speechd %{buildroot}/etc/init.d/speechd
install -d %{buildroot}/usr/sbin
install -d %{buildroot}/var/log/speech-dispatcher
install -d %{buildroot}/var/run/speech-dispatcher
ln -s /etc/init.d/speechd %{buildroot}/usr/sbin/rcspeechd
rm doc/Makefile*
pushd $RPM_BUILD_ROOT/%python_sitelib/speechd
python %py_libdir/py_compile.py *.py
popd
find %{buildroot} -type f -name "*.la" -exec %{__rm} -fv {} +

%clean
rm -rf $RPM_BUILD_ROOT

%post
/sbin/ldconfig
%{insserv_force_if_yast etc/init.d/speechd }
%install_info --info-dir=%{_infodir} %{_infodir}/speechd.info.gz

%postun
/sbin/ldconfig
%{insserv_cleanup}
%install_info_delete --info-dir=%{_infodir} %{_infodir}/speechd.info.gz

%files
%defattr (-,root,root,755)
%doc doc/*
%doc ChangeLog
%doc COPYING
%dir %{_libdir}/speech-dispatcher
%dir %{_libdir}/speech-dispatcher-modules
%dir /etc/speech-dispatcher
%dir /var/log/speech-dispatcher
%dir /var/run/speech-dispatcher
%config /etc/speech-dispatcher/*
%{_libdir}/speech-dispatcher/*.so.*
%{_libdir}/speech-dispatcher-modules/*
/usr/bin/connection_recovery
/usr/sbin/rcspeechd
/etc/init.d/speechd
/usr/bin/speech-dispatcher
/usr/bin/spd-say
/usr/bin/spd-conf
/usr/bin/clibrary
/usr/bin/clibrary2
/usr/bin/long_message
/usr/bin/run_test
/usr/bin/spdsend
%{_libdir}/libspeechd*.so.*
/usr/share/info/spd-say.info.gz
/usr/share/info/speech-dispatcher-cs.info.gz
/usr/share/info/speech-dispatcher.info.gz
/usr/share/info/ssip.info.gz
/usr/share/speech-dispatcher
/usr/share/sounds/speech-dispatcher

%files python
%defattr (-,root,root,755)
%dir %python_sitelib/speechd
%python_sitelib/speechd/*
%python_sitelib/speechd-*
%python_sitelib/speechd_*

%files devel
%defattr (-,root,root,755)
%{_libdir}/libspeechd.so
%{_libdir}/speech-dispatcher/libsdaudio.so
/usr/include/libspeechd.h

%changelog
openSUSE Build Service is sponsored by