SUNWgnome-cd.spec
author an230044
Mon, 27 Sep 2010 11:32:21 +0000
branchopensolaris-2009-06
changeset 20102 2d19c462bb98
parent 13782 3704757a7d48
child 15167 980bd599c9af
permissions -rw-r--r--
6917569 CVE-2008-5824 libaudiofile contains heap-based buffer overflow in msadpcm.c Committing for Rohini because of svn issues on opensolaris2009.06 branch.

#
# spec file for package SUNWgnome-cd
#
# includes module(s): sound-juicer
#
# Copyright 2008 Sun Microsystems, Inc.
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
# Owner: yippi
#
%include Solaris.inc
%use soundjuicer = sound-juicer.spec

Name:                    SUNWgnome-cd
Summary:                 CD ripping tool
Version:                 %{default_pkg_version}
Source:                  %{name}-manpages-0.1.tar.gz
Source1:                 solaris-cdda.schemas
SUNW_BaseDir:            %{_basedir}
SUNW_Copyright:          %{name}.copyright
BuildRoot:               %{_tmppath}/%{name}-%{version}-build
                                                                                
%include default-depend.inc
BuildRequires: SUNWmusicbrainz-devel
BuildRequires: SUNWgnome-cd-burner-devel
BuildRequires: SUNWgnome-media-apps-devel
BuildRequires: SUNWgnome-cd-burner-devel
BuildRequires: SUNWgnome-base-libs-devel
BuildRequires: SUNWgnome-config-devel
BuildRequires: SUNWgnome-libs-devel
BuildRequires: SUNWgnome-media-devel
BuildRequires: SUNWgnome-vfs-devel
Requires: SUNWmusicbrainz
Requires: SUNWgnome-cd-burner
Requires: SUNWgnome-media-apps
Requires: SUNWgnome-cd-burner
Requires: SUNWpostrun
Requires: SUNWgnome-base-libs
Requires: SUNWgnome-config
Requires: SUNWgnome-libs
Requires: SUNWgnome-media
Requires: SUNWgnome-vfs
Requires: SUNWlibC
Requires: SUNWlibms

%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

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

%build
export ACLOCAL_FLAGS="-I %{_datadir}/aclocal"
export CXXFLAGS="%cxx_optflags -I/usr/sfw/include -lCrun -lCstd"
export LDFLAGS="%_ldflags -L/usr/sfw/lib"
export CFLAGS="%optflags -I/usr/sfw/include"
%soundjuicer.build -d %name-%version

%install
rm -rf $RPM_BUILD_ROOT
%soundjuicer.install -d %name-%version
install --mode=0644 %SOURCE1 $RPM_BUILD_ROOT%{_sysconfdir}/gconf/schemas/solaris-cdda.schemas
# rm -rf $RPM_BUILD_ROOT%{_mandir}
cd %{_builddir}/%name-%version/sun-manpages
make install DESTDIR=$RPM_BUILD_ROOT

cd $RPM_BUILD_ROOT%{_bindir}
ln -s sound-juicer gnome-cd

%if %build_l10n
%else
# REMOVE l10n FILES
rm -rf $RPM_BUILD_ROOT%{_datadir}/locale
rm -rf $RPM_BUILD_ROOT%{_datadir}/gnome/help/[a-c]*/[a-z]*
rm -rf $RPM_BUILD_ROOT%{_datadir}/gnome/help/[e-z]*/[a-z]*
rm -rf $RPM_BUILD_ROOT%{_datadir}/omf/*/*-??.omf
rm -rf $RPM_BUILD_ROOT%{_datadir}/omf/*/*-??_??.omf
%endif

%{?pkgbuild_postprocess: %pkgbuild_postprocess -v -c "%{version}:%{jds_version}:%{name}:$RPM_ARCH:%(date +%%Y-%%m-%%d):%{support_level}" $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
%include gconf-install.script

%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/sound-juicer.schemas';
  echo '         $SDIR/solaris-cdda.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, sys) %{_datadir}
%dir %attr (0755, root, other) %{_datadir}/applications
%{_datadir}/applications/*
%doc -d sound-juicer-%{soundjuicer.version} AUTHORS README
%doc(bzip2) -d sound-juicer-%{soundjuicer.version} COPYING NEWS
%doc(bzip2) -d sound-juicer-%{soundjuicer.version} ChangeLog po/ChangeLog
%doc(bzip2) -d sound-juicer-%{soundjuicer.version} help/sound-juicer/ChangeLog
%dir %attr (0755, root, other) %{_datadir}/doc
%dir %attr (0755, root, other) %{_datadir}/gnome
%{_datadir}/gnome/help/*/C
%attr (-, root, other) %{_datadir}/icons
%{_datadir}/sound-juicer
%{_datadir}/omf/*/*-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
%dir %attr (0755, root, other) %{_datadir}/gnome
%{_datadir}/gnome/help/*/??
%{_datadir}/gnome/help/*/??_??
%{_datadir}/omf/*/*-??.omf
%{_datadir}/omf/*/*-??_??.omf
%endif

%files root
%defattr (-, root, sys)
%attr (0755, root, sys) %dir %{_sysconfdir}
%{_sysconfdir}/gconf/schemas/solaris-cdda.schemas
%{_sysconfdir}/gconf/schemas/sound-juicer.schemas

%changelog
* Fri Sep 26 2008 - [email protected]
- Add new copyright files.
* Thu Mar 27 2008 - [email protected]
- Add SUNW_Copyright.
* Thu Jan  3 2008 - [email protected]
- use gconf-install.script instead of an inline script
* Tue Jun 26 2007 - [email protected]
- remove libcdio as dependency.
* Tue Apr 24 2007 - [email protected]
- s/0755/-/ in defattr so that files are not made all executable
* Mon Apr 16 2007 - [email protected]
- Add en_GB files to l10n package for new tarball.
* Tue Oct 31 2006 - [email protected]
- Added /usr/share/locale in files l10n. Fixes 6488189.
* Fri Sep 08 2006 - [email protected]
- Add manpage tarball
* Sat Aug 12 2006 - [email protected]
- change datadir/icons permissions back to root:other since it's a stable
  interface and wasn't supposed to be changed
* Fri Jul 28 2006 - [email protected]
- Omit locale files from packaging as not installed.
* Fri Jul 14 2006 - [email protected]
- update %post/%postun/etc scripts to support diskless client setup,
  part of 6448317
* Fri Jul 14 2006 - [email protected]
- Install schemas file for CDDA URL Handler.
* Thu Jun 29 2006 - [email protected]
- update postrun scripts
* Wed Jun 21 2006 - [email protected]
- Fix packaging.
* Sun Jun 11 2006 - [email protected]
- change group from other to bin/sys
* Thu Jun  1 2006 - [email protected]
- use post/preun scripts to install schemas into the merged gconf files
* Fri May 12 2006 - [email protected]
- Small update to dependency list after check-deps.pl run.
* Wed May 10 2006 - [email protected]
- merge -share pkg(s) into the base pkg(s)
* Fri May 5  2006 - [email protected]
- Backing out "merged" GCONF change, since it doesn't work right.  For now
  it seems you need to delete /etc/gconf/gconf.xml.defaults/%gconf-tree*.xml
  and run /usr/bin/gconf-merge-tree /etc/gconf/gconf.xml.defaults to get
  the GCONF set up for this to work.  I talked with Laca and he plans to 
  fix this in the build process so this is not necessary.
* Sun Apr 20 2006 - [email protected]
- Correct %install line that removes omf files for non-l10n build.
* Sun Apr  9 2006 - [email protected]
- Add help files to share and l10n packages.
* Tue Mar 28 2006 - [email protected]
- Now building Sound Juicer as CD player on Solaris.
* Thu Feb 16 2006 - [email protected]
- Update Build/Requires after running check-deps.pl script.
* Tue Nov 29 2005 - [email protected]
- remove javahelp stuff
* Mon Jul 25 2005 - [email protected]
- Add dependency SUNWgnome-media-apps, SUNWmusicbrainz
  and SUNWgnome-cd-burner
* Fri Jul 22 2005 - [email protected]
- Changed the name to SUNWgnome-cd from SUNWsound-juicer
* Thu Jul 07 2005 - [email protected]
- Initial spec-file created