The Xen team requested that we provide 64-bit libsdl, which depends
on libesd that in turn depends on libaudiofile.

Currently SUNWgnome-audio.spec is a big mess.  gnome-audio has
it's own base spec file, audiofile and esound are built and installed
in SUNWgnome-audio itself.  Looks ugly and difficult to manage.
This patch creates base spec files for esound and audiofile and builds
them both 32-bit and 64-bit.

I've attached the new SUNWgnome-audio.spec too, because the diff is
difficult to read.

Laca

-------------- next part --------------
A non-text attachment was scrubbed...
Name: SUNWgnome-audio.diff
Type: text/x-patch
Size: 13744 bytes
Desc: not available
URL: 
<http://mail.opensolaris.org/pipermail/jds-review/attachments/20070219/e5582cb4/attachment.bin>
-------------- next part --------------
#
# spec file for package SUNWgnome-audio
#
# includes module(s): gnome-audio
#
# Copyright (c) 2007 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 gnome_audio = gnome-audio.spec
%use audiofile = audiofile.spec
%use esound = esound.spec

Name:                    SUNWgnome-audio
Summary:                 GNOME audio support framework
Version:                 %{default_pkg_version}
Source1:                 %{name}-manpages-0.1.tar.gz
SUNW_BaseDir:            %{_basedir}
BuildRoot:               %{_tmppath}/%{name}-%{version}-build

%include default-depend.inc
BuildRequires: SUNWgnome-common-devel
BuildRequires: SUNWaudh
Requires: SUNWgnome-base-libs
Requires: SUNWlibms

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

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

%prep
rm -rf %name-%version
mkdir -p %name-%version
%gnome_audio.prep -d %name-%version
%audiofile.prep -d %name-%version
%esound.prep -d %name-%version
cd %name-%version
gzcat %SOURCE1 | tar xf -

%build
CPUS=`/usr/sbin/psrinfo | grep on-line | wc -l | tr -d ' '`
if test "x$CPUS" = "x" -o $CPUS = 0; then
    CPUS=1
fi
export PKG_CONFIG_PATH=../audiofile-%audiofile_version:%{_pkg_config_path}
export CFLAGS="%optflags"
export CFLAGS32="$CFLAGS"
export CFLAGS64="%optflags64"
export RPM_OPT_FLAGS="$CFLAGS"
export LDFLAGS="%_ldflags"
%gnome_audio.build -d %name-%version
%audiofile.build -d %name-%version

export ACLOCAL_FLAGS="-I `pwd`/%name-%version/audiofile-%{audiofile.version}"
export 
AUDIOFILE_CONFIG64=`pwd`/%name-%version/audiofile-%{audiofile.version}-64/audiofile-uninstalled-config
export 
AUDIOFILE_CONFIG=`pwd`/%name-%version/audiofile-%{audiofile.version}/audiofile-uninstalled-config
%esound.build -d %name-%version

%install
rm -rf $RPM_BUILD_ROOT
%gnome_audio.install -d %name-%version
%audiofile.install -d %name-%version
%esound.install -d %name-%version

%ifarch amd64 sparcv9
rm -rf $RPM_BUILD_ROOT%{_bindir}/%{_arch64}
rm -f $RPM_BUILD_ROOT%{_libdir}/%{_arch64}/lib*a
%endif

rm $RPM_BUILD_ROOT%{_libdir}/lib*a
rm $RPM_BUILD_ROOT%{_bindir}/{sfconvert,sfinfo,esdfilt,esdloop}

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

%{?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

%files
%defattr (-, root, bin)
%dir %attr (0755, root, bin) %{_bindir}
# Intentinally omitted essddsp, esdfilt and esdloop because not in
# 2.0.4 SUNWgnome-audio.
%{_bindir}/esdcat
%{_bindir}/esdctl
%{_bindir}/esdmon
%{_bindir}/esdplay
%{_bindir}/esdrec
%{_bindir}/esdsample
%dir %attr (0755, root, bin) %{_libdir}
%{_libdir}/esd
%ifarch amd64 sparcv9
%{_libdir}/%{_arch64}/lib*.so*
%endif
%{_libexecdir}/lib*.so*
%dir %attr (0755, root, sys) %{_datadir}
%{_datadir}/sounds/*.wav
%{_datadir}/sounds/gtk-events/*.wav
%{_datadir}/sounds/panel/*.wav
%dir %attr(0755, root, bin) %{_mandir}
%dir %attr(0755, root, bin) %{_mandir}/man1
%{_mandir}/man1/*

%files root
%defattr (0644, root, sys)
%attr (0755, root, sys) %dir %{_sysconfdir}
%{_sysconfdir}/*

%files devel
%defattr (-, root, bin)
%dir %attr (0755, root, bin) %{_bindir}
%{_bindir}/audiofile-config
%{_bindir}/esd-config
%dir %attr (0755, root, bin) %{_libdir}
%dir %attr (0755, root, other) %{_libdir}/pkgconfig
%{_libdir}/pkgconfig/*
%ifarch amd64 sparcv9
%dir %attr (0755, root, bin) %{_libdir}/%{_arch64}
%dir %attr (0755, root, other) %{_libdir}/%{_arch64}/pkgconfig
%{_libdir}/%{_arch64}/pkgconfig/*
%endif
%dir %attr (0755, root, bin) %{_includedir}
%{_includedir}/*
%dir %attr (0755, root, sys) %{_datadir}
%dir %attr (0755, root, other) %{_datadir}/aclocal
%{_datadir}/aclocal/*
%dir %attr(0755, root, bin) %{_mandir}
%dir %attr(0755, root, bin) %{_mandir}/man3
%{_mandir}/man3/*

%changelog
* Mon Feb 19 2007 - laca at sun.com
- move esound and audiofile into their own spec files
- update for 64-bit audiofile and esound libs
* Tue Nov 28 2006 - damien.carbery at sun.com
- Change defattr in root package to 0644 to fix 6497737.
* Tue Sep 12 2006 - Matt.Keenan at sun.com
- Add back "rm" of _mandir, as needed
* Fri Sep 08 2006 - Matt.Keenan at sun.com
- Remove "rm" of _mandir during %install
* Fri Sep 01 2006 - Matt.Keenan at sun.com
- New Manpage tarball
* Fri Jul 21 2006 - damien.carbery at sun.com
- Bump audiofile to 0.2.6.
* Sun Jun 11 2006 - laca at sun.com
- change group from other to bin/sys
* Tue May 09 2006 - laca at sun.com
- merge -share pkg(s) into the base pkg(s)
* Wed Dec 21 2005 - damien.carbery at sun.com
- Redo patch 1. Remove patch 2 (pkgconfig) as it was undoing patch 1!!
* Tue Dec 20 2005 - damien.carbery at sun.com
- Bump esound to 0.2.36.
* Fri Sep 09 2005 - <laca at sun.com>
- remove unpackaged files
* Wed Jun 15 2005 - laca at sun.com
- add patch to make esound work with recent pkgconfig
- add libtoolize so that it uses the newer libtool in the CBE
* Sat Oct 02 2004 - laca at sun.com
- added %pkgbuild_postprocess
* Mon Aug 30 2004 - shirley.woo at sun.com
- Bug 5091588 : sman3/4 files should be in a separate devel package
* Wed Aug 18 2004 - damien.carbery at sun.com
- Change manpage perms for Solaris integration.
* Tue Jun 22 2004 - shirley.woo at sun.com
- changed install location to /usr/lib and /usr/bin
* Thu May 27 2004 - brian.cameron
- added --with-esd-dir option to configure so esd gets installed
  to libexec.
* Wed May 19 2004 - brian.cameron at sun.com
- Added missing man pages.
* Fri May 07 2004 - brian.cameron at sun.com
- Add esound patch1 to fix esd-config to have correct values.
  Now call aclocal/autoconf for esound so patch takes effect.
* Thu May 06 2004 - brian.cameron at sun.com
- added missing *.m4 and *-config files to packaging.
* Thu Feb 26 2004 - niall.power at sun.com
- add missing -devel pkg
* Thu Feb 26 2004 - laca at sun.com
- fix audiofile dependency in esound

Reply via email to