Home | History | Annotate | Download | only in trunk
      1 #
      2 # # spec file for package SUNWgnome-desklets
      3 #
      4 # includes module(s): gdesklets
      5 #
      6 # Copyright (c) 2007 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: bewitche
     11 #
     12 %include Solaris.inc
     13 
     14 %use gdesklets = gdesklets.spec
     15 
     16 Name:                    SUNWgnome-desklets
     17 Summary:                 GNOME desktop widgets engine
     18 Version:                 %{default_pkg_version}
     19 SUNW_BaseDir:            %{_basedir}
     20 SUNW_Copyright:          %{name}.copyright
     21 BuildRoot:               %{_tmppath}/%{name}-%{version}-build
     22 %include default-depend.inc
     23 Requires: SUNWPython
     24 Requires: SUNWgnome-libs
     25 Requires: SUNWlibrsvg
     26 Requires: SUNWgnome-python-desktop
     27 Requires: SUNWgnome-python-libs
     28 Requires: SUNWgnome-desktop-prefs
     29 Requires: SUNWpostrun
     30 BuildRequires: SUNWPython-devel
     31 BuildRequires: SUNWgnome-desktop-prefs-devel
     32 BuildRequires: SUNWgnome-libs-devel
     33 BuildRequires: SUNWgnome-python-desktop-devel
     34 BuildRequires: SUNWgnome-python-libs-devel
     35 BuildRequires: SUNWlibrsvg-devel
     36 
     37 %if %build_l10n
     38 %package l10n
     39 Summary:                 %{summary} - l10n files
     40 SUNW_BaseDir:            %{_basedir}
     41 %include default-depend.inc
     42 Requires:                %{name}
     43 %endif
     44 
     45 %prep
     46 rm -rf %name-%version
     47 mkdir %name-%version
     48 %gdesklets.prep -d %name-%version
     49 
     50 %build
     51 export CFLAGS="%optflags"
     52 export RPM_OPT_FLAGS="$CFLAGS"
     53 export LDFLAGS="%_ldflags"
     54 %gdesklets.build -d %name-%version
     55 
     56 %install
     57 %gdesklets.install -d %name-%version 
     58 
     59 # Change %{_bindir}/gdesklets symlink to a relative one.
     60 cd $RPM_BUILD_ROOT%{_bindir}
     61 rm gdesklets
     62 ln -s  ../lib/gdesklets/gdesklets
     63 
     64 # fixes %_datadir/gdesklets/Displays/Calendar/gfx/months/README
     65 chmod -R a+rX $RPM_BUILD_ROOT
     66 
     67 rm -r $RPM_BUILD_ROOT%{_datadir}/mime
     68 rm $RPM_BUILD_ROOT%{_datadir}/applications/*.cache
     69 
     70 %if %build_l10n
     71 %else
     72 # REMOVE l10n FILES
     73 rm -rf $RPM_BUILD_ROOT%{_datadir}/locale
     74 %endif
     75 
     76 
     77 %clean
     78 rm -rf $RPM_BUILD_ROOT
     79 
     80 %post
     81 %include desktop-database-install.script
     82 %include scrollkeeper-update.script
     83 %include icon-cache.script
     84 
     85 %postun
     86 test -x $BASEDIR/lib/postrun || exit 0
     87 %include desktop-database-uninstall.script
     88 %include scrollkeeper-update.script
     89 
     90 %files
     91 %defattr (-, root, bin)
     92 %dir %attr (0755, root, bin) %{_bindir}
     93 %{_bindir}/*
     94 %dir %attr (0755, root, bin) %{_libdir}
     95 %{_libdir}/gdesklets
     96 %dir %attr (0755, root, sys) %{_datadir}
     97 %dir %attr (0755, root, other) %{_datadir}/applications
     98 %{_datadir}/applications/*.desktop
     99 %dir %attr (0755, root, other) %{_datadir}/pixmaps
    100 %{_datadir}/pixmaps/*
    101 %dir %attr (0755, root, bin) %{_mandir}
    102 %{_mandir}/*
    103 %dir %attr (0755, root, other) %{_datadir}/icons
    104 %dir %attr (0755, root, other) %{_datadir}/icons/gnome
    105 %dir %attr (0755, root, other) %{_datadir}/icons/gnome/48x48
    106 %dir %attr (0755, root, other) %{_datadir}/icons/gnome/48x48/mimetypes
    107 %{_datadir}/icons/gnome/48x48/mimetypes/*
    108 
    109 %if %build_l10n
    110 %files l10n
    111 %defattr (-, root, bin)
    112 %dir %attr (0755, root, sys) %{_datadir}
    113 %attr (-, root, other) %{_datadir}/locale
    114 %endif
    115 
    116 
    117 %changelog
    118 * Wed Jun 04 2008 - damien.carbery@sun.com
    119 - Make %{_bindir}/gdesklets a relative symlink as absolute symlinks are not
    120   permitted by Solaris WOS.
    121 * Mon Oct 15 2007 - laca@sun.com
    122 - make all files in the package readable
    123 * Thu Oct 11 2007 - halton.huo@sun.com
    124 - Use desktop-database-install.script for %post
    125   and desktop-database-uninstall.script for %postun
    126 * Thu Oct 11 2007 - halton.huo@sun.com
    127 - Change the inline postinstall script to an include
    128 * Thu Mar 22 2007 - halton.huo@sun.com
    129 - Change %{_datadir}/icons/gnome/48x48/mimetypes attr to root:other.
    130 * Thu Feb  8 2007 - damien.carbery@sun.com
    131 - Update dependency list for files used in %post and during build.
    132 * Mon Feb  5 2007 - damien.carbery@sun.com
    133 - Set %dir %attr for icons dirs.
    134 - Remove 'rm -rf $RPM_BUILD_ROOT' from %install as it is not needed.
    135 * Thu Jan 29 2007 - <chris.wang@sun.com>
    136 - initial creation
    137