Home | History | Annotate | Download | only in trunk
      1 #
      2 # spec file for package SUNWgnome-a11y-speech
      3 #
      4 # includes module(s): gnome-speech
      5 #
      6 # Copyright 2007 Sun Microsystems, Inc.
      7 # This file and all modifications and additions to the pristine
      8 # package are under the same license as the package itself.
      9 #
     10 %define owner liyuan
     11 #
     12 %include Solaris.inc
     13 
     14 %define build_dectalk %(test -f /usr/bin/say && echo 1 || echo 0)
     15 %define build_swift %(test -d /opt/swift && echo 1 || echo 0)
     16 %define option_with_java 0
     17 
     18 %use gnome_speech = gnome-speech.spec
     19 
     20 Name:                    SUNWgnome-a11y-speech
     21 Summary:                 GNOME text-to-speech engine
     22 Version:                 %{default_pkg_version}
     23 Source:                  %{name}-manpages-0.1.tar.gz
     24 SUNW_BaseDir:            %{_basedir}
     25 SUNW_Copyright:          %{name}.copyright
     26 BuildRoot:               %{_tmppath}/%{name}-%{version}-build
     27 
     28 %include default-depend.inc
     29 Requires: SUNWgnome-a11y-libs
     30 Requires: SUNWgnome-component
     31 BuildRequires: SUNWgnome-component-devel
     32 
     33 %package festival
     34 Summary:                 %{summary} - Festival Synthesis Driver
     35 SUNW_BaseDir:            %{_basedir}
     36 Requires: SUNWgnome-a11y-speech
     37 %include default-depend.inc
     38 
     39 %package freetts
     40 Summary:                 %{summary} - FreeTTS Synthesis Driver
     41 SUNW_BaseDir:            %{_basedir}
     42 Requires: SUNWgnome-a11y-speech
     43 %include default-depend.inc
     44 
     45 %if %build_dectalk
     46 %package dectalk
     47 Summary:                 %{summary} - Fonix DECtalk Synthesis Driver
     48 SUNW_BaseDir:            %{_basedir}
     49 Requires: SUNWgnome-a11y-speech
     50 %include default-depend.inc
     51 %endif
     52 
     53 %package espeak
     54 Summary:                 %{summary} - eSpeak Synthesis Driver
     55 SUNW_BaseDir:            %{_basedir}
     56 Requires: SUNWespeak
     57 Requires: SUNWgnome-a11y-speech
     58 BuildRequires: SUNWespeak-devel
     59 %include default-depend.inc
     60 
     61 %if %build_swift
     62 %package swift
     63 Summary:                 %{summary} - Cepstral Swift Synthesis Driver
     64 SUNW_BaseDir:            %{_basedir}
     65 Requires: SUNWgnome-a11y-speech
     66 %include default-depend.inc
     67 %endif
     68 
     69 %package devel
     70 Summary:                 %{summary} - development files
     71 SUNW_BaseDir:            %{_basedir}
     72 %include default-depend.inc
     73 
     74 %prep
     75 rm -rf %name-%version
     76 mkdir %name-%version
     77 %gnome_speech.prep -d %name-%version
     78 cd %{_builddir}/%name-%version
     79 gzcat %SOURCE0 | tar xf -
     80 
     81 %build
     82 export PKG_CONFIG_PATH=%{_pkg_config_path}
     83 export MSGFMT="/usr/bin/msgfmt"
     84 export ACLOCAL_FLAGS="-I %{_datadir}/aclocal"
     85 if [ `uname -r` = 5.9 ]; then
     86 export CFLAGS="%optflags -I%{_includedir} -I/usr/j2se/include -I/usr/j2se/include/solaris"
     87 else
     88 export CFLAGS="%optflags -I%{_includedir} -I/usr/jdk/instances/jdk1.6.0/include -I/usr/jdk/instances/jdk1.6.0/include/solaris"
     89 fi
     90 export RPM_OPT_FLAGS="$CFLAGS"
     91 export LD_RUN_PATH="%{_libdir}"
     92 export LDFLAGS="%_ldflags"
     93 %gnome_speech.build -d %name-%version
     94 
     95 %install
     96 %gnome_speech.install -d %name-%version
     97 
     98 # install man page
     99 rm -rf $RPM_BUILD_ROOT%{_mandir}
    100 cd %{_builddir}/%name-%version/sun-manpages
    101 make install DESTDIR=$RPM_BUILD_ROOT
    102 
    103 
    104 %{?pkgbuild_postprocess: %pkgbuild_postprocess -v -c "%{version}:%{jds_version}:%{name}:$RPM_ARCH:%(date +%%Y-%%m-%%d):%{support_level}" $RPM_BUILD_ROOT}
    105 
    106 %clean
    107 rm -rf $RPM_BUILD_ROOT
    108 
    109 %files
    110 %defattr (-, root, bin)
    111 %dir %attr (0755, root, bin) %{_bindir}
    112 %{_bindir}/test-speech
    113 %dir %attr (0755, root, bin) %{_libdir}
    114 %{_libdir}/libgnomespeech.so*
    115 %{_libdir}/orbit-2.0/GNOME_Speech_module.*
    116 %dir %attr (0755, root, sys) %{_datadir}
    117 %doc -d gnome-speech-%{gnome_speech.version} README AUTHORS
    118 %doc(bzip2) -d gnome-speech-%{gnome_speech.version} COPYING NEWS ChangeLog
    119 %dir %attr (0755, root, other) %{_datadir}/doc
    120 %{_datadir}/idl/gnome-speech-*/GNOME_Speech*.idl
    121 %dir %attr(0755, root, bin) %{_mandir}
    122 %dir %attr(0755, root, bin) %{_mandir}/*
    123 %{_mandir}/*/*
    124 %if %option_with_java
    125 %{_datadir}/jar/gnome-speech.jar
    126 %endif
    127 
    128 %files festival
    129 %defattr (-, root, bin)
    130 %dir %attr (0755, root, bin) %{_bindir}
    131 %{_bindir}/festival-synthesis-driver
    132 %dir %attr (0755, root, bin) %{_libdir}
    133 %{_libdir}/bonobo/servers/GNOME_Speech_SynthesisDriver_Festival.server
    134 
    135 %if %option_with_java
    136 %files freetts
    137 %defattr (-, root, bin)
    138 %dir %attr (0755, root, bin) %{_bindir}
    139 %{_bindir}/freetts-synthesis-driver
    140 %dir %attr (0755, root, bin) %{_libdir}
    141 %{_libdir}/libfreettsdriver.*
    142 %{_libdir}/bonobo/servers/GNOME_Speech_SynthesisDriver_FreeTTS.server
    143 %dir %attr (0755, root, sys) %{_datadir}
    144 %{_datadir}/jar/freetts-synthesis-driver.jar
    145 %{_datadir}/gnome-speech/drivers/freetts/user_addenda.txt
    146 %endif
    147 
    148 %if %build_dectalk
    149 %files dectalk
    150 %defattr (-, root, bin)
    151 %dir %attr (0755, root, bin) %{_bindir}
    152 %{_bindir}/dectalk-synthesis-driver
    153 %dir %attr (0755, root, bin) %{_libdir}
    154 %{_libdir}/bonobo/servers/GNOME_Speech_SynthesisDriver_Dectalk.server
    155 %endif
    156 
    157 %files espeak
    158 %defattr (-, root, bin)
    159 %dir %attr (0755, root, bin) %{_bindir}
    160 %{_bindir}/espeak-synthesis-driver
    161 %dir %attr (0755, root, bin) %{_libdir}
    162 %{_libdir}/bonobo/servers/GNOME_Speech_SynthesisDriver_Espeak.server
    163 
    164 %if %build_swift
    165 %files swift
    166 %defattr (-, root, bin)
    167 %dir %attr (0755, root, bin) %{_bindir}
    168 %{_bindir}/swift-synthesis-driver
    169 %dir %attr (0755, root, bin) %{_libdir}
    170 %{_libdir}/bonobo/servers/GNOME_Speech_SynthesisDriver_Swift.server
    171 %endif
    172 
    173 %files devel
    174 %defattr (-, root, bin)
    175 %dir %attr (0755, root, bin) %{_includedir}
    176 %{_includedir}/gnome-speech-*/gnome-speech/*.h
    177 
    178 %dir %attr (0755, root, bin) %{_libdir}
    179 %dir %attr (0755, root, other) %{_libdir}/pkgconfig
    180 %{_libdir}/pkgconfig/*
    181 
    182 %changelog
    183 * Fri Aug 07 2009 - li.yuan@sun.com
    184 - Change Java version to 1.6.0 to avoid build error on OpenSolaris.
    185 * Fri Jul 24 2009 - li.yuan@sun.com
    186 - Disable java since java-access-bridge has been moved out.
    187 * Thu Sep 18 2008 - li.yuan@sun.com
    188 - Added %doc to %files for copyright.
    189 * Wed Aug 20 2008 - william.walker@sun.com
    190 - Require SUNWespeak.spec so it will be built prior to
    191   SUNWgnome-a11y-speech.
    192 * Wed Aug 20 2008 - william.walker@sun.com
    193 - Migrate SFEespeak.spec to SUNWespeak.spec
    194 * Tue Aug 05 2008 - li-yan.zhang@sun.com
    195 - Add manpages. 
    196 * Thu Apr 21 2008 - william.walker@sun.com
    197 - Add new optional espeak and swift packages.  Also change the way
    198   the DECtalk package was created since the DECtalk folks have
    199   different ways of shipping/installing their product.
    200 * Mon Mar 31 2008 - li.yuan@sun.com
    201 - Add copyright file
    202 * Fri Sep 28 2007 - laca@sun.com
    203 - disable packaging java stuff if the --without-java option is used
    204 * Thu Jul 13 2006 - william.walker@sun.com
    205 - Add new packaging scheme
    206 * Sun Jun 11 2006 - laca@sun.com
    207 - change group from other to bin/sys
    208 * Tue May 09 2006 - laca@sun.com
    209 - merge -share pkg(s) into the base pkg(s)
    210 * Mon Feb 20 2006 - damien.carbery@sun.com
    211 - Update Build/Requires after running check-deps.pl script.
    212 * Sat Oct 02 2004 - laca@sun.com
    213 - added %pkgbuild_postprocess
    214 * Wed Sep 22 2004 - damien.carbery@sun.com
    215 - Correct JDK path in CFLAGS so jni.h can be found.
    216 * Fri Jul 23 2004 - damien.carbery@sun.com
    217 - Move freetts to SUNWgnome-a11y-libs.
    218 * Tue Jun 22 2004 - shirley.woo@sun.com
    219 - changed install location to /usr/lib and /usr/bin
    220 * Thu Mar 11 2004 - damien.carbery@sun.com
    221 - Add jar files that come from freetts module.
    222 * Mon Mar 02 2004 - laca@sun.com
    223 - add LD_RUN_PATH since -R{%_libdir} doesn't seem to work
    224 * Mon Mar 01 2004 - laca (at] sun.com
    225 - add share, devel subpkgs
    226