Home | History | Annotate | Download | only in gnome-2-24
      1 #
      2 # spec file for package SUNWgnome-calculator
      3 #
      4 # includes module(s): gcalctool
      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: laca
     11 #
     12 %include Solaris.inc
     13 
     14 %use gcalctool = gcalctool.spec
     15 
     16 Name:                    SUNWgnome-calculator
     17 Summary:                 GNOME calculator utility
     18 Version:                 %{default_pkg_version}
     19 Source:                  %{name}-manpages-0.1.tar.gz
     20 SUNW_BaseDir:            %{_basedir}
     21 SUNW_Copyright:          %{name}.copyright
     22 BuildRoot:               %{_tmppath}/%{name}-%{version}-build
     23 
     24 %include default-depend.inc
     25 Requires: SUNWgnome-calculator-root
     26 Requires: SUNWgnome-libs
     27 Requires: SUNWgnome-base-libs
     28 Requires: SUNWgnome-config
     29 Requires: SUNWlibms
     30 BuildRequires: SUNWgnome-config-devel
     31 Requires: SUNWpostrun
     32 
     33 %if %build_l10n
     34 %package l10n
     35 Summary:                 %{summary} - l10n files
     36 SUNW_BaseDir:            %{_basedir}
     37 %include default-depend.inc
     38 Requires:                %{name}
     39 %endif
     40 
     41 %package root
     42 Summary:                 %{summary} - / filesystem
     43 SUNW_BaseDir:            /
     44 %include default-depend.inc
     45 Requires: SUNWpostrun-root
     46 Requires: SUNWgnome-config
     47 
     48 %prep
     49 rm -rf %name-%version
     50 mkdir %name-%version
     51 %gcalctool.prep -d %name-%version
     52 cd %{_builddir}/%name-%version
     53 gzcat %SOURCE0 | tar xf -
     54 
     55 %build
     56 export PKG_CONFIG_PATH=%{_pkg_config_path}
     57 export CFLAGS="%optflags -I%{_includedir}"
     58 export RPM_OPT_FLAGS="$CFLAGS"
     59 export LDFLAGS="%_ldflags"
     60 
     61 %gcalctool.build -d %name-%version
     62 
     63 %install
     64 rm -rf $RPM_BUILD_ROOT
     65 %gcalctool.install -d %name-%version
     66 
     67 rm -rf $RPM_BUILD_ROOT%{_mandir}
     68 cd %{_builddir}/%name-%version/sun-manpages
     69 make install DESTDIR=$RPM_BUILD_ROOT
     70 
     71 %if %build_l10n
     72 %else
     73 # REMOVE l10n FILES
     74 rm -rf $RPM_BUILD_ROOT%{_datadir}/gnome/help/*/[a-z]*
     75 rm -rf $RPM_BUILD_ROOT%{_datadir}/omf/*/*-[a-z][a-z].omf
     76 rm -rf $RPM_BUILD_ROOT%{_datadir}/omf/*/*-[a-z][a-z]_[A-Z]*.omf
     77 rm -rf $RPM_BUILD_ROOT%{_datadir}/locale
     78 %endif
     79 
     80 %{?pkgbuild_postprocess: %pkgbuild_postprocess -v -c "%{version}:%{jds_version}:%{name}:$RPM_ARCH:%(date +%%Y-%%m-%%d):%{support_level}" $RPM_BUILD_ROOT}
     81 
     82 %clean
     83 rm -rf $RPM_BUILD_ROOT
     84 
     85 %post
     86 ( echo 'test -x /usr/bin/update-desktop-database || exit 0';
     87   echo '/usr/bin/update-desktop-database'
     88 ) | $BASEDIR/lib/postrun -b -u -c JDS_wait
     89 ( echo 'test -x /usr/bin/scrollkeeper-update || exit 0';
     90   echo '/usr/bin/scrollkeeper-update'
     91 ) | $BASEDIR/lib/postrun -b -u -c JDS
     92 
     93 %postun
     94 test -x $BASEDIR/lib/postrun || exit 0
     95 ( echo 'test -x /usr/bin/update-desktop-database || exit 0';
     96   echo '/usr/bin/update-desktop-database'
     97 ) | $BASEDIR/lib/postrun -b -u -c JDS
     98 ( echo 'test -x /usr/bin/scrollkeeper-update || exit 0';
     99   echo '/usr/bin/scrollkeeper-update'
    100 ) | $BASEDIR/lib/postrun -b -u -c JDS
    101 
    102 %post root
    103 %include gconf-install.script
    104 
    105 %preun root
    106 test -x $BASEDIR/var/lib/postrun/postrun || exit 0
    107 ( echo 'test -x $PKG_INSTALL_ROOT/usr/bin/gconftool-2 || {';
    108   echo '  echo "WARNING: gconftool-2 not found; not uninstalling gconf schemas"';
    109   echo '  exit 0';
    110   echo '}';
    111   echo 'umask 0022';
    112   echo 'GCONF_CONFIG_SOURCE=xml:merged:$BASEDIR/etc/gconf/gconf.xml.defaults';
    113   echo 'GCONF_BACKEND_DIR=$PKG_INSTALL_ROOT/usr/lib/GConf/2';
    114   echo 'LD_LIBRARY_PATH=$PKG_INSTALL_ROOT/usr/lib';
    115   echo 'export GCONF_CONFIG_SOURCE GCONF_BACKEND_DIR LD_LIBRARY_PATH';
    116   echo 'SDIR=$BASEDIR%{_sysconfdir}/gconf/schemas';
    117   echo 'schemas="$SDIR/gcalctool.schemas"';
    118   echo '$PKG_INSTALL_ROOT/usr/bin/gconftool-2 --makefile-uninstall-rule $schemas'
    119 ) | $BASEDIR/var/lib/postrun/postrun -i -c JDS -a
    120 
    121 %files
    122 %defattr (-, root, bin)
    123 %dir %attr (0755, root, bin) %{_bindir}
    124 %{_bindir}/*
    125 %dir %attr (0755, root, sys) %{_datadir}
    126 %dir %attr (0755, root, other) %{_datadir}/applications
    127 %{_datadir}/applications/*
    128 %{_datadir}/gcalctool
    129 %dir %attr (0755, root, other) %{_datadir}/gnome
    130 %{_datadir}/gnome/help/*/C
    131 %{_datadir}/omf/*/*-C.omf
    132 %dir %attr(0755, root, bin) %{_mandir}
    133 %dir %attr(0755, root, bin) %{_mandir}/*
    134 %{_mandir}/*/*
    135 
    136 %if %build_l10n
    137 %files l10n
    138 %defattr (-, root, bin)
    139 %dir %attr (0755, root, sys) %{_datadir}
    140 %dir %attr (0755, root, other) %{_datadir}/gnome
    141 %attr (-, root, other) %{_datadir}/locale
    142 %{_datadir}/gnome/help/*/[a-z]*
    143 %{_datadir}/omf/*/*-[a-z][a-z].omf
    144 %{_datadir}/omf/*/*-[a-z][a-z]_[A-Z]*.omf
    145 %endif
    146 
    147 %files root
    148 %defattr (-, root, sys)
    149 %attr (0755, root, sys) %dir %{_sysconfdir}
    150 %{_sysconfdir}/gconf/schemas/gcalctool.schemas
    151 
    152 %changelog
    153 * Thu Jan  3 2008 - laca@sun.com
    154 - use gconf-install.script instead of an inline script
    155 * Wed Oct 31 2007 - damien.carbery@sun.com
    156 - Add %{_datadir}/gcalctool to %files.
    157 * Fri Sep 21 2007 - brian.cameron@sunc.om
    158 - Re-add the desktop file back into the packaging.  It wasn't getting
    159   built before because we weren't calling the proper autotools.
    160 * Thu Aug 16 2007 - damien.carbery@sun.com
    161 - Remove %files line because dir not installed.
    162 * Tue Apr 24 2007 - laca@sun.com
    163 - s/0755/-/ in defattr so that files are not made all executable
    164 * Fri Sep 01 2006 - Matt.Keenan@sun.com
    165 - New Manpage tarball
    166 * Sat Aug 12 2006 - laca@sun.com
    167 - delete some unnecessary env variables
    168 * Fri Jul 14 2006 - laca@sun.com
    169 - update %post/%postun/etc scripts to support diskless client setup,
    170   part of 6448317
    171 * Thu Jun 29 2006 - laca@sun.com
    172 - update postrun scripts
    173 * Sun Jun 11 2006 - laca@sun.com
    174 - change group from other to bin/sys
    175 * Thu May 25 2006 - laca@sun.com
    176 - use post/preun scripts to install schemas into the merged gconf files
    177 * Tue May 09 2006 - laca@sun.com
    178 - merge -share pkg(s) into the base pkg(s)
    179 * Mon Feb 20 2006 - damien.carbery@sun.com
    180 - Update Build/Requires after running check-deps.pl script.
    181 * Sat Dec  3 2005 - laca@sun.com
    182 - add %post script that runs update-desktop-database
    183 * Tue Nov 29 2005 - laca@sun.com
    184 - remove javahelp stuff
    185 * Fri Oct 28 2005 - damien.carbery@sun.com
    186 - Remove more l10n files for non-l10n build.
    187 * Tue May 25 2005 - brian.cameron@sun.com
    188 - Bump to 2.10.0, fix packaging.
    189 * Sat Oct 02 2004 - laca@sun.com
    190 - added %pkgbuild_postprocess
    191 * Wed Aug 25 2004 - Kazuhiko.Maekawa@sun.com
    192 - Updated files sect to extracted l10n help into l10n pkg
    193 - s/SUNWpl5u/SUNWperl584usr/
    194 * Mon Aug 23 2004 - laca@sun.com
    195 - s/SUNWpl5u/SUNWperl584usr/
    196 * Wed Aug 18 2004  damien.carbery@sun.com
    197 - Change manpage perms for Solaris integration.
    198 * Sat Jun 26 2004  shirley.woo@sun.com
    199 - Changed install location to /usr/...
    200 * Wed Jun  2 2004 - takao.fujiwara@sun.com
    201 - Added %{_datadir}/locale to install l10n messages
    202 * Thu May 06 2004 - brian.cameron@sun.com
    203 - Removed %{_sysconfdir}/gconf from share package since
    204   it is already included in root.
    205 * Wed Mar 24 2004 - brian.cameron@sun.com
    206 - Added SGML man page integration
    207 * Mon Mar 01 2004 - laca@sun.com
    208 - define PERL5LIB
    209 * Mon Feb 23 2004 - niall.power@sun.com
    210 - add a *-root package and install schemas
    211 - fix up dependencies
    212