SUNWgnome-media-apps.spec
author laca
Tue, 05 Aug 2008 04:33:16 +0000
branchgnome-2-22
changeset 12486 7fa2b2b0dddb
parent 12263 930dc7240f6a
child 12577 50cc056d0d0f
permissions -rw-r--r--
2008-08-05 Laszlo (Laca) Peter <[email protected]> * indiana/SUNWgetting-started-guide.spec: bump to 0.7.0; delete patches * patches/getting-started-guide-01-refresh-0.diff: delete * patches/getting-started-guide-02-po.diff: delete * indiana/SUNWopensolaris-welcome.spec: bump to 0.0.6 for bts release

#
# spec file for packages SUNWgnome-media, SUNWgnome-freedb-libs,
#                        SUNWgnome-sound-recorder
#
# includes module(s): gnome-media
#
# 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

# Add --with-gnome-cd when calling pkgtool if you want to build 
# gnome-cd.  We normally don't build/ship this program, but this
# option is available for those who want to test with it or 
# rebuild with gnome-cd because they want to use it.
#
%define build_with_gnome_cd %{?_with_gnome_cd:1}%{?!_with_gnome_cd:0}

%use gmedia = gnome-media.spec

Name:                    SUNWgnome-media-apps
Summary:                 GNOME media components
Version:                 %{default_pkg_version}
Source:                  %{name}-manpages-0.1.tar.gz
SUNW_BaseDir:            %{_basedir}
SUNW_Copyright:          %{name}.copyright
BuildRoot:               %{_tmppath}/%{name}-%{version}-build

%include default-depend.inc
BuildRequires: SUNWgnome-audio-devel
BuildRequires: SUNWgnome-libs-devel
BuildRequires: SUNWgnome-base-libs-devel
BuildRequires: SUNWgnome-media-devel
BuildRequires: CBEbison
BuildRequires: SUNWPython
BuildRequires: SUNWgnome-cd-burner-devel
BuildRequires: SUNWgnome-component-devel
BuildRequires: SUNWgnome-config-devel
BuildRequires: SUNWgnome-vfs-devel
Requires: SUNWgnome-libs
Requires: SUNWgnome-base-libs
Requires: SUNWgnome-media
Requires: SUNWgnome-media-apps-root
Requires: SUNWgnome-cd-burner
Requires: SUNWgnome-vfs
Requires: SUNWgnome-config
Requires: SUNWlibms
Requires: SUNWpostrun

%package root
Summary:                 %{summary} - / filesystem
SUNW_BaseDir:            /
%include default-depend.inc
Requires: SUNWpostrun-root
Requires: SUNWgnome-config

%if %build_l10n
%package l10n
Summary:                 %{summary} - l10n files
SUNW_BaseDir:            %{_basedir}
%include default-depend.inc
Requires:                %{name}
%endif

%package devel
Summary:                 %{summary} - development files
SUNW_BaseDir:            %{_basedir}
%include default-depend.inc

%package -n SUNWgnome-freedb-libs
Summary:                 GNOME free CD database access library
SUNW_BaseDir:            %{_basedir}
%include default-depend.inc
Requires: SUNWgnome-freedb-libs-root
Requires: SUNWgnome-libs
Requires: SUNWgnome-base-libs
Requires: SUNWgnome-component
Requires: SUNWgnome-config
Requires: SUNWpostrun

%package -n SUNWgnome-freedb-libs-root
Summary:                 GNOME free CD database access library - / filesystem
SUNW_BaseDir:            /
%include default-depend.inc
Requires: SUNWpostrun-root
Requires: SUNWgnome-config

%package -n SUNWgnome-sound-recorder
Summary:                 GNOME sound recording utilities
SUNW_BaseDir:            %{_basedir}
%include default-depend.inc
Requires: SUNWgnome-sound-recorder-root
Requires: SUNWgnome-libs
Requires: SUNWgnome-base-libs
Requires: SUNWgnome-audio
Requires: SUNWgnome-config
Requires: SUNWgnome-media
Requires: SUNWgnome-media-apps
Requires: SUNWgnome-vfs
Requires: SUNWpostrun

%package -n SUNWgnome-sound-recorder-root
Summary:                 GNOME sound recording utilities - / filesystem
SUNW_BaseDir:            /
%include default-depend.inc
Requires: SUNWpostrun-root
Requires: SUNWgnome-config

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

%build
# Note that including  __STDC_VERSION n CFLAGS for gnome-media breaks the S9
# build for gstreamer,  gst-plugins, and gnome-media, so not including for them.
#
export CFLAGS="%optflags -I/usr/sfw/include -DANSICPP"
export RPM_OPT_FLAGS="$CFLAGS"
export ACLOCAL_FLAGS="-I %{_datadir}/aclocal"
export LDFLAGS="%_ldflags"

%gmedia.build -d %name-%version

%install
rm -rf $RPM_BUILD_ROOT
%gmedia.install -d %name-%version

rm -rf $RPM_BUILD_ROOT%{_mandir}
cd %{_builddir}/%name-%version/sun-manpages
make install DESTDIR=$RPM_BUILD_ROOT

chmod 755 $RPM_BUILD_ROOT%{_mandir}/man1/*.1

# Move gnome-cd to gnome-CD since gnome-cd is a symlink to
# sound-juicer.
#
%if %build_with_gnome_cd
mv $RPM_BUILD_ROOT%{_bindir}/gnome-cd $RPM_BUILD_ROOT%{_bindir}/gnome-CD
%endif

# Remove .la and .a file as we don't ship them.
rm $RPM_BUILD_ROOT%{_libdir}/libglade/2.0/lib*.la
rm $RPM_BUILD_ROOT%{_libdir}/libglade/2.0/lib*.a

%if %build_l10n
%else
# REMOVE l10n FILES
rm -rf $RPM_BUILD_ROOT%{_datadir}/locale
rm -rf $RPM_BUILD_ROOT%{_datadir}/gnome/help/*/[a-z]*
rm -f $RPM_BUILD_ROOT%{_datadir}/omf/*/*-[a-z][a-z].omf
rm -f $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 -n SUNWgnome-sound-recorder
( 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 -n SUNWgnome-sound-recorder
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 -n SUNWgnome-sound-recorder-root
%include gconf-install.script

%preun -n SUNWgnome-sound-recorder-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/gnome-sound-recorder.schemas"';
  echo '$PKG_INSTALL_ROOT/usr/bin/gconftool-2 --makefile-uninstall-rule $schemas'
) | $BASEDIR/var/lib/postrun/postrun -i -c JDS -a

%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/gnome-audio-profiles.schemas';
%if %build_with_gnome_cd
  echo '         $SDIR/gnome-cd.schemas';
%endif
  echo '         $SDIR/gnome-volume-control.schemas"';
  echo '$PKG_INSTALL_ROOT/usr/bin/gconftool-2 --makefile-uninstall-rule $schemas'
) | $BASEDIR/var/lib/postrun/postrun -i -c JDS -a

%post -n SUNWgnome-freedb-libs
( 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 -n SUNWgnome-freedb-libs
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 -n SUNWgnome-freedb-libs-root
%include gconf-install.script

%preun -n SUNWgnome-freedb-libs-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/CDDB-Slave2.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}/gnome-audio-profiles-properties
%{_bindir}/gnome-volume-control
%{_bindir}/gstreamer-properties
%dir %attr (0755, root, bin) %{_libdir}
%{_libdir}/libgnome-media*.so*
%{_libdir}/libglade/2.0/lib*.so*
%dir %attr (0755, root, sys) %{_datadir}
%dir %attr (0755, root, other) %{_datadir}/applications
%{_datadir}/applications/gstreamer-properties.desktop
%{_datadir}/applications/gnome-volume-control.desktop
%dir %attr (0755, root, other) %{_datadir}/gnome
%{_datadir}/gnome/help/gnome-volume-control/C
%{_datadir}/gnome/help/gstreamer-properties/C
%{_datadir}/gnome-media
%{_datadir}/gstreamer-properties
%dir %attr (-, root, other) %{_datadir}/icons
%dir %attr (-, root, other) %{_datadir}/icons/hicolor
%dir %attr (-, root, other) %{_datadir}/icons/hicolor/48x48
%dir %attr (-, root, other) %{_datadir}/icons/hicolor/48x48/apps
%{_datadir}/icons/hicolor/48x48/apps/gstreamer-properties.png
%{_datadir}/omf/*/gstreamer-properties-C.omf
%{_datadir}/omf/gnome-sound-recorder/gnome-sound-recorder-C.omf
%{_datadir}/omf/gnome-volume-control/gnome-volume-control-C.omf
%dir %attr(0755, root, bin) %{_mandir}
%dir %attr(0755, root, bin) %{_mandir}/man1
%{_mandir}/man1/gnome-audio-profiles-properties.1
%{_mandir}/man1/gnome-volume-control.1
%{_mandir}/man1/gst*
%if %build_with_gnome_cd
%{_bindir}/gnome-CD
%{_datadir}/applications/gnome-cd.desktop
%dir %attr (0755, root, other) %{_datadir}/pixmaps
%{_datadir}/pixmaps/gnome-cd.png
%{_datadir}/pixmaps/gnome-cd/
%{_datadir}/gnome/help/gnome-cd/C
%{_datadir}/omf/*/gnome-cd-C.omf
%endif

%files -n SUNWgnome-freedb-libs
%defattr (-, root, bin)
%dir %attr (0755, root, bin) %{_bindir}
%{_bindir}/cddb-slave2-properties
%dir %attr (0755, root, bin) %{_libdir}
%{_libexecdir}/CDDBSlave2
%{_libexecdir}/cddb-track-editor
%{_libdir}/bonobo/servers/GNOME_Media_CDDBSlave2.server
%{_libdir}/libcddb-slave2*.so*
%dir %attr (0755, root, sys) %{_datadir}
%dir %attr (0755, root, other) %{_datadir}/applications
%{_datadir}/applications/cddb-slave.desktop
%dir %attr(0755, root, bin) %{_mandir}
%dir %attr(0755, root, bin) %{_mandir}/man1
%{_mandir}/man1/cddb-slave2-properties.1

%files -n SUNWgnome-sound-recorder
%defattr (-, root, bin)
%dir %attr (0755, root, bin) %{_bindir}
%{_bindir}/gnome-sound-recorder
%{_bindir}/vumeter
%dir %attr (0755, root, sys) %{_datadir}
%dir %attr (0755, root, other) %{_datadir}/applications
%{_datadir}/applications/gnome-sound-recorder.desktop
%{_datadir}/applications/reclevel.desktop
%{_datadir}/applications/vumeter.desktop
%dir %attr (0755, root, other) %{_datadir}/gnome
%{_datadir}/gnome/help/gnome-sound-recorder/C
#FIXME: Not in 2.20.0 tarball:%{_datadir}/omf/*/grecord-C.omf 
%{_datadir}/gnome-sound-recorder
#FIXME: Not in 2.20.0 tarball:%dir %attr (0755, root, other) %{_datadir}/pixmaps
#FIXME: Not in 2.20.0 tarball:%{_datadir}/pixmaps/gnome-mixer.png
%dir %attr (-, root, other) %{_datadir}/icons
%dir %attr (-, root, other) %{_datadir}/icons/hicolor
%dir %attr (-, root, other) %{_datadir}/icons/hicolor/48x48
%dir %attr (-, root, other) %{_datadir}/icons/hicolor/48x48/apps
%{_datadir}/icons/hicolor/48x48/apps/gnome-grecord.png
%{_datadir}/icons/hicolor/48x48/apps/gnome-reclevel.png
%{_datadir}/icons/hicolor/48x48/apps/gnome-vumeter.png
%dir %attr(0755, root, bin) %{_mandir}
%dir %attr(0755, root, bin) %{_mandir}/man1
%{_mandir}/man1/gnome-sound-recorder.1
%{_mandir}/man1/vumeter.1

%if %build_l10n
%files l10n
%defattr (-, root, bin)
%dir %attr (0755, root, sys) %{_datadir}
%dir %attr (0755, root, other) %{_datadir}/gnome
%attr (-, root, other) %{_datadir}/locale
%{_datadir}/gnome/help/*/[a-z]*
%{_datadir}/omf/*/*-[a-z][a-z].omf
#FIXME: Not in 2.22.0:%{_datadir}/omf/*/*-[a-z][a-z]_[A-Z][A-Z].omf
%endif

%files root
%defattr (-, root, sys)
%attr (0755, root, sys) %dir %{_sysconfdir}
%{_sysconfdir}/gconf/schemas/gnome-audio-profiles.schemas
%{_sysconfdir}/gconf/schemas/gnome-volume-control.schemas
%if %build_with_gnome_cd
%{_sysconfdir}/gconf/schemas/gnome-cd.schemas
%endif

%files -n SUNWgnome-freedb-libs-root
%defattr (-, root, sys)
%attr (0755, root, sys) %dir %{_sysconfdir}
%{_sysconfdir}/gconf/schemas/CDDB-Slave2.schemas

%files -n SUNWgnome-sound-recorder-root
%defattr (-, root, sys)
%attr (0755, root, sys) %dir %{_sysconfdir}
%{_sysconfdir}/gconf/schemas/gnome-sound-recorder.schemas

%files devel
%defattr (-, root, bin)
%dir %attr (0755, root, bin) %{_libdir}
%dir %attr (0755, root, other) %{_libdir}/pkgconfig
%{_libdir}/pkgconfig/*
%dir %attr (0755, root, bin) %{_includedir}
%{_includedir}/cddb-slave2
%{_includedir}/gnome-media/profiles
%dir %attr (0755, root, sys) %{_datadir}
%{_datadir}/idl

%changelog
* Wed May 07 2008 - [email protected]
- Remove PERL5LIB setting as it is not necessary.
* Wed Apr 02 2008 - [email protected]
- Add SUNW_Copyright.
* Wed Mar 12 2008 - [email protected]
- Update %files for new tarball.
* Thu Jan  3 2008 - [email protected]
- use gconf-install.script instead of an inline script
* Mon Oct  8 2007 - [email protected]
- Remove some icons from base package because they are already in
  SUNWgnome-sound-recorder. Fixes 6613798.
* Wed Sep 19 2007 - [email protected]
- Update %files for 2.20.0 tarball - remove omf files and move png files.
* Wed Sep 05 2007 - [email protected]
- Remove references to SUNWgnome-a11y-base-libs as its contents have been
  moved to SUNWgnome-base-libs.
* Wed Jan 24 2007 - [email protected]
- Change %with_cd to %build_with_gnome_cd with suggestions from Laca.
* Tue Jan 23 2007 - [email protected]
- Add %with_cd logic so it is easier to build with gnome-cd if desired.
* Mon Oct 16 2006 - [email protected]
- Remove the '-rf' from the 'rm *.la *.a' lines so that any changes to the
  module source will be seen as a build error and action can be taken.
* Mon Sep 04 2006 - [email protected]
- New Manpage tarball
* Mon Aug 21 2006 - [email protected]
- Fix l10n package - C locale omf file was in base and l10n package.
* Fri Jul 14 2006 - [email protected]
- update %post/%postun/etc scripts to support diskless client setup,
  part of 6448317
* Thu Jun 29 2006 - [email protected]
- update postrun scripts
* Sun Jun 11 2006 - [email protected]
- change group from other to bin/sys
* Fri Jun  2 2006 - [email protected]
- use post/preun scripts to install schemas into the merged gconf files
* Thu May 04 2006 - [email protected]
- merge -share pkg(s) into the base pkg(s)
* Tue Mar 28 2006 - [email protected]
- Removed SUNWgnome-cd, since now using sound-juicer.
* Tue Feb 21 2006 - [email protected]
- Just a few more dependencies for SUNWgnome-cd.
* Mon Feb 20 2006 - [email protected]
- Complete update of Build/Requires after running check-deps.pl script.
* Fri Feb 17 2006 - [email protected]
- Update Build/Requires after running check-deps.pl script.
* Fri Jan 20 2006 - [email protected]
- Do not package gstreamer gconf files since GStreamer already installs
  its own.
* Sat Dec  3 2005 - [email protected]
- add %post script that runs update-desktop-database
* Tue Nov 29 2005 - [email protected]
- remove javahelp stuff
* Fri Sep 30 2005 - [email protected]
- Fix l10n packaging.
* Thu Sep 22 2005 - [email protected]
- Build gnome-cd again since sound-juicer doesn't build on Solaris.
* Wed Sep 21 2005 - [email protected]
- Fix packaging.
* Tue Jul 12 2005 - [email protected]
- Don't build gnome-cd and remove nautilus-cd-burner dependency
* Tue Jul 12 2005 - [email protected]
- Add nautilus-cd-burner dependency
* Thu Jul 07 2005 - [email protected]
- Initial spec-file created