SUNWgnome-wm.spec
author laca
Tue, 05 Aug 2008 04:33:16 +0000
branchgnome-2-22
changeset 12486 7fa2b2b0dddb
parent 12042 821b7874d57c
child 13412 144b3398d062
permissions -rw-r--r--
2008-08-05 Laszlo (Laca) Peter <[email protected]> * indiana/SUNWgetting-started-guide.spec: bump to 0.7.0; delete patches * patches/getting-started-guide-01-refresh-0.diff: delete * patches/getting-started-guide-02-po.diff: delete * indiana/SUNWopensolaris-welcome.spec: bump to 0.0.6 for bts release

#
# spec file for package SUNWgnome-wm
#
# includes module(s): metacity
#
# 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: erwannc
#
%include Solaris.inc

%use metacity = metacity.spec

Name:                    SUNWgnome-wm
Summary:                 GNOME window manager
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
BuildRequires: SUNWxorg-headers
BuildRequires: SUNWgnome-libs-devel
BuildRequires: SUNWgnome-base-libs-devel
BuildRequires: SUNWgnome-config-devel
Requires: SUNWgnome-wm-root
Requires: SUNWgnome-libs
Requires: SUNWgnome-base-libs
Requires: SUNWgnome-config
Requires: SUNWbzip
Requires: SUNWzlib
Requires: SUNWlxml
Requires: SUNWlibms
Requires: SUNWpostrun

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

%package  devel
Summary:                 %{summary} - development files
SUNW_BaseDir:            %{_basedir}
%include default-depend.inc
Requires: %{name}
Requires: SUNWgnome-base-libs-devel
                                                                                
%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
%metacity.prep -d %name-%version
cd %{_builddir}/%name-%version
gzcat %SOURCE0 | tar xf -

%build
export CFLAGS="%optflags -I/usr/sfw/include -I/usr/X11/include -I/usr/sfw/include/freetype2 -DANSICPP"
export RPM_OPT_FLAGS="$CFLAGS"
export LDFLAGS="%_ldflags -L/usr/X11/lib -R/usr/X11/lib -L/usr/sfw/lib -R/usr/sfw/lib -lXrender"
export PKG_CONFIG_PATH=%{_pkg_config_path}

%metacity.build -d %name-%version

%install
rm -rf $RPM_BUILD_ROOT
%metacity.install -d %name-%version

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

# Move demo to demo directory.
#
install -d $RPM_BUILD_ROOT%{_prefix}/demo/jds/bin
mv $RPM_BUILD_ROOT%{_bindir}/metacity-window-demo $RPM_BUILD_ROOT%{_prefix}/demo/jds/bin/metacity-window-demo

%if %build_l10n
%else
# REMOVE l10n FILES
rm -rf $RPM_BUILD_ROOT%{_datadir}/locale
%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

%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

%post root
%include gconf-install.script

%ifarch sparc
( echo 'test -x /usr/bin/gconftool-2 || {';
  echo '  echo "ERROR: gconftool-2 not found"';
  echo '  exit 0';
  echo '}';
  echo 'umask 0022';
  echo "GCONF_CONFIG_SOURCE=xml:merged:/etc/gconf/gconf.xml.defaults";
  echo 'export GCONF_CONFIG_SOURCE';
  echo "SDIR=%{_sysconfdir}/gconf/schemas";
  echo '/usr/bin/gconftool-2 --direct --config-source=$GCONF_CONFIG_SOURCE -t bool -s /apps/metacity/general/reduced_resources true'
) | $BASEDIR/var/lib/postrun/postrun -c JDS_wait
%endif

%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/metacity.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}/lib*.so*
%{_libexecdir}/metacity-dialog
%dir %attr (0755, root, sys) %{_datadir}
%dir %attr (0755, root, other) %{_datadir}/gnome
%{_datadir}/gnome/*
%{_datadir}/metacity/icons
%{_datadir}/themes
%{_datadir}/gnome-control-center/keybindings
%dir %attr(0755, root, bin) %{_mandir}
%dir %attr(0755, root, bin) %{_mandir}/*
%{_mandir}/*/*

%files devel
%defattr (-, root, bin)
%dir %attr (0755, root, bin) %{_includedir}
%{_includedir}/*
%dir %attr (0755, root, bin) %{_libdir}
%dir %attr (0755, root, other) %{_libdir}/pkgconfig
%{_libdir}/pkgconfig/*
%{_prefix}/demo/jds/bin/metacity-window-demo

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

%if %build_l10n
%files l10n
%defattr (-, root, bin)
%dir %attr (0755, root, sys) %{_datadir}
%attr (-, root, other) %{_datadir}/locale
%endif

%changelog
* Thu Jan  3 2008 - [email protected]
- use gconf-install.script instead of an inline script
* Fri Sep 28 2007 - [email protected]
- delete SUNWxwrtl and SUNWxorg-clientlibs deps
- delete some unnecessary env variables
* Tue Aug 07 2007 - [email protected]
- Updated for %files for new tarball - change %{_datadir}/control-center to
  %{_datadir}/gnome-control-center.
* Mon May 14 2007 - [email protected]
- Added new dir in %files
* Mon Sep 04 2006 - [email protected]
- New Manpage tarball
* 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
* Fri May 12 2006 - [email protected]
- Small update to dependency list after check-deps.pl run.
* Thu May 11 2006 - [email protected]
- Move metacity-window-demo to /usr/share/jds/bin and no longer include
  the useless manpage.
* Wed May 10 2006 - [email protected]
- merge -share pkg(s) into the base pkg(s)
* Fri Feb 17 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
* Thu Jun 02 2005 - [email protected]
- Install l10n package last since it fails when building
  outside of the official build.
* Thu May 19 2005 - [email protected]
- Update to 2.10 and fix packaging.
* Wed Nov 10 2004 - [email protected]
- Set reduced_resource key to true on sparc m/c's
* Fri Oct 08 2004 - [email protected]
- Added patch metacity-02-enable-Sun-keys-Open-Front.diff.
  Fixes bug 5103120. 
* Sat Oct 02 2004 - [email protected]
- added %pkgbuild_postprocess
* Sat Sep 11 2004 - [email protected]
- Set LDFLAGS so Xrandr and Xrender can be found.
* Thu Sep 09 2004 - [email protected]
- Added metacity-message.1, metacity-window-demo.1 manpages
* Thu Aug 26 2004 - [email protected]
- Added patch to use sdtprocess instead of gnome-system-monitor.
* Wed Aug 18 2004 - [email protected]
- Change manpage perms for Solaris integration.
* 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
* Mon Mar 01 2004 - <[email protected]>
- remove dependencies on SUNWgnome-libs-share and root
* Thu Feb 26 2004 - <[email protected]>
- set PERL5LIB for XML::Parser
* Mon Feb 22 2004 - <[email protected]>
- install gconf schemas at end of install stage.
- make clean stage clean stuff up.