Home | History | Annotate | Download | only in trunk
      1 #
      2 # spec file for package SUNWgnome-a11y-gok
      3 #
      4 # includes module(s): gok
      5 #
      6 # Copyright 2008 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 # Owner: liyuan
     11 #
     12 %include Solaris.inc
     13 
     14 %use gok = gok.spec
     15 
     16 Name:                    SUNWgnome-a11y-gok
     17 Summary:                 GNOME On-screen Keyboard
     18 Version:                 %{default_pkg_version}
     19 Source:                  %{name}-manpages-0.1.tar.gz
     20 SUNW_BaseDir:            %{_basedir}
     21 SUNW_Copyright:          %{name}.copyright
     22 BuildRoot:               %{_tmppath}/%{name}-%{version}-build
     23 
     24 %include default-depend.inc
     25 Requires: SUNWgnome-a11y-libs
     26 Requires: SUNWgnome-a11y-gok-root
     27 Requires: SUNWgnome-panel
     28 Requires: SUNWgnome-libs
     29 Requires: SUNWgnome-a11y-speech
     30 Requires: SUNWgnome-audio
     31 Requires: SUNWgnome-base-libs
     32 Requires: SUNWgnome-component
     33 Requires: SUNWgnome-config
     34 Requires: SUNWlibms
     35 Requires: SUNWlxml
     36 Requires: SUNWpostrun
     37 BuildRequires: SUNWgnome-audio-devel
     38 BuildRequires: SUNWgnome-base-libs-devel
     39 BuildRequires: SUNWgnome-component-devel
     40 BuildRequires: SUNWgnome-config-devel
     41 BuildRequires: SUNWgnome-a11y-speech-devel
     42 BuildRequires: SUNWgnome-panel-devel
     43 BuildRequires: SUNWgnome-libs-devel
     44 
     45 %package root
     46 Summary:                 %{summary} - / filesystem
     47 SUNW_BaseDir:            /
     48 %include default-depend.inc
     49 Requires: SUNWpostrun-root
     50 Requires: SUNWgnome-config
     51 
     52 %if %build_l10n
     53 %package l10n
     54 Summary:                 %{summary} - l10n files
     55 SUNW_BaseDir:            %{_basedir}
     56 %include default-depend.inc
     57 Requires:                %{name}
     58 %endif
     59 
     60 %prep
     61 rm -rf %name-%version
     62 mkdir %name-%version
     63 %gok.prep -d %name-%version
     64 cd %{_builddir}/%name-%version
     65 gzcat %SOURCE0 | tar -xf -
     66 
     67 %build
     68 export PKG_CONFIG_PATH=%{_pkg_config_path}
     69 export LDFLAGS="%_ldflags"
     70 %ifarch sparc
     71 export CFLAGS="%optflags -I%{_includedir}"
     72 %else
     73 export CFLAGS="%optflags -xO2 -I%{_includedir}"
     74 %endif
     75 %if %option_with_fox
     76 # for <X11/extensions/XInput.h>
     77 export CFLAGS="$CFLAGS -I/usr/X11/include"
     78 %endif
     79 export RPM_OPT_FLAGS="$CFLAGS"
     80 %gok.build -d %name-%version
     81 
     82 %install
     83 rm -rf $RPM_BUILD_ROOT
     84 %gok.install -d %name-%version
     85 rm -rf $RPM_BUILD_ROOT%{_mandir}
     86 cd %{_builddir}/%name-%version/sun-manpages
     87 make install DESTDIR=$RPM_BUILD_ROOT
     88 
     89 %if %build_l10n
     90 %else
     91 # REMOVE l10n FILES
     92 rm -r $RPM_BUILD_ROOT%{_datadir}/locale
     93 rm -r $RPM_BUILD_ROOT%{_datadir}/gok/ang
     94 rm -r $RPM_BUILD_ROOT%{_datadir}/gok/[a-z][a-z]
     95 rm -r $RPM_BUILD_ROOT%{_datadir}/gok/[a-z][a-z]_[A-Z][A-Z]
     96 rm -r $RPM_BUILD_ROOT%{_datadir}/gok/sr@latin
     97 %endif
     98 
     99 %{?pkgbuild_postprocess: %pkgbuild_postprocess -v -c "%{version}:%{jds_version}:%{name}:$RPM_ARCH:%(date +%%Y-%%m-%%d):unsupported" $RPM_BUILD_ROOT}
    100 
    101 %clean
    102 rm -rf $RPM_BUILD_ROOT
    103 
    104 %post
    105 %include desktop-database-install.script
    106 %include scrollkeeper-update.script
    107 %include icon-cache.script
    108 
    109 %postun
    110 test -x $BASEDIR/lib/postrun || exit 0
    111 %include desktop-database-uninstall.script
    112 %include scrollkeeper-update.script
    113 
    114 %post root
    115 %include gconf-install.script
    116 
    117 %preun root
    118 test -x $BASEDIR/var/lib/postrun/postrun || exit 0
    119 ( echo 'test -x $PKG_INSTALL_ROOT/usr/bin/gconftool-2 || {';
    120   echo '  echo "WARNING: gconftool-2 not found; not uninstalling gconf schemas"';
    121   echo '  exit 0';
    122   echo '}';
    123   echo 'umask 0022';
    124   echo 'GCONF_CONFIG_SOURCE=xml:merged:$BASEDIR/etc/gconf/gconf.xml.defaults';
    125   echo 'GCONF_BACKEND_DIR=$PKG_INSTALL_ROOT/usr/lib/GConf/2';
    126   echo 'LD_LIBRARY_PATH=$PKG_INSTALL_ROOT/usr/lib';
    127   echo 'export GCONF_CONFIG_SOURCE GCONF_BACKEND_DIR LD_LIBRARY_PATH';
    128   echo 'SDIR=$BASEDIR%{_sysconfdir}/gconf/schemas';
    129   echo 'schemas="$SDIR/gok.schemas"';
    130   echo '$PKG_INSTALL_ROOT/usr/bin/gconftool-2 --makefile-uninstall-rule $schemas'
    131 ) | $BASEDIR/var/lib/postrun/postrun -i -c JDS -a
    132 
    133 %files
    134 %defattr (-, root, bin)
    135 %dir %attr (0755, root, bin) %{_bindir}
    136 %{_bindir}/*
    137 %dir %attr (0755, root, bin) %{_libdir}
    138 %{_libdir}/bonobo
    139 %dir %attr (0755, root, other) %{_libdir}/pkgconfig
    140 %{_libdir}/pkgconfig/*
    141 %dir %attr (0755, root, sys) %{_datadir}
    142 %dir %attr (0755, root, other) %{_datadir}/applications
    143 %{_datadir}/applications/*
    144 %doc -d gok-%{gok.version} README AUTHORS
    145 %doc(bzip2) -d gok-%{gok.version} COPYING NEWS ChangeLog
    146 %dir %attr (0755, root, other) %{_datadir}/doc
    147 %dir %attr (0755, root, other) %{_datadir}/gnome
    148 %{_datadir}/gnome/help/gok/C
    149 %{_datadir}/gok/*.png
    150 %{_datadir}/gok/*.kbd
    151 %{_datadir}/gok/*.rc
    152 %{_datadir}/gok/*.txt
    153 %{_datadir}/gok/*.xam
    154 %{_datadir}/gok/*.wav
    155 %{_datadir}/gok/glade
    156 %dir %attr (-, root, other) %{_datadir}/icons
    157 %dir %attr (-, root, other) %{_datadir}/icons/hicolor
    158 %dir %attr (-, root, other) %{_datadir}/icons/hicolor/48x48
    159 %dir %attr (-, root, other) %{_datadir}/icons/hicolor/48x48/apps
    160 %{_datadir}/icons/hicolor/48x48/apps/gok.png
    161 %{_datadir}/omf/gok/gok-C.omf
    162 %dir %attr (0755, root, other) %{_datadir}/pixmaps
    163 %{_datadir}/pixmaps/*
    164 %dir %attr(0755, root, bin) %{_mandir}
    165 %dir %attr(0755, root, bin) %{_mandir}/*
    166 %{_mandir}/*/*
    167 
    168 %files root
    169 %defattr (-, root, sys)
    170 %dir %attr (0755, root, sys) %{_sysconfdir}
    171 %{_sysconfdir}/gconf/schemas/gok.schemas
    172 
    173 %if %build_l10n
    174 %files l10n
    175 %defattr (-, root, bin)
    176 %dir %attr (0755, root, sys) %{_datadir}
    177 %dir %attr (0755, root, bin) %{_datadir}/gok
    178 %{_datadir}/gok/[a-z][a-z]
    179 %{_datadir}/gok/[a-z][a-z]_[A-Z][A-Z]
    180 %{_datadir}/gok/ang
    181 %{_datadir}/gok/sr@latin
    182 %defattr (-, root, other)
    183 %{_datadir}/locale/[a-z][a-z]
    184 %{_datadir}/locale/[a-z][a-z]_[A-Z][A-Z]
    185 %{_datadir}/locale/ang
    186 %{_datadir}/locale/sr@latin
    187 %endif
    188 
    189 %changelog
    190 * Thu Sep 18 2008 - li.yuan@sun.com
    191 - Added %doc to %files for copyright.
    192 * Mon Sep 01 2008 - christian.kelly@sun.com
    193 - Change dirs sr@Latn to sr@latin.
    194 * Mon Mar 31 2008 - li.yuan@sun.com
    195 - Add copyright file
    196 * Thu Jan 10 2008 - li.yuan@sun.com
    197 - change owner to liyuan.
    198 * Thu Jan  3 2008 - laca@sun.com
    199 - use gconf-install.script instead of an inline script
    200 * Mon Nov 05 2007 - li.yuan@sun.com
    201 - Use icon-cache.script for %post. Change the inline post script
    202   to an include.
    203 * Fri Oct 12 1007 - laca@sun.com
    204 - add /usr/X11/include to CFLAGS when built with FOX
    205 * Fri Sep 28 2007 - laca@sun.com
    206 - delete SUNWxwrtl dep
    207 * Mon May 28 2007 - damien.carbery@sun.com
    208 - Add hicolor dir to %files.
    209 * Tue Jan 30 2007 - brian.cameron@sun.com
    210 - Remove the 'ang' locale files when not doing l10n build.
    211 * Tue Jan 23 2007 - damien.carbery@sun.com
    212 - Add 'ang' locale.
    213 * Fri Sep 01 2006 - matt.keenan@sun.com
    214 - New man page tarball
    215 * Sat Aug 12 2006 - laca@sun.com
    216 - delete some unnecessary env variables
    217 * Fri Jul 14 2006 - laca@sun.com
    218 - update %post/%postun/etc scripts to support diskless client setup,
    219   part of 6448317
    220 * Fri Jul 14 2006 - damien.carbery@sun.com
    221 - Add %{_datadir}/locale to l10n package, byproduct of intltool update.
    222 * Thu Jun 29 2006 - laca@sun.com
    223 - update postrun scripts
    224 * Mon Jun 26 2006 - laca@sun.com
    225 - move back to /usr, part of CR 6412650
    226 * Sun Jun 11 2006 - laca@sun.com
    227 - change group from other to bin/sys
    228 * Wed May 31 2006 - damien.carbery@sun.com
    229 - Change dirs in base and l10n packages as l10n files have been moved around
    230   for the 1.0.10 tarball.
    231 * Thu May 25 2006 - laca@sun.com
    232 - use post/preun scripts to install schemas into the merged gconf files
    233 * Tue May 09 2006 - laca@sun.com
    234 - merge -share pkg(s) into the base pkg(s)
    235 * Mon Feb 20 2006 - damien.carbery@sun.com
    236 - Complete update of Build/Requires after running check-deps.pl script.
    237 * Thu Feb 16 2006 - damien.carbery@sun.com
    238 - Update Build/Requires after running check-deps.pl script.
    239 * Sat Dec  3 2005 - laca@sun.com
    240 - add %post script that runs update-desktop-database
    241 * Tue Nov 29 2005 - laca@sun.com
    242 - remove javahelp stuff
    243 * Mon Dec 13 2004 - damien.carbery@sun.com
    244 - Move to /usr/sfw to implement ARC decision.
    245 * Fri Nov 19 2004 - damien.carbery@sun.com
    246 - Fix for 6197815: move unsupported app to /usr/demo/jds.
    247 * Fri Nov 12 2004 - kazuhiko.maekawa@sun.com
    248 - Added workaround fix for 6193354
    249 * Wed Oct 06 2004 - matt.keenan@sun.com
    250 - added l10n help files
    251 * Sat Oct 02 2004 - laca@sun.com
    252 - added %pkgbuild_postprocess
    253 * Thu Sep 09 2004  matt.keenan@sun.com
    254 - Added create-branching-keyboard.1, gok.1 manpages
    255 * Thu Aug 26 2004  damien.carbery@sun.com
    256 - Lower optimization level on x86 to fix 5086691 - data corruption otherwise.
    257   -xO2 will take precedence over -xO4 because it is later in CFLAGS.
    258 * Sat Jun 26 2004  shirley.woo@sun.com
    259 - Changed install location to /usr/...
    260 * Wed Jun 23 2004 - muktha.narayan@wipro.com
    261 - Install schema files.
    262 * Wed Jun  2 2004 - takao.fujiwara@sun.com
    263 - Added %{_datadir}/locale to install l10n messages
    264 * Tue May 18 2004 - laca@sun.com
    265 - add gnome-speech dependency
    266 * Tue Mar 23 2004 - laca@sun.com
    267 - remove gtk-doc from %files
    268 * Tue Mar 02 2004 - laca@sun.com
    269 - add dependency on SUNWgnome-panel
    270 * Fri Feb 27 2004 - laca@sun.com
    271 - add %defattr for share subpkg
    272 * Thu Feb 26 2004 - laca@sun.com
    273 - add share %package
    274 - define PERL5LIB for XML::Parser
    275