SUNWgnome-media.spec
author hawklu
Fri, 18 Jul 2008 08:53:12 +0000
branchgnome-2-22
changeset 12476 3a21fc945607
parent 12466 cc05ce1b1d3e
permissions -rw-r--r--
* patches/firefox3-11-getting-started-bookmark.diff: change the default homepage and bookmark to opensolaris welcome page

#
# spec file for packages SUNWgnome-media
#
# includes module(s): gst, gst-plugins-base, gst-plugins-good
#
# 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

%define with_hal %(pkginfo -q SUNWhal && echo 1 || echo 0)

%use gst = gst.spec
%use gst_plugins_base = gst-plugins-base.spec
%use gst_plugins_good = gst-plugins-good.spec

%define gst_minmaj %(echo %{gst.version} | cut -f1,2 -d.)

Name:                    SUNWgnome-media
Summary:                 GNOME streaming media framework
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-libs-devel
BuildRequires: SUNWgnome-base-libs-devel
BuildRequires: SUNWbison
BuildRequires: SUNWPython
BuildRequires: SUNWmusicbrainz-devel
BuildRequires: SUNWspeex-devel
BuildRequires: SUNWflac-devel
BuildRequires: SUNWlibtheora-devel
BuildRequires: SUNWogg-vorbis-devel
BuildRequires: SUNWPython-extra
BuildRequires: SUNWliboil-devel
BuildRequires: SUNWgnome-audio-devel
BuildRequires: SUNWgnome-config-devel
BuildRequires: SUNWgnome-vfs-devel
BuildRequires: SUNWjpg-devel
BuildRequires: SUNWpng-devel
Requires: SUNWgnome-libs
Requires: SUNWgnome-base-libs
Requires: SUNWgnome-media-root
Requires: SUNWmusicbrainz
Requires: SUNWspeex
Requires: SUNWflac
Requires: SUNWlibtheora
Requires: SUNWogg-vorbis
Requires: SUNWliboil
Requires: SUNWlibms
Requires: SUNWgnome-audio
Requires: SUNWgnome-config
Requires: SUNWgnome-vfs
Requires: SUNWjpg
Requires: SUNWlibms
Requires: SUNWlxml
Requires: SUNWperl584core
Requires: SUNWpng
Requires: SUNWxorg-clientlibs
Requires: SUNWzlib
%if %with_hal
Requires: SUNWhal
%endif

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

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

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

%prep
rm -rf %name-%version
mkdir %name-%version
%gst.prep -d %name-%version
%gst_plugins_base.prep -d %name-%version
%gst_plugins_good.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"

%gst.build -d %name-%version

# Need /usr/X11/lib and /usr/X11/include to gain access to libXv.so
# needed for xvimagesink.
#
export PKG_CONFIG_PATH=%{_builddir}/%name-%version/gstreamer-%{gst.version}/pkgconfig:%{_pkg_config_path}
export CFLAGS="%optflags -I/usr/sfw/include -I/usr/X11/include -DANSICPP"
export LDFLAGS="%_ldflags -L/usr/X11/lib -R/usr/X11/lib -lresolv"

%gst_plugins_base.build -d %name-%version

export PKG_CONFIG_PATH=%{_builddir}/%name-%version/gstreamer-%{gst.version}/pkgconfig:%{_pkg_config_path}:%{_builddir}/%name-%version/gst-plugins-base-%{gst_plugins_base.version}/pkgconfig:%{_pkg_config_path}
export CFLAGS="%optflags -I/usr/sfw/include -DANSICPP"
export LDFLAGS="%_ldflags"

%gst_plugins_good.build -d %name-%version

%install
rm -rf $RPM_BUILD_ROOT

%gst.install -d %name-%version
%gst_plugins_base.install -d %name-%version
%gst_plugins_good.install -d %name-%version

mkdir -p $RPM_BUILD_ROOT%{_libdir}/gstreamer-%{gst_minmaj}/tools
cd $RPM_BUILD_ROOT%{_bindir}
for prog in gst-feedback gst-inspect gst-launch gst-typefind \
            gst-xmlinspect gst-xmllaunch; do
  mv $prog-%{gst_minmaj} ../lib/gstreamer-%{gst_minmaj}/tools
  rm -f $prog
  ln -s ../lib/gstreamer-%{gst_minmaj}/tools/$prog-%{gst_minmaj} $prog
done

perl -pi -e 's,^toolsdir=.*,toolsdir=\${exec_prefix}/lib/gstreamer-%{gst_minmaj}/tools,' $RPM_BUILD_ROOT%{_libdir}/pkgconfig/gstreamer-%{gst_minmaj}.pc

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
chmod 755 $RPM_BUILD_ROOT%{_mandir}/man3/*.3
chmod 755 $RPM_BUILD_ROOT%{_mandir}/man5/*.5

rm -f $RPM_BUILD_ROOT%{_libdir}/gstreamer-%{gst_minmaj}/*.la
rm -f $RPM_BUILD_ROOT%{_libdir}/gstreamer-%{gst_minmaj}/*.a
rm -rf $RPM_BUILD_ROOT%{_datadir}/doc

%if %{!?_without_gtk_doc:0}%{?_without_gtk_doc:1}
rm -rf $RPM_BUILD_ROOT%{_datadir}/gtk-doc
%endif

%if %build_l10n
%else
# REMOVE l10n FILES
rm -rf $RPM_BUILD_ROOT%{_datadir}/locale
%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 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/gstreamer-%{gst_minmaj}.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}/gst*
%dir %attr (0755, root, bin) %{_libdir}
%{_libdir}/libgst*.so*
%{_libdir}/gstreamer-%{gst_minmaj}/lib*.so*
%{_libdir}/gstreamer-%{gst_minmaj}/tools
%dir %attr (0755, root, sys) %{_datadir}
%dir %attr(0755, root, bin) %{_mandir}
%dir %attr(0755, root, bin) %{_mandir}/man1
%dir %attr(0755, root, bin) %{_mandir}/man5
%{_mandir}/man1/gst*
%{_mandir}/man5/*

%files root
%defattr (-, root, sys)
%attr (0755, root, sys) %dir %{_sysconfdir}
%{_sysconfdir}/gconf/schemas/gstreamer-%{gst_minmaj}.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}/gstreamer-%{gst_minmaj}/gst
%dir %attr (0755, root, sys) %{_datadir}
%dir %attr (0755, root, other) %{_datadir}/aclocal
%{_datadir}/aclocal/*
%if %{!?_without_gtk_doc:1}%{?_without_gtk_doc:0}
%{_datadir}/gtk-doc
%endif
%dir %attr(0755, root, bin) %{_mandir}
%dir %attr(0755, root, bin) %{_mandir}/man3
%{_mandir}/man3/*

%if %build_l10n
%files l10n
%defattr (-, root, bin)
%dir %attr (0755, root, sys) %{_datadir}
%attr (-, root, other) %{_datadir}/locale
%endif

%changelog
* Wed May 07 2008 - [email protected]
- Remove PERL5LIB setting as it is not necessary.
* Tue Apr 01 2008 - [email protected]
- Add SUNW_Copyright.
* Thu Jan  3 2008 - [email protected]
- use gconf-install.script instead of an inline script
* Fri Sep 28 2007 - [email protected]
- delete SUNWxwrtl dep
* Thu Aug 02 2007 - [email protected]
- Add -lresolv to LDFLAGS for gst-plugins-base for hstrerror function.
* Thu Aug 02 2007 - [email protected]
- Delete gtk-doc files in %install when built using --without-gtk-doc. The root
  cause is in the gst/gst-plugins modules but this fix works for now.
* Tue Jun 26 2007 - [email protected]
- remove libcdio as dependency
* Fri Oct 20 2006 - [email protected]
- Remove SUNWhalh BuildRequires because header files are in SUNWhea in snv_51.
* Mon Sep 18 2006 - [email protected]
- Add SUNWhalh BuildRequires.
* Mon Sep 04 2006 - [email protected]
- New Manpage tarball
* Thu Aug 24 2006 - [email protected]
- Remove pointless libgstgetbits.3, libgstdataprotocol.3 manpage and move
  libgstreamer-0.8.3 manpage to libgstreamer-0.10.3.
* Tue Aug 22 2006 - [email protected]
- Remove gst-md5sum man page since this is no longer a part of GStreamer.
* Mon Aug 14 2006 - [email protected]
- Add Build/Requires SUNWhal after check-deps.pl run.
* 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
* Fri Jun 23 2006 - [email protected]
- Removed all of the 0.8 version manpages and the following
  manpages which are no longer needed:
  gst-complete, gst-compprep, gst-launch-ext, gst-register
* Wed Jun 14 2006 - [email protected]
- Changes from bumping to new versions of modules.
* 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
* Wed May 10 2006 - [email protected]
- merge -share pkg(s) into the base pkg(s)
- add the versioned binaries back in %{_libdir}/gstreamer-0.10/tools
  otherwise gnome-media (SUNWgnome-media-apps) fails
* Tue Mar 28 2006 - [email protected]
- Added libcdio dependency.
* 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.
* Tue Jan 24 2006 - [email protected]
- Add Build/Requires SUNWliboil/-devel as required by liboil.
* Fri Jan 19 2006 - [email protected]
- Bump to GStreamer 0.10.
* Tue Nov 29 2005 - [email protected]
- remove javahelp stuff
* Mon Nov 07 2005 - [email protected]
- Fix spec file so it builds xvimagesink.  This requires adding 
  /usr/X11/lib to LDFLAGS and /usr/X11/include to CFLAGS when building
  gst-plugins.  xvimagesink is faster than ximagesink since it uses
  the XVideo Xserver extension, so its nice to have.  This only works
  when using the Xorg Xserver, so users who are using Xsun will need
  to continue using the ximagesink plugin for video output.
* Tue Sep 27 2005 - [email protected]
- add python build dep for gstreamer-plugins gtk docs (mangle-tmpl.py)
* Mon Sep 12 2005 - [email protected]
- remove unpackaged files
* Fri Aug 12 2005 - [email protected]
- Add dependency of SUNWflac
* Tue Jul 26 2005 - [email protected]
- Add dependency of SUNWspeex and SUNWlibtheora
* Mon Jul 11 2005 - [email protected]
- Add BuildRequires: SUNWmusicbrainz
* Wed Jun 01 2005 - [email protected]
- remove nautilus-media since it no longer works with nautilus.  Nautilus
  no longer supports extensions like nautilus-media.  Remove gnome-media
  since it needs to be split into a separate package.  This is because
  gnome-panel requires gstreamer and gnome-media requires gnome-panel.
* Tue Feb 22 2005 - [email protected]
- moved l10n package to last built since it tends to fail on re-install.
* Fri Jan 28 2005 - [email protected]
- #6222302 : Remove gstreamer properties from yelp TOC
* Tue Nov 23 2004 - [email protected]
- Fix 6197917: Restore files 'lost' when SUNWgnome-media packages reorganised
  to restore 'lost' Gnome 2.0 packages. Reviewed by Laca.
* Fri Nov 12 2004 - [email protected]
- Use the original GNOME 2.0 packaging structure: add SUNWgnome-cd*
  SUNWgnome-freedb-libs* and SUNWgnome-sound-recorder*
* Thu Oct 21 2004 - [email protected]
- change registry.xml to volatile, fixes 6180895
* Thu Oct 14 2004 - [email protected]
- Added gst-launch-ext* man pages.
* Wed Oct 06 2004 - [email protected]
- Added code to install javahelp documents.
  Fixes  bugs #5096655,5096658.
* Mon Oct 04 2004 - [email protected]
- Added javahelp files for share package #5108690
* Sat Oct 02 2004 - [email protected]
- added %pkgbuild_postprocess
* Mon Sep 27 2004 - [email protected]
- Get GNOME_Media_CDDBSlave2.server to be installed
* Fri Sep 24 2004 - brian.cameron
- Added %post section so that programs that use GStreamer will work
  properly.  The timestamp of the registry file must be later than
  the libraries for programs to work.
* Thu Sep 09 2004 - [email protected]
- Added a heap of manpages
* Thu Aug 26 2004 - [email protected]
- Now package gtk-docs.
* Wed Aug 25 2004 - [email protected]
- Added l10n javahelp entry in l10n pkg files
* Tue Aug 24 2004 - [email protected]
- move l10n files to the l10n package
* Fri Aug 20 2004  [email protected]
- No longer package Nautilus_View server files since they aren't being 
  installed by the nautilus-media.spec file.
* Mon Aug 16 2004  [email protected]
- change .../sman1/*.1 permissions to 0755 for Solaris integration error
* Thu Jul 29 2004  [email protected]
- Fixed setting of PKG_CONFIG_PATH and CPPFLAGS so that they work when
  gstreamer and gst-plugins have different version #'s.
* Sat Jun 26 2004  [email protected]
- Changed install location to /usr/...
* Mon Jun 07 2004 - [email protected]
- Added ogg/vorbis dependancy.  Now including registry.xml.
* Wed Jun 02 2004 - [email protected]
- Removed SUNWgnome-pilot-link dependancy which was wrong.
* Wed Jun  2 2004 - [email protected]
- Added %{_datadir}/locale to install l10n messages
* Wed May 26 2004 - [email protected]
- Fixed CFLAGS so that Kpic flag gets properly recognized, allowing
  gstreamer to actually work in addition to just compiling.
* Tue May 25 2004 - [email protected]
- Updated dependencies to include SUNWgnome-file-mgr.
* Wed May 12 2004 - [email protected]
- Add nautilus-media.  Made changes so that this works with 
  gstreamer and gst-plugins 0.8.1.
* Sun Mar 28 2004 - [email protected]
- Corrected PKG_CONFIG_PATH so it will find gst-plugins properly.
* Fri Mar 26 2004 - [email protected]
- buildrequires CBEbison instead of SUNWbison
* Wed Mar 24 2004 - [email protected]
- Added SGML man page integration
* Thu Feb 26 2004 - [email protected]
- Initial spec-file created