SUNWgnome-a11y-speech.spec
author davelam
Thu, 07 Aug 2008 02:31:31 +0000
branchgnome-2-22
changeset 12491 b2fc226f1836
parent 12184 ae608219405c
child 13018 f2e9d53afe1b
permissions -rw-r--r--
2008-08-07 Dave Lin <[email protected]> * closed/SUNWflash-player-plugin.spec: Hack the version number from 9.0.125 9.0.1250 to fix the integration issue, which was caused by the incorrect version number(9.0.1124 should be 9.0.124) in the previous version bump.

#
# spec file for package SUNWgnome-a11y-speech
#
# includes module(s): gnome-speech
#
# Copyright 2007 Sun Microsystems, Inc.
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
# Owner: liyuan
#
%include Solaris.inc

%define build_dectalk %(test -f /usr/bin/say && echo 1 || echo 0)
%define build_espeak %(pkginfo -q SFEespeak && echo 1 || echo 0)
%define build_swift %(test -d /opt/swift && echo 1 || echo 0)

%use gnome_speech = gnome-speech.spec

Name:                    SUNWgnome-a11y-speech
Summary:                 GNOME text-to-speech engine
Version:                 %{default_pkg_version}
SUNW_BaseDir:            %{_basedir}
SUNW_Copyright:          %{name}.copyright
BuildRoot:               %{_tmppath}/%{name}-%{version}-build

%include default-depend.inc
Requires: SUNWgnome-a11y-libs
Requires: SUNWgnome-base-libs
Requires: SUNWgnome-component
BuildRequires: SUNWgnome-base-libs-devel
BuildRequires: SUNWgnome-component-devel

%package festival
Summary:                 %{summary} - Festival Synthesis Driver
SUNW_BaseDir:            %{_basedir}
Requires: SUNWgnome-a11y-speech
%include default-depend.inc

%package freetts
Summary:                 %{summary} - FreeTTS Synthesis Driver
SUNW_BaseDir:            %{_basedir}
Requires: SUNWgnome-a11y-speech
%include default-depend.inc

%if %build_dectalk
%package dectalk
Summary:                 %{summary} - Fonix DECtalk Synthesis Driver
SUNW_BaseDir:            %{_basedir}
Requires: SUNWgnome-a11y-speech
%include default-depend.inc
%endif

%if %build_espeak
%package espeak
Summary:                 %{summary} - eSpeak Synthesis Driver
SUNW_BaseDir:            %{_basedir}
Requires: SFEespeak
Requires: SUNWgnome-a11y-speech
BuildRequires: SFEespeak-devel
%include default-depend.inc
%endif

%if %build_swift
%package swift
Summary:                 %{summary} - Cepstral Swift Synthesis Driver
SUNW_BaseDir:            %{_basedir}
Requires: SUNWgnome-a11y-speech
%include default-depend.inc
%endif

%package devel
Summary:                 %{summary} - development files
SUNW_BaseDir:            %{_basedir}
%include default-depend.inc

%prep
rm -rf %name-%version
mkdir %name-%version
%gnome_speech.prep -d %name-%version

%build
export PKG_CONFIG_PATH=%{_pkg_config_path}
export MSGFMT="/usr/bin/msgfmt"
export ACLOCAL_FLAGS="-I %{_datadir}/aclocal"
if [ `uname -r` = 5.9 ]; then
export CFLAGS="%optflags -I%{_includedir} -I/usr/j2se/include -I/usr/j2se/include/solaris"
else
export CFLAGS="%optflags -I%{_includedir} -I/usr/jdk/instances/jdk1.5.0/include -I/usr/jdk/instances/jdk1.5.0/include/solaris"
fi
export RPM_OPT_FLAGS="$CFLAGS"
export LD_RUN_PATH="%{_libdir}"
export LDFLAGS="%_ldflags"
%gnome_speech.build -d %name-%version

%install
%gnome_speech.install -d %name-%version

%{?pkgbuild_postprocess: %pkgbuild_postprocess -v -c "%{version}:%{jds_version}:%{name}:$RPM_ARCH:%(date +%%Y-%%m-%%d):%{support_level}" $RPM_BUILD_ROOT}

%clean
rm -rf $RPM_BUILD_ROOT

%files
%defattr (-, root, bin)
%dir %attr (0755, root, bin) %{_bindir}
%{_bindir}/test-speech
%dir %attr (0755, root, bin) %{_libdir}
%{_libdir}/libgnomespeech.so*
%{_libdir}/orbit-2.0/GNOME_Speech_module.*
%dir %attr (0755, root, sys) %{_datadir}
%{_datadir}/idl/gnome-speech-*/GNOME_Speech*.idl
%if %option_with_java
%{_datadir}/jar/gnome-speech.jar
%endif

%files festival
%defattr (-, root, bin)
%dir %attr (0755, root, bin) %{_bindir}
%{_bindir}/festival-synthesis-driver
%dir %attr (0755, root, bin) %{_libdir}
%{_libdir}/bonobo/servers/GNOME_Speech_SynthesisDriver_Festival.server

%if %option_with_java
%files freetts
%defattr (-, root, bin)
%dir %attr (0755, root, bin) %{_bindir}
%{_bindir}/freetts-synthesis-driver
%dir %attr (0755, root, bin) %{_libdir}
%{_libdir}/libfreettsdriver.*
%{_libdir}/bonobo/servers/GNOME_Speech_SynthesisDriver_FreeTTS.server
%dir %attr (0755, root, sys) %{_datadir}
%{_datadir}/jar/freetts-synthesis-driver.jar
%{_datadir}/gnome-speech/drivers/freetts/user_addenda.txt
%endif

%if %build_dectalk
%files dectalk
%defattr (-, root, bin)
%dir %attr (0755, root, bin) %{_bindir}
%{_bindir}/dectalk-synthesis-driver
%dir %attr (0755, root, bin) %{_libdir}
%{_libdir}/bonobo/servers/GNOME_Speech_SynthesisDriver_Dectalk.server
%endif

%if %build_espeak
%files espeak
%defattr (-, root, bin)
%dir %attr (0755, root, bin) %{_bindir}
%{_bindir}/espeak-synthesis-driver
%dir %attr (0755, root, bin) %{_libdir}
%{_libdir}/bonobo/servers/GNOME_Speech_SynthesisDriver_Espeak.server
%endif

%if %build_swift
%files swift
%defattr (-, root, bin)
%dir %attr (0755, root, bin) %{_bindir}
%{_bindir}/swift-synthesis-driver
%dir %attr (0755, root, bin) %{_libdir}
%{_libdir}/bonobo/servers/GNOME_Speech_SynthesisDriver_Swift.server
%endif

%files devel
%defattr (-, root, bin)
%dir %attr (0755, root, bin) %{_includedir}
%{_includedir}/gnome-speech-*/gnome-speech/*.h

%dir %attr (0755, root, bin) %{_libdir}
%dir %attr (0755, root, other) %{_libdir}/pkgconfig
%{_libdir}/pkgconfig/*

%changelog
* Thu Apr 21 2008 - [email protected]
- Add new optional espeak and swift packages.  Also change the way
  the DECtalk package was created since the DECtalk folks have
  different ways of shipping/installing their product.
* Mon Mar 31 2008 - [email protected]
- Add copyright file
* Fri Sep 28 2007 - [email protected]
- disable packaging java stuff if the --without-java option is used
* Thu Jul 13 2006 - [email protected]
- Add new packaging scheme
* Sun Jun 11 2006 - [email protected]
- change group from other to bin/sys
* Tue May 09 2006 - [email protected]
- merge -share pkg(s) into the base pkg(s)
* Mon Feb 20 2006 - [email protected]
- Update Build/Requires after running check-deps.pl script.
* Sat Oct 02 2004 - [email protected]
- added %pkgbuild_postprocess
* Wed Sep 22 2004 - [email protected]
- Correct JDK path in CFLAGS so jni.h can be found.
* Fri Jul 23 2004 - [email protected]
- Move freetts to SUNWgnome-a11y-libs.
* Tue Jun 22 2004 - [email protected]
- changed install location to /usr/lib and /usr/bin
* Thu Mar 11 2004 - [email protected]
- Add jar files that come from freetts module.
* Mon Mar 02 2004 - [email protected]
- add LD_RUN_PATH since -R{%_libdir} doesn't seem to work
* Mon Mar 01 2004 - [email protected]
- add share, devel subpkgs