SUNWpulseaudio.spec revision 20837
#
# spec file for package SUNWpulseaudio
#
# includes module(s): pulseaudio
#
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
# bugdb: www.pulseaudio.org/report/
#
# Note that PulseAudio has build and runtime requirements on the newer version
# 2.2.6b of libtool, so this module builds and uses its own private copy. This
# should be removed when libtool is updated in Solaris to a newer version.
#
# date:2011-09-27 owner:yippi type:bug bugid:254
# This patch is very rough, but gets the code to compile.
# date:2011-09-27 owner:yippi type:bug
# date:2011-09-27 owner:yippi type:bug
SUNW_BaseDir: %{_basedir}
#TODO are dependencies complete?
%if %SFElibsndfile
%else
SUNW_BaseDir: %{_basedir}
SUNW_BaseDir: /
%if %build_l10n
%prep
# Build libtool, with patch.
# There seems to be an issue with the version of libtool that GStreamer is
# now using. The libtool script uses the echo and RM variables but does not
# define them, so setting them here addresses this.
CPUS=1
fi
# Build newer libtool that PulseAudio needs. This should be removed when
# libtool is updated.
#
./configure \
# Now build PulseAudio
#
cd ..
export CPPFLAGS="-xc99 -I%{_builddir}/pulseaudio-%version/libtool-2.2.6b/libltdl"
export CFLAGS="%optflags -xc99 -I%{_builddir}/pulseaudio-%version/libtool-2.2.6b/libltdl"
# Set LD_LIBRARY_PATH so the new version of libtool gets used.
export LD_LIBRARY_PATH="%{_builddir}/pulseaudio-%version/libtool-2.2.6b/libltdl/.libs"
# Need to add -Wl,-z,now and -Wl,-z-nodelete and remove -Wl,-zignore for
# PulseAudio to build.
#
%if %debug_build
export LDFLAGS="-Wl,-z,now -Wl,-z,nodelete -R/usr/lib/pulse-0.99 -L%{_builddir}/pulseaudio-%version/libtool-2.2.6b/libltdl/.libs %{_builddir}/pulseaudio-%version/libtool-2.2.6b/libltdl/.libs/libltdl.so -lxnet -lsocket -lgobject-2.0"
%else
export LDFLAGS="-Wl,-zcombreloc -Wl,-Bdirect -Wl,-z,now -Wl,-z,nodelete -R/usr/lib/pulse-0.99 -L%{_builddir}/pulseaudio-%version/libtool-2.2.6b/libltdl/.libs %{_builddir}/pulseaudio-%version/libtool-2.2.6b/libltdl/.libs/libltdl.so -lxnet -lsocket -lgobject-2.0"
--libexecdir=%{_libexecdir} \
--sysconfdir=%{_sysconfdir} \
# There seems to be an issue with the version of libtool that GStreamer is
# now using. The libtool script uses the echo and RM variables but does not
# define them, so setting them here addresses this.
find $RPM_BUILD_ROOT%{_libdir}/ -name "*.a" -exec rm {} \; -print -o -name "*.la" -exec rm {} \; -print
cp %{_builddir}/pulseaudio-%version/libtool-2.2.6b/libltdl/.libs/libltdl.so $RPM_BUILD_ROOT%{_libdir}/pulse-0.99
%if %build_l10n
%else
# REMOVE l10n FILES
%{_bindir}/*
%{_libexecdir}/pulse*
%{_includedir}
%{_sysconfdir}/pulse/*
%{_sysconfdir}/xdg
%if %build_l10n