Solaris/SUNWgnome-vfs.spec
author dcarbery
Fri, 24 Nov 2006 16:37:59 +0000
branch217update
changeset 19096 d542fc2c823e
parent 8565 b102e7809c6e
child 8653 0b6e2b6f62fb
child 19012 c5995bc55c11
permissions -rw-r--r--
Merged trunk changes r9797:9829 into 217update branch.

#
# spec file for package SUNWgnome-vfs
#
# includes module(s): gnome-mime-data, gnome-vfs
#
# Copyright (c) 2004 Sun Microsystems, Inc.
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
# Owner: gheet
#
%include Solaris.inc

%define with_hal %(pkginfo -q SUNWhal && echo 1 || echo 0)

%use smimeinfo = shared-mime-info.spec
%use gmdata = gnome-mime-data.spec
%use gvfs = gnome-vfs.spec

Name:                    SUNWgnome-vfs
Summary:                 GNOME virtual file system framework and application/MIME type registry
Version:                 %{default_pkg_version}
Source:                  %{name}-manpages-0.1.tar.gz
SUNW_BaseDir:            %{_basedir}
BuildRoot:               %{_tmppath}/%{name}-%{version}-build

%include default-depend.inc
Requires: SUNWgnome-vfs-root
Requires: SUNWgnome-base-libs
Requires: SUNWgnome-config
Requires: SUNWgnome-component
Requires: SUNWdbus
Requires: SUNWperl584usr
Requires: SUNWbzip
Requires: SUNWzlib
Requires: SUNWlxml
Requires: SUNWsmbau
Requires: SUNWpostrun
Requires: SUNWlibms
Requires: SUNWopenssl-libraries
%if %with_hal
Requires: SUNWhal
%endif
BuildRequires: SUNWgnome-base-libs-devel
BuildRequires: SUNWgnome-config-devel
BuildRequires: SUNWgnome-component-devel
BuildRequires: SUNWdbus-devel
BuildRequires: SUNWopenssl-libraries
BuildRequires: SUNWopenssl-include
BuildRequires: SUNWsmbaS

%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

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

%build
export PKG_CONFIG_PATH=../gnome-mime-data-%{gmdata.version}:../gnome-vfs-%{gvfs.version}:%{_pkg_config_path}
export CFLAGS="%optflags -I%{_includedir} -I/usr/sfw/src/samba/source/include"
export RPM_OPT_FLAGS="$CFLAGS"
export MSGFMT="/usr/bin/msgfmt"
export ACLOCAL_FLAGS="-I %{_datadir}/aclocal"
export PERL5LIB=%{_prefix}/perl5/site_perl/5.6.1/sun4-solaris-64int

%smimeinfo.build -d %name-%version
%gmdata.build -d %name-%version

export LDFLAGS="%_ldflags -L/usr/sfw/lib -R/usr/sfw/lib"
%gvfs.build -d %name-%version

%install
rm -rf $RPM_BUILD_ROOT
export PKG_CONFIG_PATH=../gnome-mime-data-%{gmdata.version}:../gnome-vfs-%{gvfs.version}:%{_libdir}/pkgconfig:/usr/lib/pkgconfig
%smimeinfo.install -d %name-%version
%gmdata.install -d %name-%version
%gvfs.install -d %name-%version
LD_LIBRARY_PATH=$RPM_BUILD_ROOT%{_libdir} $RPM_BUILD_ROOT%{_bindir}/update-mime-database $RPM_BUILD_ROOT%{_datadir}/mime

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

rm -rf $RPM_BUILD_ROOT%{_prefix}/doc

%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
# even though this package includes /usr/bin/update-desktop-database
# so we know it's always there, keep the postrun commands the same
# for this and -share so that postrun will only run it once (-u option)
( echo 'test -x %{_bindir}/update-mime-database || exit 0';
  echo '%{_bindir}/update-mime-database %{_datadir}/mime'
) | $BASEDIR/lib/postrun -b -u -c JDS_wait

%post root
( 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 '/usr/bin/gconftool-2 --makefile-install-rule %{_sysconfdir}/gconf/schemas/*.schemas'
) | $BASEDIR/var/lib/postrun/postrun -u -c JDS_wait

%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/desktop_default_applications.schemas';
  echo '         $SDIR/desktop_gnome_url_handlers.schemas';
  echo '         $SDIR/system_dns_sd.schemas';
  echo '         $SDIR/system_http_proxy.schemas';
  echo '         $SDIR/system_smb.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}/gnome-vfs-2.0/modules/*.so
%{_libdir}/lib*.so*
%{_libdir}/gnome-vfs-daemon
%dir %attr (0755, root, sys) %{_datadir}
%ghost %attr (-, root, root) %{_datadir}/mime
%dir %attr (0755, root, other) %{_datadir}/mime-info
%{_datadir}/mime-info/*
%dir %attr (0755, root, other) %{_datadir}/application-registry
%{_datadir}/application-registry/*
%dir %attr (0755, root, other) %{_datadir}/applications
%{_datadir}/applications/*
%{_datadir}/dbus-1/services/gnome-vfs-daemon.service
%dir %attr(0755, root, bin) %{_mandir}
%dir %attr(0755, root, bin) %{_mandir}/man1
%{_mandir}/man1/*

%files root
%defattr (0755, root, sys)
%attr (0755, root, sys) %dir %{_sysconfdir}
%{_sysconfdir}/gconf/schemas/desktop_default_applications.schemas
%{_sysconfdir}/gconf/schemas/desktop_gnome_url_handlers.schemas
%{_sysconfdir}/gconf/schemas/system_dns_sd.schemas
%{_sysconfdir}/gconf/schemas/system_http_proxy.schemas
%{_sysconfdir}/gconf/schemas/system_smb.schemas
%{_sysconfdir}/gnome-vfs-2.0
%ghost %{_sysconfdir}/gnome-vfs-mime-magic

%files devel
%defattr (-, root, bin)
%dir %attr (0755, root, bin) %{_libdir}
%dir %attr (0755, root, other) %{_libdir}/pkgconfig
%{_libdir}/pkgconfig/*
%{_libdir}/gnome-vfs-2.0/include
%dir %attr (0755, root, bin) %{_includedir}
%{_includedir}/*
%dir %attr (0755, root, sys) %{_datadir}
%{_datadir}/gtk-doc
%dir %attr(0755, root, bin) %{_mandir}
%dir %attr(0755, root, bin) %{_mandir}/man3
%dir %attr(0755, root, bin) %{_mandir}/man4
%{_mandir}/man3/*
%{_mandir}/man4/*

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

%changelog
* Fri Oct 20 2006 - [email protected]
- Remove SUNWhalh BuildRequires because header files are in SUNWhea in snv_51.
* Mon Sep 18 2006 - [email protected]
- Add SUNWhalh BuildRequires.
* Mon Sep 04 2006 - [email protected]
- New Manpage tarball
* Mon Aug 14 2006 - [email protected]
- Add Build/Requires SUNWhal after check-deps.pl run.
* Sat Jul 29 2006 - [email protected]
- Add Build/Requires SUNWdbus/-devel.
* Sat Jul 22 2006 - [email protected]
- update %files: delete %{libdir}/_bonobo, add %{_datadir}/dbus-1
* 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)
* Thu Apr  6 2006 - [email protected]
- Add SUNWopenssl-libraries/include to Build/Requires after check-deps.pl run.
* Mon Feb 20 2006 - [email protected]
- Update Build/Requires after running check-deps.pl script.
* Sat Dec  3 2005 - [email protected]
- add %post script that runs update-mime-database
* Tue Sep 06 2005 - [email protected]
- add to %files or remove unpackaged files
* Wed May 11 2005 - [email protected]
- Fixed packaging for 2.10 codebase.
* Thu Oct 14 2004 - [email protected]
- Added SUNWsmbau, SUNWsmbaS packages as Requires/BuildRequires, so that
  smb:// is built for Solaris.
* Sat Oct 02 2004 - [email protected]
- added %pkgbuild_postprocess
* Fri Sep 24 2004 - [email protected]
- remove %{_datadir}/gnome too, it also belonged to the nfs module
* Thu Sep 23 2004 - [email protected]
- remove reserved-port-helper from %files as the patch that created it
  was removed from the Linux spec file
* Thu Sep 09 2004 - [email protected]
- Added gnomevfs-*.1, upadte-mime-database.1 manpages
* Thu Sep 02 2004 - [email protected]
- Don't build gnome-vfs-extras for Solaris. We will build smb:/// method
  of gnome-vfs itself, as samba support is available now.
- Added /usr/sfw/bin to LDFLAGS and /usr/sfw/src/samba/sources/include to
  CFLAGS, so that smb:/// support is build for Solaris. samba team will
  change the path of libraries from /usr/sfw/bin to /usr/sfw/lib (bug#5088461)
  Once they change it, we can remove /usr/sfw/bin from LDFLAGS.
* Mon Aug 30 2004 - [email protected]
- Bug 5091588 : sman3/4 files should be in a separate devel package
* Mon Aug 23 2004 - [email protected]
- s/SUNWpl5u/SUNWperl584usr/
* Wed Aug 18 2004  [email protected]
- Change manpage perms for Solaris integration.
* Mon Aug 02 2004  [email protected]
- Added /usr/sfw/lib to LDFLAGS. Fixes bugtraq bug#5080276
* Sat Jun 26 2004  [email protected]
- Changed install location to /usr/...
* Thu May 27 2004 - [email protected]
- added l10n subpkg
* Tue May 25 2004 - [email protected]
- run update-mime-database in %install
* Thu May 20 2004 - [email protected]
- Fixed man page installation.
* Sun May 02 2004 - [email protected]
- define PKG_CONFIG_PATH in %install too, for some relink stuff.
* Sun Apr 04 2004 - [email protected]
- Added a missing header file
* Wed Mar 24 2004 - [email protected]
- Added SGML man page integration
* Tue Mar 02 2004 - [email protected]
- add shared-mime-info component to pkg.
* Mon Mar 01 2004 - [email protected]
- add in missing gnome-vfs-daemon binary
* Sun Feb 29 2004 - [email protected]
- remove some gconf files that clash with SUNWgnome-libs & SUNWgnome-terminal
* Wed Feb 25 2004 - [email protected]
- remove sym link build hacks and add -R{_libdir}
  to LDFLAGS
* Mon Feb 23 2004 - [email protected]
- install gconf schemas at end of install stage.
* Mon Jan 26 2004 - [email protected]
- initial version added to CVS