SUNWgnome-config-editor.spec
author davelam
Thu, 07 Aug 2008 02:31:31 +0000
branchgnome-2-22
changeset 12491 b2fc226f1836
parent 12029 d3017ae2202e
child 13339 a9d320133fae
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-config-editor
#
# includes module(s): gconf-editor
#
# 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: stephen
#
%include Solaris.inc

%use gceditor = gconf-editor.spec

Name:                    SUNWgnome-config-editor
Summary:                 GNOME configuration database editor
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-config-editor-root
Requires: SUNWgnome-config
Requires: SUNWgnome-base-libs
Requires: SUNWgnome-libs
Requires: SUNWbzip
Requires: SUNWzlib
Requires: SUNWlxml
Requires: SUNWlibpopt
BuildRequires: SUNWlibpopt-devel
BuildRequires: SUNWgnome-base-libs-devel
BuildRequires: SUNWgnome-libs-devel
BuildRequires: SUNWgnome-config-devel
Requires: SUNWpostrun

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

%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
%gceditor.prep -d %name-%version
cd %{_builddir}/%name-%version
gzcat %SOURCE0 | tar xf -

%build
export PKG_CONFIG_PATH=%{_pkg_config_path}
export LDFLAGS="%_ldflags"
export CFLAGS="%optflags"
export RPM_OPT_FLAGS="$CFLAGS"

%gceditor.build -d %name-%version

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

rm -rf $RPM_BUILD_ROOT%{_prefix}/var
rm -rf $RPM_BUILD_ROOT/var

%if %build_l10n
%else
# REMOVE l10n FILES
rm -rf $RPM_BUILD_ROOT%{_datadir}/locale
rm -rf $RPM_BUILD_ROOT%{_datadir}/gnome/help/*/[a-z]*
rm -rf $RPM_BUILD_ROOT%{_datadir}/omf/*/*-[a-z][a-z].omf
#rm -rf $RPM_BUILD_ROOT%{_datadir}/omf/*/*-[a-z][a-z]_[A-Z]*.omf
%endif

%{?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

%post
( echo 'test -x /usr/bin/update-desktop-database || exit 0';
  echo '/usr/bin/update-desktop-database'
) | $BASEDIR/lib/postrun -b -u -c JDS_wait
( echo 'test -x /usr/bin/scrollkeeper-update || exit 0';
  echo '/usr/bin/scrollkeeper-update'
) | $BASEDIR/lib/postrun -b -u -c JDS

%postun
test -x $BASEDIR/lib/postrun || exit 0
( echo 'test -x /usr/bin/update-desktop-database || exit 0';
  echo '/usr/bin/update-desktop-database'
) | $BASEDIR/lib/postrun -b -u -c JDS
( echo 'test -x /usr/bin/scrollkeeper-update || exit 0';
  echo '/usr/bin/scrollkeeper-update'
) | $BASEDIR/lib/postrun -b -u -c JDS

%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/gconf-editor.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, sys) %{_datadir}
%dir %attr (0755, root, other) %{_datadir}/applications
%{_datadir}/applications/*
%dir %attr (0755, root, other) %{_datadir}/gnome
%{_datadir}/gnome/help/gconf-editor/C
%{_datadir}/omf/gconf-editor/*-C.omf
%dir %attr (0755, root, other) %{_datadir}/pixmaps
%{_datadir}/pixmaps/*
%attr (-, root, other) %{_datadir}/icons
%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/gconf-editor.schemas

%if %build_l10n
%files l10n
%defattr (-, root, bin)
%dir %attr (0755, root, sys) %{_datadir}
%dir %attr (0755, root, other) %{_datadir}/gnome
%{_datadir}/gnome/help/gconf-editor/[a-z][a-z]
%{_datadir}/omf/gconf-editor/gconf-editor-[a-z][a-z].omf
%attr (-, root, other) %{_datadir}/locale
%endif


%changelog
* Thu Jan  3 2008 - [email protected]
- use gconf-install.script instead of an inline script
* Tue Dec 19 2006 - [email protected]
- Add l10n files to the l10n package.
* Fri Sep 01 2006 - [email protected]
- New Manpage tarball
* Wed Aug 16 2006 - [email protected]
- Remove scrollkeeper files under /var. Remove missing help files from l10n 
  pkg.
* Sat Aug 12 2006 - [email protected]
- delete some unnecessary env variables; set CFLAGS
* Sat Aug 12 2006 - [email protected]
- change datadir/icons permissions back to root:other since it's a stable
  interface and wasn't supposed to be changed
* Fri Jul 14 2006 - [email protected]
- update %post/%postun/etc scripts to support diskless client setup,
  part of 6448317
* Thu Jun 29 2006 - [email protected]
- update postrun scripts
* Sun Jun 11 2006 - [email protected]
- change group from other to bin/sys
* Thu May 25 2006 - [email protected]
- use post/preun scripts to install schemas into the merged gconf files
* Wed May 10 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.
* Wed Jan 25 2006 - [email protected]
- Call gconf-merge-tree in %post to process /etc/gconf/gconf.xml.defaults in 
  root pkg. Add required SUNWpostrun dependency.
* Wed Jan 04 2006 - [email protected]
- Add BuildRequires to avoid build errors.
* Sat Dec  3 2005 - [email protected]
- add %post script that runs update-desktop-database
* Tue Nov 29 2005 - [email protected]
- remove javahelp stuff
* Tue Sep 13 2005 - [email protected]
- define root subpkg, install gconf schemas, add unpackaged files to %files
* Sat Oct 02 2004 - [email protected]
- added %pkgbuild_postprocess
* Wed Aug 25 2004  [email protected]
- Added l10n help entries in files
* Tue Aug 24 2004  [email protected]
- Added %{_datadir}/gnome/help/gconf-editor/C to install help.
* Sun Jun 27 2004  [email protected]
- Added BuildRequires SUNWgnome-javahelp-convert
* Sat Jun 26 2004  [email protected]
- Changed install location to /usr/...
* Wed Jun  2 2004 - [email protected]
- Added %{_datadir}/locale to install l10n messages
* Wed Mar 24 2004 - [email protected]
- Added SGML man page integration
* Thu Feb 26 2004 - <[email protected]>
- define PERL5LIB for XML::Parser
- remove unnecessary CFLAGS definitions
- fix permissions of %{_mandir}
* Tue Feb 17 2004 - <[email protected]>
- Inital Solaris spec file created