SUNWgnome-a11y-gok.spec
author jerrytan
Mon, 11 Aug 2008 07:35:57 +0000
branchgnome-2-22
changeset 12497 f4743e0d8120
parent 11976 798f0ce46ec6
child 13342 7b087c1e5222
permissions -rw-r--r--
update spec for tracker from vermillion

#
# spec file for package SUNWgnome-a11y-gok
#
# includes module(s): gok
#
# Copyright 2008 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

%use gok = gok.spec

Name:                    SUNWgnome-a11y-gok
Summary:                 GNOME On-screen Keyboard
Version:                 %{default_pkg_version}
Source:                  %{name}-manpages-0.1.tar.gz
SUNW_BaseDir:            %{_basedir}
SUNW_Copyright:          %{name}.copyright
BuildRoot:               %{_tmppath}/%{name}-%{version}-build

%include default-depend.inc
Requires: SUNWgnome-a11y-libs
Requires: SUNWgnome-a11y-gok-root
Requires: SUNWgnome-panel
Requires: SUNWgnome-libs
Requires: SUNWgnome-a11y-speech
Requires: SUNWgnome-audio
Requires: SUNWgnome-base-libs
Requires: SUNWgnome-component
Requires: SUNWgnome-config
Requires: SUNWlibms
Requires: SUNWlxml
Requires: SUNWpostrun
BuildRequires: SUNWgnome-audio-devel
BuildRequires: SUNWgnome-base-libs-devel
BuildRequires: SUNWgnome-component-devel
BuildRequires: SUNWgnome-config-devel
BuildRequires: SUNWgnome-a11y-speech-devel
BuildRequires: SUNWgnome-panel-devel
BuildRequires: SUNWgnome-libs-devel

%package root
Summary:                 %{summary} - / filesystem
SUNW_BaseDir:            /
%include default-depend.inc
Requires: SUNWpostrun-root
Requires: SUNWgnome-config

%if %build_l10n
%package l10n
Summary:                 %{summary} - l10n files
SUNW_BaseDir:            %{_basedir}
%include default-depend.inc
Requires:                %{name}
%endif

%prep
rm -rf %name-%version
mkdir %name-%version
%gok.prep -d %name-%version
cd %{_builddir}/%name-%version
gzcat %SOURCE0 | tar -xf -

%build
export PKG_CONFIG_PATH=%{_pkg_config_path}
export LDFLAGS="%_ldflags"
%ifarch sparc
export CFLAGS="%optflags -I%{_includedir}"
%else
export CFLAGS="%optflags -xO2 -I%{_includedir}"
%endif
%if %option_with_fox
# for <X11/extensions/XInput.h>
export CFLAGS="$CFLAGS -I/usr/X11/include"
%endif
export RPM_OPT_FLAGS="$CFLAGS"
%gok.build -d %name-%version

%install
rm -rf $RPM_BUILD_ROOT
%gok.install -d %name-%version
rm -rf $RPM_BUILD_ROOT%{_mandir}
cd %{_builddir}/%name-%version/sun-manpages
make install DESTDIR=$RPM_BUILD_ROOT

%if %build_l10n
%else
# REMOVE l10n FILES
rm -r $RPM_BUILD_ROOT%{_datadir}/locale
rm -r $RPM_BUILD_ROOT%{_datadir}/gok/ang
rm -r $RPM_BUILD_ROOT%{_datadir}/gok/[a-z][a-z]
rm -r $RPM_BUILD_ROOT%{_datadir}/gok/[a-z][a-z]_[A-Z][A-Z]
rm -r $RPM_BUILD_ROOT%{_datadir}/gok/sr@Latn
%endif

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

%clean
rm -rf $RPM_BUILD_ROOT

%post
%include desktop-database-install.script
%include scrollkeeper-update.script
%include icon-cache.script

%postun
test -x $BASEDIR/lib/postrun || exit 0
%include desktop-database-uninstall.script
%include scrollkeeper-update.script

%post root
%include gconf-install.script

%preun root
test -x $BASEDIR/var/lib/postrun/postrun || exit 0
( echo 'test -x $PKG_INSTALL_ROOT/usr/bin/gconftool-2 || {';
  echo '  echo "WARNING: gconftool-2 not found; not uninstalling gconf schemas"';
  echo '  exit 0';
  echo '}';
  echo 'umask 0022';
  echo 'GCONF_CONFIG_SOURCE=xml:merged:$BASEDIR/etc/gconf/gconf.xml.defaults';
  echo 'GCONF_BACKEND_DIR=$PKG_INSTALL_ROOT/usr/lib/GConf/2';
  echo 'LD_LIBRARY_PATH=$PKG_INSTALL_ROOT/usr/lib';
  echo 'export GCONF_CONFIG_SOURCE GCONF_BACKEND_DIR LD_LIBRARY_PATH';
  echo 'SDIR=$BASEDIR%{_sysconfdir}/gconf/schemas';
  echo 'schemas="$SDIR/gok.schemas"';
  echo '$PKG_INSTALL_ROOT/usr/bin/gconftool-2 --makefile-uninstall-rule $schemas'
) | $BASEDIR/var/lib/postrun/postrun -i -c JDS -a

%files
%defattr (-, root, bin)
%dir %attr (0755, root, bin) %{_bindir}
%{_bindir}/*
%dir %attr (0755, root, bin) %{_libdir}
%{_libdir}/bonobo
%dir %attr (0755, root, other) %{_libdir}/pkgconfig
%{_libdir}/pkgconfig/*
%dir %attr (0755, root, sys) %{_datadir}
%dir %attr (0755, root, other) %{_datadir}/applications
%{_datadir}/applications/*
%dir %attr (0755, root, other) %{_datadir}/gnome
%{_datadir}/gnome/help/gok/C
%{_datadir}/gok/*.png
%{_datadir}/gok/*.kbd
%{_datadir}/gok/*.rc
%{_datadir}/gok/*.txt
%{_datadir}/gok/*.xam
%{_datadir}/gok/*.wav
%{_datadir}/gok/glade
%dir %attr (-, root, other) %{_datadir}/icons
%dir %attr (-, root, other) %{_datadir}/icons/hicolor
%dir %attr (-, root, other) %{_datadir}/icons/hicolor/48x48
%dir %attr (-, root, other) %{_datadir}/icons/hicolor/48x48/apps
%{_datadir}/icons/hicolor/48x48/apps/gok.png
%{_datadir}/omf/gok/gok-C.omf
%dir %attr (0755, root, other) %{_datadir}/pixmaps
%{_datadir}/pixmaps/*
%dir %attr(0755, root, bin) %{_mandir}
%dir %attr(0755, root, bin) %{_mandir}/*
%{_mandir}/*/*

%files root
%defattr (-, root, sys)
%dir %attr (0755, root, sys) %{_sysconfdir}
%{_sysconfdir}/gconf/schemas/gok.schemas

%if %build_l10n
%files l10n
%defattr (-, root, bin)
%dir %attr (0755, root, sys) %{_datadir}
%dir %attr (0755, root, bin) %{_datadir}/gok
%{_datadir}/gok/[a-z][a-z]
%{_datadir}/gok/[a-z][a-z]_[A-Z][A-Z]
%{_datadir}/gok/ang
%{_datadir}/gok/sr@Latn
%defattr (-, root, other)
%{_datadir}/locale/[a-z][a-z]
%{_datadir}/locale/[a-z][a-z]_[A-Z][A-Z]
%{_datadir}/locale/ang
%{_datadir}/locale/sr@Latn
%endif

%changelog
* Mon Mar 31 2008 - [email protected]
- Add copyright file
* Thu Jan 10 2008 - [email protected]
- change owner to liyuan.
* Thu Jan  3 2008 - [email protected]
- use gconf-install.script instead of an inline script
* Mon Nov 05 2007 - [email protected]
- Use icon-cache.script for %post. Change the inline post script
  to an include.
* Fri Oct 12 1007 - [email protected]
- add /usr/X11/include to CFLAGS when built with FOX
* Fri Sep 28 2007 - [email protected]
- delete SUNWxwrtl dep
* Mon May 28 2007 - [email protected]
- Add hicolor dir to %files.
* Tue Jan 30 2007 - [email protected]
- Remove the 'ang' locale files when not doing l10n build.
* Tue Jan 23 2007 - [email protected]
- Add 'ang' locale.
* Fri Sep 01 2006 - [email protected]
- New man page tarball
* Sat Aug 12 2006 - [email protected]
- delete some unnecessary env variables
* Fri Jul 14 2006 - [email protected]
- update %post/%postun/etc scripts to support diskless client setup,
  part of 6448317
* Fri Jul 14 2006 - [email protected]
- Add %{_datadir}/locale to l10n package, byproduct of intltool update.
* Thu Jun 29 2006 - [email protected]
- update postrun scripts
* Mon Jun 26 2006 - [email protected]
- move back to /usr, part of CR 6412650
* Sun Jun 11 2006 - [email protected]
- change group from other to bin/sys
* Wed May 31 2006 - [email protected]
- Change dirs in base and l10n packages as l10n files have been moved around
  for the 1.0.10 tarball.
* Thu May 25 2006 - [email protected]
- use post/preun scripts to install schemas into the merged gconf files
* Tue May 09 2006 - [email protected]
- merge -share pkg(s) into the base pkg(s)
* Mon Feb 20 2006 - [email protected]
- Complete update of Build/Requires after running check-deps.pl script.
* Thu Feb 16 2006 - [email protected]
- Update Build/Requires after running check-deps.pl script.
* Sat Dec  3 2005 - [email protected]
- add %post script that runs update-desktop-database
* Tue Nov 29 2005 - [email protected]
- remove javahelp stuff
* Mon Dec 13 2004 - [email protected]
- Move to /usr/sfw to implement ARC decision.
* Fri Nov 19 2004 - [email protected]
- Fix for 6197815: move unsupported app to /usr/demo/jds.
* Fri Nov 12 2004 - [email protected]
- Added workaround fix for 6193354
* Wed Oct 06 2004 - [email protected]
- added l10n help files
* Sat Oct 02 2004 - [email protected]
- added %pkgbuild_postprocess
* Thu Sep 09 2004  [email protected]
- Added create-branching-keyboard.1, gok.1 manpages
* Thu Aug 26 2004  [email protected]
- Lower optimization level on x86 to fix 5086691 - data corruption otherwise.
  -xO2 will take precedence over -xO4 because it is later in CFLAGS.
* Sat Jun 26 2004  [email protected]
- Changed install location to /usr/...
* Wed Jun 23 2004 - [email protected]
- Install schema files.
* Wed Jun  2 2004 - [email protected]
- Added %{_datadir}/locale to install l10n messages
* Tue May 18 2004 - [email protected]
- add gnome-speech dependency
* Tue Mar 23 2004 - [email protected]
- remove gtk-doc from %files
* Tue Mar 02 2004 - [email protected]
- add dependency on SUNWgnome-panel
* Fri Feb 27 2004 - [email protected]
- add %defattr for share subpkg
* Thu Feb 26 2004 - [email protected]
- add share %package
- define PERL5LIB for XML::Parser