Solaris/SUNWgnome-pilot.spec
author dcarbery
Fri, 24 Nov 2006 16:37:59 +0000
branch217update
changeset 19096 d542fc2c823e
parent 8565 b102e7809c6e
child 8912 d1af7fd20f96
child 18995 3ca07a20e44c
permissions -rw-r--r--
Merged trunk changes r9797:9829 into 217update branch.

#
# spec file for package SUNWgnome-pilot
#
# includes module(s): gnome-pilot
#
# Copyright (c) 2005 Sun Microsystems, Inc.
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
# Owner: jyu_mit
#
%include Solaris.inc
%define plink_prefix /usr/sfw
%define makeinstall make install
%use gpilot = gnome-pilot.spec

Name:          SUNWgnome-pilot
Summary:       PalmPilot link utilities
Version:       %{gpilot.version}
Source:        %{name}-manpages-0.1.tar.gz
SUNW_BaseDir:  %{_basedir}
BuildRoot:     %{_tmppath}/%{name}-%{version}-build
%include default-depend.inc
Requires:      SUNWpltlk
Requires:      SUNWgnome-panel
Requires:      SUNWgnome-base-libs
Requires:      SUNWgnome-libs
Requires:      SUNWxwrtl
# SUNWxwplt and SUNWxwice contain the libSM.so.6 and libICE.so.6 libraries while
# SUNWxwrtl contains symlinks pointing to these. ldd points to the symlinks.
Requires:      SUNWxwplt
Requires:      SUNWxwice
Requires:      SUNWlxml
Requires:      SUNWzlib
Requires:      SUNWlibpopt
Requires:      SUNWmlib
Requires:      SUNWlibms
Requires:      SUNWlibmsr
Requires:      SUNWgnome-component
Requires:      SUNWgnome-config
Requires:      SUNWgnome-vfs
Requires:      SUNWpostrun
BuildRequires: SUNWgnome-panel-devel
BuildRequires: SUNWgnome-base-libs-devel
BuildRequires: SUNWgnome-libs-devel
BuildRequires: SUNWgnome-component-devel
BuildRequires: SUNWgnome-config-devel
BuildRequires: SUNWgnome-vfs-devel
BuildRequires: SUNWpltlk
BuildRequires: SUNWsfwhea
BuildConflicts:	SUNWgnome-pilot-link
BuildConflicts:	SUNWgnome-pilot-link-root
BuildConflicts:	SUNWgnome-pilot-link-share
BuildConflicts:	SUNWgnome-pilot-link-devel
BuildConflicts:	SUNWgnome-pilot-link-devel-share

%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:      %{name}

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

%build
export LDFLAGS="-L/usr/lib -R/usr/lib -L%{plink_prefix}/lib -R%{plink_prefix}/lib"
export ACLOCAL_FLAGS="-I %{_datadir}/aclocal"
export MSGFMT="/usr/bin/msgfmt"
export PERL5LIB=%{_prefix}/perl5/site_perl/5.6.1/sun4-solaris-64int
export PKG_CONFIG_PATH=%{_pkg_config_path}
export CFLAGS="%optflags -I%{plink_prefix}/include"
export RPM_OPT_FLAGS="$CFLAGS"
%gpilot.build -d %name-%version

%install
rm -rf $RPM_BUILD_ROOT
%gpilot.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 -rf $RPM_BUILD_ROOT%{_datadir}/locale
# rm -rf $RPM_BUILD_ROOT%{_datadir}/gnome/help/*/[a-z]*
# rm -rf $RPM_BUILD_ROOT%{_datadir}/omf/*/gnome-pilot-??*.omf
%endif

%{?pkgbuild_postprocess: %pkgbuild_postprocess -v -c "%{version}:%{jds_version}:%{name}:$RPM_ARCH:%(date +%%Y-%%m-%%d):supported" $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
( 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/pilot.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
%{_libdir}/gnome-pilot/conduits/lib*.so
%{_libexecdir}/gpilotd
%{_libexecdir}/gpilot-applet
%dir %attr (0755, root, sys) %{_datadir}
%{_datadir}/gnome-pilot
%dir %attr (0755, root, other) %{_datadir}/mime-info
%{_datadir}/mime-info/*
%dir %attr (0755, root, other) %{_datadir}/pixmaps
%{_datadir}/pixmaps/*
%dir %attr (0755, root, other) %{_datadir}/applications
%{_datadir}/applications/*
%dir %attr (0755, root, other) %{_datadir}/gnome
%{_datadir}/gnome/help/gnome-pilot/C
%{_datadir}/omf/gnome-pilot/*-C.omf
%dir %attr(0755, root, bin) %{_mandir}
%dir %attr(0755, root, bin) %{_mandir}/*
%{_mandir}/*/*

%if %build_l10n
%files l10n
%defattr (-, root, bin)
%dir %attr (0755, root, sys) %{_datadir}
%attr (-, root, other) %{_datadir}/locale
%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/*
%dir %attr (0755, root, sys) %{_datadir}
%{_datadir}/idl

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

%changelog
* 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
* Wed Jun 28 2006 - [email protected]
- Remove Build/Requires SUNWgob.
* Sun Jun 11 2006 - [email protected]
- change group from other to bin/sys
* Thu Jan 08 2006 - [email protected]
- Change dependency from SUNWgob2 to SUNWgob.
* Tue Jun 06 2006 - [email protected]
- Add build depend SUNWgob2.
* Fri Jun  2 2006 - [email protected]
- use post/preun scripts to install schemas into the merged gconf files
* Thu Jun 01 2006 - [email protected]
- Remove SUNWlibmr dependency. It was a typo when fixing 6380655. This removal 
  fixes 6432832.
* Thu May 11 2006 - [email protected]
- Change %defattr to (-, root, other).
- Merge -share pkg(s) into the base pkg(s).
* Mon Mar 20 2006 - [email protected]
- Install capplet into the correct location.
* Fri Feb  3 2006 - [email protected]
- Add multiple Build/Requires to fix 6380655.
* Tue Jan 10 2006 - [email protected]
- Inherited from SUNWgnome-pilot-link(tag=cinnabar-solaris)
  to replace SUNWgnome-pilot-link.spec.
* Sat Dec  3 2005 - [email protected]
- add %post script that runs update-desktop-database
* Tue Nov 29 2005 - [email protected]
- remove javahelp stuff
* Mon Sep 12 2005 - [email protected]
- Add missing dir to %files
* Tue Jul 12 2005 - [email protected]
- Disable inclusion of some l10n files as they are not yet available.
* Sat Oct 02 2004 - [email protected]
- added %pkgbuild_postprocess
* Thu Sep 09 2004  [email protected]
- Added gpilot-install-file.1, gpilotd-control-applet.1 manpages
* Thu Aug 26 2004  [email protected]
- Minor mod to how omf files specified in l10n package so C locale version is
  not included as it is already in the -share package.
* Wed Aug 25 2004  [email protected]
- Added l10n help entry in l10 pkg
* Sat Jun 26 2004  [email protected]
- Changed install location to /usr/...
* Wed Jun  2 2004 - [email protected]
- Added %{_datadir}/locale to install l10n messages
* Tue Mar 16 2004 - <[email protected]>
- initial version created