SUNWgnome-terminal.spec
author jerrytan
Mon, 11 Aug 2008 07:35:57 +0000
branchgnome-2-22
changeset 12497 f4743e0d8120
parent 11963 2d0d271222b0
child 12603 487365188422
permissions -rw-r--r--
update spec for tracker from vermillion

#
# spec file for package SUNWgnome-terminal
#
# includes module(s): vte gnome-terminal
#
# 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: yippi
#
%include Solaris.inc

%use vte = vte.spec
%use gterminal = gnome-terminal.spec

Name:                    SUNWgnome-terminal
Summary:                 GNOME terminal emulator
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-libs
Requires: SUNWgnome-base-libs
Requires: SUNWgnome-config
Requires: SUNWperl584usr
Requires: SUNWbzip
Requires: SUNWzlib
Requires: SUNWlxml
Requires: SUNWPython
Requires: SUNWgnome-python-libs
Requires: SUNWfontconfig
Requires: SUNWfreetype2
Requires: SUNWgnome-component
Requires: SUNWgnome-vfs
Requires: SUNWlibms
Requires: SUNWlibpopt
Requires: SUNWxwxft
Requires: SUNWpostrun
BuildRequires: SUNWgnome-libs-devel
BuildRequires: SUNWgnome-base-libs-devel
BuildRequires: SUNWgnome-config-devel
BuildRequires: SUNWgnome-component-devel
BuildRequires: SUNWgnome-vfs-devel
BuildRequires: SUNWlibpopt-devel
BuildRequires: SUNWPython-devel
BuildRequires: SUNWgnome-python-libs-devel

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

%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: SUNWperl584usr
Requires: SUNWgnome-base-libs

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

cd %{_builddir}/%name-%version/gnome-terminal-%{gterminal.version}
ln -s ../vte-%{vte.version}/src vte

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

%vte.build -d %name-%version
%gterminal.build -d %name-%version

%install
rm -rf $RPM_BUILD_ROOT
%vte.install -d %name-%version
%gterminal.install -d %name-%version

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

#rmdir $RPM_BUILD_ROOT/usr/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
rm -rf $RPM_BUILD_ROOT/var

%{?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/gnome-terminal.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*
%{_libdir}/bonobo/servers/*.server
%attr (-, root, bin) %{_libdir}/python*
%attr (0711, root, bin) %{_libexecdir}/gnome-pty-helper
%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/*/C
%{_datadir}/gnome-terminal
%{_datadir}/omf/*/*-C.omf
%dir %attr (0755, root, other) %{_datadir}/pixmaps
%{_datadir}/pixmaps/*
%{_datadir}/vte
%dir %attr(0755, root, bin) %{_mandir}
%dir %attr(0755, root, bin) %{_mandir}/man1
%{_mandir}/man1/*

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

%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/*
%{_libdir}/vte
%dir %attr (0755, root, sys) %{_datadir}
%{_datadir}/gtk-doc
%dir %attr(0755, root, bin) %{_mandir}
%dir %attr(0755, root, bin) %{_mandir}/man3
%{_mandir}/man3/*

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

%changelog
* Fri Mar 28 2008 - [email protected]
- Add SUNW_Copyright.
* Thu Jan  3 2008 - [email protected]
- use gconf-install.script instead of an inline script
* Tue Nov 06 2007 - [email protected]
- Add -R/usr/sfw/lib to LDFLAGS (-L/usr/sfw/lib was already there)
* Fri Sep 28 2007 - [email protected]
- delete Nevada X deps
- delete some unneeded env vars
* Sat Aug 18 2007 - [email protected]
- Comment out removal of /var dir as it is no longer installed.
* Tue Apr 24 2007 - [email protected]
- s/0755/-/ in defattr so that files are not made all executable
* Wed Jan 24 2007 - [email protected]
- Add to LDFLAGS to find libXrender.
* Mon Sep 04 2006 - [email protected]
- New Manpage tarball
* Thu Jul 27 2006 - [email protected]
- Delete scrollkeeper files before packaging.
* 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
* Fri Jun  2 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)
* Tue Feb 21 2006 - [email protected]
- Add X packages to Requires after running check-deps.pl script.
* Mon Feb 20 2006 - [email protected]
- Update Build/Requires after running check-deps.pl script.
* Wed Jan 18 2006 - [email protected]
- Remove application-registry from %files as it is no longer installed.
* Sat Dec  3 2005 - [email protected]
- add %post script that runs update-desktop-database
* Wed Nov 30 2005 - [email protected]
- Add Build/Requires on SUNWPython/-devel and SUNWgnome-python-libs/-devel.
* Tue Nov 29 2005 - [email protected]
- remove javahelp stuff
* Tue Sep 20 2005 - [email protected]
- update Python paths
* Fri Sep 16 2005 - [email protected]
- remove unpackaged files to add to %files
* Thu Sep 01 2005 - [email protected]
- Add /usr/sfw/lib/pkgconfig to PKG_CONFIG_PATH so that pygtk2 can be found.
* Thu May 19 2005 - [email protected]
- Update to 2.10
* Fri Oct 15 2004 - [email protected]
- Remove SGID bit from gnome-pty-helper. Fixes bugtraq bug#5091209.
* Sat Oct 02 2004 - [email protected]
- added %pkgbuild_postprocess
* Thu Sep 09 2004 - [email protected]
- Added libvte.3, vte.1 manpages
* Wed Aug 25 2004 - [email protected]
- Updated files section to extract only l10n contents 
* Mon Aug 23 2004 - [email protected]
- Bug 5090964 : remove l10n entries from base package into -l10n package
* Mon Aug 23 2004 - [email protected]
- s/SUNWpl5u/SUNWperl584usr/
* Wed Aug 18 2004  [email protected]
- Change manpage perms for Solaris integration.
* Thu Jul 08 2004  [email protected]
- Updated SUNWgnome-terminal.spec to make sure that gnome-pty-helper
  has permission 2711 instead of 2755 so these are the same for
  both Solaris and Linux.
* 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
* Sat Mar 06 2004 - [email protected]
- set LDFLAGS
* Sun Feb 29 2004 - [email protected]
- remove dependency on SUNWgnome-libs-share and SUNWgnome-libs-root, they
  are taken care by SUNWgnome-libs; fix gconf permissions
- add -D__STDC_VERSION__=199409L instead of -xc99=none
* Mon Feb 23 2004 - <[email protected]>
- install gconf schemas at end of install stage.
- run rm -Rf during clean stage.