Home | History | Annotate | Download | only in trunk
      1 #
      2 # spec file for package SUNWgnome-keyring-manager
      3 #
      4 # includes module(s): gnome-keyring-manager
      5 #
      6 # Copyright 2008 Sun Microsystems, Inc.
      7 # This file and all modifications and additions to the pristine
      8 # package are under the same license as the package itself.
      9 #
     10 # Owner: dkenny
     11 #
     12 %include Solaris.inc
     13 
     14 %use gnomekeyringmanager = gnome-keyring-manager.spec
     15 
     16 Name:                    SUNWgnome-keyring-manager
     17 Summary:                 GNOME Keyring Manager
     18 Version:                 %{default_pkg_version}
     19 SUNW_BaseDir:            %{_basedir}
     20 SUNW_Copyright:          %{name}.copyright
     21 BuildRoot:               %{_tmppath}/%{name}-%{version}-build
     22 
     23 %include default-depend.inc
     24 Requires: SUNWgnome-libs
     25 Requires: SUNWgnome-base-libs
     26 Requires: SUNWgnome-config
     27 BuildRequires: SUNWgnome-config-devel
     28 BuildRequires: SUNWgnome-libs
     29 Requires: SUNWpostrun
     30 
     31 %if %build_l10n
     32 %package l10n
     33 Summary:                 %{summary} - l10n files
     34 SUNW_BaseDir:            %{_basedir}
     35 %include default-depend.inc
     36 Requires:                %{name}
     37 %endif
     38 
     39 %package root
     40 Summary:                 %{summary} - / filesystem
     41 SUNW_BaseDir:            /
     42 %include default-depend.inc
     43 Requires: SUNWpostrun-root
     44 Requires: SUNWgnome-config
     45 
     46 %prep
     47 rm -rf %name-%version
     48 mkdir %name-%version
     49 %gnomekeyringmanager.prep -d %name-%version
     50 
     51 %build
     52 export PKG_CONFIG_PATH=%{_pkg_config_path}
     53 export CFLAGS="%optflags -I%{_includedir}"
     54 export RPM_OPT_FLAGS="$CFLAGS"
     55 export LDFLAGS="%_ldflags"
     56 
     57 %gnomekeyringmanager.build -d %name-%version
     58 
     59 %install
     60 rm -rf $RPM_BUILD_ROOT
     61 %gnomekeyringmanager.install -d %name-%version
     62 
     63 %if %build_l10n
     64 %else
     65 # REMOVE l10n FILES
     66 rm -rf $RPM_BUILD_ROOT%{_datadir}/gnome/help/*/[a-z]*
     67 rm -rf $RPM_BUILD_ROOT%{_datadir}/omf/*/*-[a-z][a-z].omf
     68 rm -rf $RPM_BUILD_ROOT%{_datadir}/omf/*/*-[a-z][a-z]_[A-Z][A-Z].omf
     69 rm -rf $RPM_BUILD_ROOT%{_datadir}/locale
     70 %endif
     71 
     72 %clean
     73 rm -rf $RPM_BUILD_ROOT
     74 
     75 %post
     76 ( echo 'test -x /usr/bin/update-desktop-database || exit 0';
     77   echo '/usr/bin/update-desktop-database'
     78 ) | $BASEDIR/lib/postrun -b -u -c JDS_wait
     79 ( echo 'test -x /usr/bin/scrollkeeper-update || exit 0';
     80   echo '/usr/bin/scrollkeeper-update'
     81 ) | $BASEDIR/lib/postrun -b -u -c JDS
     82 
     83 %postun
     84 test -x $BASEDIR/lib/postrun || exit 0
     85 ( echo 'test -x /usr/bin/update-desktop-database || exit 0';
     86   echo '/usr/bin/update-desktop-database'
     87 ) | $BASEDIR/lib/postrun -b -u -c JDS
     88 ( echo 'test -x /usr/bin/scrollkeeper-update || exit 0';
     89   echo '/usr/bin/scrollkeeper-update'
     90 ) | $BASEDIR/lib/postrun -b -u -c JDS
     91 
     92 %post root
     93 %include gconf-install.script
     94 
     95 %preun root
     96 test -x $BASEDIR/var/lib/postrun/postrun || exit 0
     97 ( echo 'test -x /usr/bin/gconftool-2 || {';
     98   echo '  echo "ERROR: gconftool-2 not found"';
     99   echo '  exit 0';
    100   echo '}';
    101   echo 'umask 0022';
    102   echo 'GCONF_CONFIG_SOURCE=xml:merged:$PKG_INSTALL_ROOT/etc/gconf/gconf.xml.defaults';
    103   echo 'GCONF_BACKEND_DIR=$PKG_INSTALL_ROOT/usr/lib/GConf/2';
    104   echo 'LD_LIBRARY_PATH=$PKG_INSTALL_ROOT/usr/lib';
    105   echo 'export GCONF_CONFIG_SOURCE GCONF_BACKEND_DIR LD_LIBRARY_PATH';
    106   echo 'SDIR=$PKG_INSTALL_ROOT%{_sysconfdir}/gconf/schemas';
    107   echo 'schemas="$SDIR/gnome-keyring-manager.schemas"';
    108   echo '$PKG_INSTALL_ROOT/usr/bin/gconftool-2 --makefile-uninstall-rule $schemas'
    109 ) | $BASEDIR/var/lib/postrun/postrun -i -c JDS -a
    110 
    111 %files
    112 %defattr (-, root, bin)
    113 %dir %attr (0755, root, bin) %{_bindir}
    114 %{_bindir}/*
    115 %dir %attr (0755, root, sys) %{_datadir}
    116 %dir %attr (0755, root, other) %{_datadir}/applications
    117 %{_datadir}/applications/*
    118 %{_datadir}/gnome-keyring-manager
    119 %dir %attr (0755, root, other) %{_datadir}/gnome
    120 %{_datadir}/gnome/help/*/C
    121 %{_datadir}/omf/*/*-C.omf
    122 %dir %attr(0755, root, bin) %{_mandir}
    123 %dir %attr(0755, root, bin) %{_mandir}/*
    124 %{_mandir}/*/*
    125 
    126 %if %build_l10n
    127 %files l10n
    128 %defattr (-, root, bin)
    129 %dir %attr (0755, root, sys) %{_datadir}
    130 %dir %attr (0755, root, other) %{_datadir}/gnome
    131 %attr (-, root, other) %{_datadir}/locale
    132 %{_datadir}/gnome/help/*/[a-z]*
    133 %{_datadir}/omf/*/*-[a-z][a-z].omf
    134 %{_datadir}/omf/*/*-[a-z][a-z]_[A-Z][A-Z].omf
    135 %endif
    136 
    137 %files root
    138 %defattr (-, root, sys)
    139 %attr (0755, root, sys) %dir %{_sysconfdir}
    140 %{_sysconfdir}/gconf/schemas/gnome-keyring-manager.schemas
    141 
    142 %changelog
    143 * Thu Jan  3 2008 - laca@sun.com
    144 - use gconf-install.script instead of an inline script
    145 * Tue Apr 24 2007 - laca@sun.com
    146 - use $BASEDIR instead of $PKG_INSTALL_ROOT to fix diskless install
    147   (CR 6537817)
    148 * Tue Apr 24 2007 - laca@sun.com
    149 - s/0755/-/ in defattr so that files are not made all executable
    150 * Wed Mar 14 2007 - damien.carbery@sun.com
    151 - Add to %files to include the en_GB omf file.
    152 * Fri Sep 08 2006 - Matt.Keenan@sun.com
    153 - Remove "rm" of _mandir during %install, Package gnome-keyring-manager.1
    154   from community
    155 * Sat Aug 12 2006 - laca@sun.com
    156 - delete some unnecessary env variables
    157 * Thu Jul 27 2006 - damien.carbery@sun.com
    158 - Fix packaging of omf files.
    159 * Fri Jul 14 2006 - matt.keenan@sun.com
    160 - Initial spec
    161