Home | History | Annotate | Download | only in trunk
      1 #
      2 # spec file for package SUNWgnome-cd
      3 #
      4 # includes module(s): sound-juicer
      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: yippi
     11 #
     12 %include Solaris.inc
     13 %use soundjuicer = sound-juicer.spec
     14 
     15 Name:                    SUNWgnome-cd
     16 Summary:                 CD ripping tool
     17 Version:                 %{default_pkg_version}
     18 Source:                  %{name}-manpages-0.1.tar.gz
     19 Source1:                 solaris-cdda.schemas
     20 SUNW_BaseDir:            %{_basedir}
     21 SUNW_Copyright:          %{name}.copyright
     22 BuildRoot:               %{_tmppath}/%{name}-%{version}-build
     23                                                                                 
     24 %include default-depend.inc
     25 BuildRequires: SUNWmusicbrainz-devel
     26 BuildRequires: SUNWgnome-cd-burner-devel
     27 BuildRequires: SUNWgnome-media-apps-devel
     28 BuildRequires: SUNWgnome-cd-burner-devel
     29 BuildRequires: SUNWgnome-base-libs-devel
     30 BuildRequires: SUNWgnome-config-devel
     31 BuildRequires: SUNWgnome-libs-devel
     32 BuildRequires: SUNWgnome-media-devel
     33 BuildRequires: SUNWgnome-vfs-devel
     34 Requires: SUNWmusicbrainz
     35 Requires: SUNWgnome-cd-burner
     36 Requires: SUNWgnome-media-apps
     37 Requires: SUNWgnome-cd-burner
     38 Requires: SUNWpostrun
     39 Requires: SUNWgnome-base-libs
     40 Requires: SUNWgnome-config
     41 Requires: SUNWgnome-libs
     42 Requires: SUNWgnome-media
     43 Requires: SUNWgnome-vfs
     44 Requires: SUNWlibC
     45 Requires: SUNWlibms
     46 
     47 %if %build_l10n
     48 %package l10n
     49 Summary:                 %{summary} - l10n files
     50 SUNW_BaseDir:            %{_basedir}
     51 %include default-depend.inc
     52 Requires:                %{name}
     53 %endif
     54 
     55 %package root
     56 Summary:                 %{summary} - / filesystem
     57 SUNW_BaseDir:            /
     58 %include default-depend.inc
     59 Requires: SUNWpostrun-root
     60 Requires: SUNWgnome-config
     61 
     62 %prep
     63 rm -rf %name-%version
     64 mkdir %name-%version
     65 %soundjuicer.prep -d %name-%version
     66 cd %{_builddir}/%name-%version
     67 gzcat %SOURCE0 | tar xf -
     68 cd %{_builddir}/%name-%version/sound-juicer-%{soundjuicer.version}
     69 cd ..
     70 
     71 %build
     72 export ACLOCAL_FLAGS="-I %{_datadir}/aclocal"
     73 export CXXFLAGS="%cxx_optflags -I/usr/sfw/include -lCrun -lCstd"
     74 export LDFLAGS="%_ldflags -L/usr/sfw/lib"
     75 export CFLAGS="%optflags -I/usr/sfw/include"
     76 %soundjuicer.build -d %name-%version
     77 
     78 %install
     79 rm -rf $RPM_BUILD_ROOT
     80 %soundjuicer.install -d %name-%version
     81 install --mode=0644 %SOURCE1 $RPM_BUILD_ROOT%{_sysconfdir}/gconf/schemas/solaris-cdda.schemas
     82 # rm -rf $RPM_BUILD_ROOT%{_mandir}
     83 cd %{_builddir}/%name-%version/sun-manpages
     84 make install DESTDIR=$RPM_BUILD_ROOT
     85 
     86 cd $RPM_BUILD_ROOT%{_bindir}
     87 ln -s sound-juicer gnome-cd
     88 
     89 %if %build_l10n
     90 %else
     91 # REMOVE l10n FILES
     92 rm -rf $RPM_BUILD_ROOT%{_datadir}/locale
     93 rm -rf $RPM_BUILD_ROOT%{_datadir}/gnome/help/[a-c]*/[a-z]*
     94 rm -rf $RPM_BUILD_ROOT%{_datadir}/gnome/help/[e-z]*/[a-z]*
     95 rm -rf $RPM_BUILD_ROOT%{_datadir}/omf/*/*-??.omf
     96 rm -rf $RPM_BUILD_ROOT%{_datadir}/omf/*/*-??_??.omf
     97 %endif
     98 
     99 %{?pkgbuild_postprocess: %pkgbuild_postprocess -v -c "%{version}:%{jds_version}:%{name}:$RPM_ARCH:%(date +%%Y-%%m-%%d):%{support_level}" $RPM_BUILD_ROOT}
    100 
    101 %clean
    102 rm -rf $RPM_BUILD_ROOT
    103 
    104 %post
    105 ( echo 'test -x /usr/bin/update-desktop-database || exit 0';
    106   echo '/usr/bin/update-desktop-database'
    107 ) | $BASEDIR/lib/postrun -b -u -c JDS_wait
    108 ( echo 'test -x /usr/bin/scrollkeeper-update || exit 0';
    109   echo '/usr/bin/scrollkeeper-update'
    110 ) | $BASEDIR/lib/postrun -b -u -c JDS
    111 
    112 %postun
    113 test -x $BASEDIR/lib/postrun || exit 0
    114 ( echo 'test -x /usr/bin/update-desktop-database || exit 0';
    115   echo '/usr/bin/update-desktop-database'
    116 ) | $BASEDIR/lib/postrun -b -u -c JDS
    117 ( echo 'test -x /usr/bin/scrollkeeper-update || exit 0';
    118   echo '/usr/bin/scrollkeeper-update'
    119 ) | $BASEDIR/lib/postrun -b -u -c JDS
    120 
    121 %post root
    122 %include gconf-install.script
    123 
    124 %preun root
    125 test -x $BASEDIR/var/lib/postrun/postrun || exit 0
    126 ( echo 'test -x $PKG_INSTALL_ROOT/usr/bin/gconftool-2 || {';
    127   echo '  echo "WARNING: gconftool-2 not found; not uninstalling gconf schemas"';
    128   echo '  exit 0';
    129   echo '}';
    130   echo 'umask 0022';
    131   echo 'GCONF_CONFIG_SOURCE=xml:merged:$BASEDIR/etc/gconf/gconf.xml.defaults';
    132   echo 'GCONF_BACKEND_DIR=$PKG_INSTALL_ROOT/usr/lib/GConf/2';
    133   echo 'LD_LIBRARY_PATH=$PKG_INSTALL_ROOT/usr/lib';
    134   echo 'export GCONF_CONFIG_SOURCE GCONF_BACKEND_DIR LD_LIBRARY_PATH';
    135   echo 'SDIR=$BASEDIR%{_sysconfdir}/gconf/schemas';
    136   echo 'schemas="$SDIR/sound-juicer.schemas';
    137   echo '         $SDIR/solaris-cdda.schemas"';
    138   echo '$PKG_INSTALL_ROOT/usr/bin/gconftool-2 --makefile-uninstall-rule $schemas'
    139 ) | $BASEDIR/var/lib/postrun/postrun -i -c JDS -a
    140 
    141 %files
    142 %defattr (-, root, bin)
    143 %dir %attr (0755, root, bin) %{_bindir}
    144 %{_bindir}/*
    145 %dir %attr (0755, root, sys) %{_datadir}
    146 %dir %attr (0755, root, other) %{_datadir}/applications
    147 %{_datadir}/applications/*
    148 %dir %attr (0755, root, other) %{_datadir}/gnome
    149 %{_datadir}/gnome/help/*/C
    150 %attr (-, root, other) %{_datadir}/icons
    151 %{_datadir}/sound-juicer
    152 %{_datadir}/omf/*/*-C.omf
    153 %dir %attr(0755, root, bin) %{_mandir}
    154 %dir %attr(0755, root, bin) %{_mandir}/*
    155 %{_mandir}/*/*
    156 
    157 %if %build_l10n
    158 %files l10n
    159 %defattr (-, root, bin)
    160 %dir %attr (0755, root, sys) %{_datadir}
    161 %attr (-, root, other) %{_datadir}/locale
    162 %dir %attr (0755, root, other) %{_datadir}/gnome
    163 %{_datadir}/gnome/help/*/??
    164 %{_datadir}/gnome/help/*/??_??
    165 %{_datadir}/omf/*/*-??.omf
    166 %{_datadir}/omf/*/*-??_??.omf
    167 %endif
    168 
    169 %files root
    170 %defattr (-, root, sys)
    171 %attr (0755, root, sys) %dir %{_sysconfdir}
    172 %{_sysconfdir}/gconf/schemas/solaris-cdda.schemas
    173 %{_sysconfdir}/gconf/schemas/sound-juicer.schemas
    174 
    175 %changelog
    176 * Thu Mar 27 2008 - brian.cameron@sun.com
    177 - Add SUNW_Copyright.
    178 * Thu Jan  3 2008 - laca@sun.com
    179 - use gconf-install.script instead of an inline script
    180 * Tue Jun 26 2007 - irene.huang@sun.com
    181 - remove libcdio as dependency.
    182 * Tue Apr 24 2007 - laca@sun.com
    183 - s/0755/-/ in defattr so that files are not made all executable
    184 * Mon Apr 16 2007 - damien.carbery@sun.com
    185 - Add en_GB files to l10n package for new tarball.
    186 * Tue Oct 31 2006 - takao.fujiwara@sun.com
    187 - Added /usr/share/locale in files l10n. Fixes 6488189.
    188 * Fri Sep 08 2006 - Matt.Keenan@sun.com
    189 - Add manpage tarball
    190 * Sat Aug 12 2006 - laca@sun.com
    191 - change datadir/icons permissions back to root:other since it's a stable
    192   interface and wasn't supposed to be changed
    193 * Fri Jul 28 2006 - damien.carbery@sun.com
    194 - Omit locale files from packaging as not installed.
    195 * Fri Jul 14 2006 - laca@sun.com
    196 - update %post/%postun/etc scripts to support diskless client setup,
    197   part of 6448317
    198 * Fri Jul 14 2006 - brian.cameron@sun.com
    199 - Install schemas file for CDDA URL Handler.
    200 * Thu Jun 29 2006 - laca@sun.com
    201 - update postrun scripts
    202 * Wed Jun 21 2006 - brian.cameron@sun.com
    203 - Fix packaging.
    204 * Sun Jun 11 2006 - laca@sun.com
    205 - change group from other to bin/sys
    206 * Thu Jun  1 2006 - laca@sun.com
    207 - use post/preun scripts to install schemas into the merged gconf files
    208 * Fri May 12 2006 - damien.carbery@sun.com
    209 - Small update to dependency list after check-deps.pl run.
    210 * Wed May 10 2006 - laca@sun.com
    211 - merge -share pkg(s) into the base pkg(s)
    212 * Fri May 5  2006 - brian.cameron@sun.com
    213 - Backing out "merged" GCONF change, since it doesn't work right.  For now
    214   it seems you need to delete /etc/gconf/gconf.xml.defaults/%gconf-tree*.xml
    215   and run /usr/bin/gconf-merge-tree /etc/gconf/gconf.xml.defaults to get
    216   the GCONF set up for this to work.  I talked with Laca and he plans to 
    217   fix this in the build process so this is not necessary.
    218 * Sun Apr 20 2006 - damien.carbery (at] sun.com
    219 - Correct %install line that removes omf files for non-l10n build.
    220 * Sun Apr  9 2006 - damien.carbery (at] sun.com
    221 - Add help files to share and l10n packages.
    222 * Tue Mar 28 2006 - brian.cameron (at] sun.com
    223 - Now building Sound Juicer as CD player on Solaris.
    224 * Thu Feb 16 2006 - damien.carbery (at] sun.com
    225 - Update Build/Requires after running check-deps.pl script.
    226 * Tue Nov 29 2005 - laca (at] sun.com
    227 - remove javahelp stuff
    228 * Mon Jul 25 2005 - balamurali.viswanathan (at] wipro.com
    229 - Add dependency SUNWgnome-media-apps, SUNWmusicbrainz
    230   and SUNWgnome-cd-burner
    231 * Fri Jul 22 2005 - balamurali.viswanathan (at] wipro.com
    232 - Changed the name to SUNWgnome-cd from SUNWsound-juicer
    233 * Thu Jul 07 2005 - balamurali.viswanathan (at] wipro.com
    234 - Initial spec-file created
    235