pulseaudio.spec revision 20876
12258N/A#
12258N/A# spec file for package pulseaudio
12258N/A#
12412N/A# Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
12258N/A# This file and all modifications and additions to the pristine
12258N/A# package are under the same license as the package itself.
12258N/A#
12258N/A%define owner yippi
12258N/A# bugdb: bugzilla.freedesktop.org
12258N/A#
12258N/A
12258N/A%define src_name pulseaudio
12258N/A%define src_url http://freedesktop.org/software/pulseaudio/releases
12258N/A
12258N/AName: pulseaudio
12258N/ASummary: Sample Rate Converter for audio
12258N/AVersion: 1.1
12258N/ALicense: LGPLv2.1, MIT, Sun Public Domain
12258N/ASource: %{src_url}/%{src_name}-%{version}.tar.gz
12412N/ASource1: libtool-2.2.6b.tar.gz
12258N/A# date:2011-09-27 owner:yippi type:bug bugid:41537
12258N/APatch1: pulseaudio-01-esdcompat.diff
12258N/A# This patch is very rough, but gets the code to compile.
12258N/A# date:2011-09-27 owner:yippi type:bug bugid:41538
12258N/APatch2: pulseaudio-02-solaris.diff
12258N/A# date:2011-09-27 owner:yippi type:feature
12258N/APatch3: pulseaudio-03-libtool.diff
12258N/A# date:2011-10-05 owner:yippi type:feature bugid:41539
12258N/APatch4: pulseaudio-04-fixlink.diff
12258N/A# date:2011-10-06 owner:yippi type:feature
12258N/APatch5: pulseaudio-05-amd64.diff
12258N/A# /usr/include/sys/stream.h also defines module_info.
12258N/A# date:2011-10-14 owner:yippi type:bug bugid:41823
12258N/APatch6: pulseaudio-06-gconf.diff
12258N/A# date:2011-10-14 owner:yippi type:bug
12258N/APatch7: pulseaudio-07-shm.diff
12258N/A# date:2011-10-31 owner:yippi type:branding
12258N/A# This patch configures PulseAudio for Solaris, by enabling the OSSv4 module
12258N/A# for example, instead of using the SunAudio (solaris) module.
12258N/APatch8: pulseaudio-08-configure.diff
12258N/A# date:2011-11-30 owner:yippi type:bug
12258N/APatch9: pulseaudio-09-sada.diff
12258N/A# date:2011-12-13 owner:yippi type:bug
12258N/APatch10: pulseaudio-10-oss4.diff
12258N/ABuildRoot: %{_tmppath}/%{name}-%{version}-build
12258N/A
12258N/A%prep
12258N/A%setup -q -n pulseaudio-%version
12258N/A%patch1 -p1
12258N/A%patch2 -p1
12258N/Aperl -pi -e 's,/bin/sh,/bin/ksh,' src/daemon/esdcompat.in
12258N/A
12258N/A# Build libtool, with patch.
12258N/Agzcat %SOURCE1 | tar xf -
12258N/A%patch3 -p0
12258N/A
12258N/A%patch4 -p1
12258N/A%patch5 -p1
12258N/A%patch6 -p1
12258N/A%patch7 -p1
12258N/A%patch8 -p1
12258N/A%patch9 -p1
12258N/A%patch10 -p1
12258N/A
12258N/A%build
12258N/A# There seems to be an issue with the version of libtool that GStreamer is
12258N/A# now using. The libtool script uses the echo and RM variables but does not
12258N/A# define them, so setting them here addresses this.
12258N/Aexport echo="/usr/bin/echo"
12258N/Aexport RM="/usr/bin/rm -f"
12258N/A
12258N/ACPUS=`/usr/sbin/psrinfo | grep on-line | wc -l | tr -d ' '`
12258N/Aif test "x$CPUS" = "x" -o $CPUS = 0; then
12258N/A CPUS=1
12258N/Afi
12258N/A
12258N/A# Build newer libtool that PulseAudio needs. This should be removed when
12258N/A# libtool is updated.
12258N/A#
12258N/Aexport CFLAGS="%{optflags}"
12258N/Aexport LDFLAGS="%{_ldflags}"
12258N/Acd libtool-2.2.6b
12258N/A./configure \
12258N/A --prefix=%{_prefix} \
12258N/A --infodir=%{_infodir}
12258N/A
12258N/Amake -j$CPUS
12258N/A
12258N/Arm libltdl/.libs/*.a
12258N/Arm libltdl/.libs/*.la
12258N/Acd ..
12258N/A
12258N/A# Now build PulseAudio
12258N/A# Need to specify /usr/include/gc as an include directory since the atomic_ops
12258N/A# headers are delivered there on Solaris.
12424N/A#
12424N/Aexport CPPFLAGS="$SOLARIS_PULSE_CPPFLAGS"
12424N/Aexport CFLAGS="$SOLARIS_PULSE_CFLAGS -I/usr/include/gc"
12424N/Aexport LDFLAGS="$SOLARIS_PULSE_LDFLAGS"
12424N/A
12424N/Aautoreconf --force --install
12424N/A
12424N/A# We build PulseAudio without samplerate or bluez support since these are GPL
12424N/A# and it is not desirable to build PulseAudio with GPL code. Bluez is not
12424N/A# available anyway yet in Solaris, but disabling it just to ensure that it does
12424N/A# not build if bluez is added.
12258N/A#
12258N/A# We must turn off avahi for amd64 since avahi 64-bit is not available.
12258N/A./configure --prefix=%{_prefix} \
12258N/A --mandir=%{_mandir} \
12258N/A --bindir=%{_bindir} \
12258N/A --libdir=%{_libdir} \
12258N/A --libexecdir=%{_libexecdir} \
12258N/A --sysconfdir=%{_sysconfdir} \
12258N/A --disable-samplerate \
12258N/A --disable-bluez \
12258N/A $SOLARIS_PULSE_ARGS
12258N/A
12258N/Amake -j$CPUS
12258N/A
12258N/A%install
12258N/A# There seems to be an issue with the version of libtool that GStreamer is
12258N/A# now using. The libtool script uses the echo and RM variables but does not
12424N/A# define them, so setting them here addresses this.
12258N/Aexport echo="/usr/bin/echo"
12258N/Aexport RM="/usr/bin/rm -f"
12258N/A
12258N/Amake install DESTDIR=$RPM_BUILD_ROOT
12258N/A
12258N/Afind $RPM_BUILD_ROOT%{_libdir}/ -name "*.a" -exec rm {} \; -print -o -name "*.la" -exec rm {} \; -print
12258N/A
12258N/A%if %build_l10n
12258N/A%else
12258N/A# REMOVE l10n FILES
12258N/Arm -rf $RPM_BUILD_ROOT%{_datadir}/locale
12258N/A%endif
12258N/A
12258N/A%clean
12258N/Arm -rf $RPM_BUILD_ROOT
12258N/A
12258N/A%changelog
12258N/A* Thu Oct 20 2011 - Brian Cameron <brian.cameron@oracle.com>
12258N/A- Bump to 1.1.
12258N/A* Thu Oct 06 2011 - Brian Cameron <brian.cameron@oracle.com>
12258N/A- Split from SUNWpulseaudio.spec and now build amd64. Add the
12258N/A pulseaudio-05-amd64.diff patch.
12258N/A
12258N/A