f5e49dd
%{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
f5e49dd
%{!?ruby_sitearch: %global ruby_sitearch %(ruby -rrbconfig -e 'puts Config::CONFIG["sitearchdir"] ')}
35dbb6b
f5e49dd
%global codename DrMattDestruction
35dbb6b
35dbb6b
Name:			xmms2
35dbb6b
Summary: 		A modular audio framework and plugin architecture
f5e49dd
Version:		0.6
89b7c5c
Release:		7%{?dist}
35dbb6b
License:		LGPLv2+ and GPLv2+ and BSD
35dbb6b
Group:			Applications/Multimedia
35dbb6b
# We can't use the upstream source tarball as-is, because it includes an mp4 decoder.
35dbb6b
# http://downloads.sourceforge.net/xmms2/%{name}-%{version}%{codename}.tar.bz2
35dbb6b
# Cleaning it is simple, just rm -rf src/plugins/mp4
35dbb6b
Source0:		%{name}-%{version}%{codename}-clean.tar.bz2
35dbb6b
Source1:		xmms2-client-launcher.sh
35dbb6b
# Use libdir properly for Fedora multilib
f5e49dd
Patch1:			xmms2-0.6DrMattDestruction-use-libdir.patch
35dbb6b
# Set default output to pulse
f5e49dd
Patch2:			xmms2-0.6DrMattDestruction-pulse-output-default.patch
35dbb6b
# Don't add extra CFLAGS, we're smart enough, thanks.
35dbb6b
Patch4:			xmms2-0.5DrLecter-no-O0.patch
35dbb6b
# More sane versioning
f5e49dd
Patch5:			xmms2-0.6DrMattDestruction-moresaneversioning.patch
35dbb6b
URL:			http://wiki.xmms2.xmms.se/
35dbb6b
BuildRoot:		%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
35dbb6b
BuildRequires:		sqlite-devel, flac-devel, libofa-devel
35dbb6b
BuildRequires:		libcdio-devel, libdiscid-devel, libsmbclient-devel
35dbb6b
BuildRequires:		libmpcdec-devel, gnome-vfs2-devel, jack-audio-connection-kit-devel
35dbb6b
BuildRequires:		fftw-devel, libsamplerate-devel, libxml2-devel, alsa-lib-devel
35dbb6b
BuildRequires:		libao-devel, libshout-devel, Pyrex, ruby-devel, ruby
35dbb6b
BuildRequires:		perl-devel, boost-devel, pulseaudio-libs-devel, avahi-glib-devel
35dbb6b
BuildRequires:		libmodplug-devel, ecore-devel, gamin-devel
35dbb6b
BuildRequires:		avahi-compat-libdns_sd-devel, doxygen
7aa09c3
BuildRequires:		libvisual-devel, wavpack-devel, SDL-devel
262fc7d
BuildRequires:		glib2-devel, readline-devel, ncurses-devel
35dbb6b
35dbb6b
%description
35dbb6b
XMMS2 is an audio framework, but it is not a general multimedia player - it 
35dbb6b
will not play videos. It has a modular framework and plugin architecture for 
35dbb6b
audio processing, visualisation and output, but this framework has not been 
35dbb6b
designed to support video. Also the client-server design of XMMS2 (and the 
35dbb6b
daemon being independent of any graphics output) practically prevents direct 
35dbb6b
video output being implemented. It has support for a wide range of audio 
35dbb6b
formats, which is expandable via plugins. It includes a basic CLI interface 
35dbb6b
to the XMMS2 framework, but most users will want to install a graphical XMMS2 
35dbb6b
client (such as gxmms2 or esperanza).
35dbb6b
35dbb6b
%package devel
35dbb6b
Summary:	Development libraries and headers for XMMS2
35dbb6b
Group:		Development/Libraries
f5e49dd
Requires:	glib2-devel, boost-devel
35dbb6b
Requires:	pkgconfig
35dbb6b
Requires:	%{name} = %{version}-%{release}
35dbb6b
35dbb6b
%description devel
35dbb6b
Development libraries and headers for XMMS2. You probably need this to develop
35dbb6b
or build new plugins for XMMS2.
35dbb6b
35dbb6b
%package docs
35dbb6b
Summary:	Development documentation for XMMS2
35dbb6b
Group:		Documentation
35dbb6b
Requires:	%{name} = %{version}-%{release}
35dbb6b
35dbb6b
%description docs
35dbb6b
API documentation for the XMMS2 modular audio framework architecture.
35dbb6b
35dbb6b
%package python
35dbb6b
Summary:	Python support for XMMS2
35dbb6b
Group:		Applications/Multimedia
35dbb6b
Requires:	%{name} = %{version}-%{release}
35dbb6b
35dbb6b
%description python
35dbb6b
Python bindings for XMMS2.
35dbb6b
35dbb6b
%package perl
35dbb6b
Summary:	Perl support for XMMS2
35dbb6b
License:	GPL+ or Artistic
35dbb6b
Group:		Applications/Multimedia
35dbb6b
Requires:	%{name} = %{version}-%{release}
35dbb6b
Requires:	perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
35dbb6b
35dbb6b
%description perl
35dbb6b
Perl bindings for XMMS2.
35dbb6b
35dbb6b
%package ruby
35dbb6b
Summary:	Ruby support for XMMS2
35dbb6b
Group:		Applications/Multimedia
35dbb6b
Requires:	%{name} = %{version}-%{release}
35dbb6b
Requires:	ruby(abi) = 1.8
35dbb6b
35dbb6b
%description ruby
35dbb6b
Ruby bindings for XMMS2.
35dbb6b
f5e49dd
%package -n nyxmms2
f5e49dd
Summary:	Commandline client for XMMS2
f5e49dd
Group:		Applications/Multimedia
f5e49dd
Requires:	%{name} = %{version}-%{release}
f5e49dd
f5e49dd
%description -n nyxmms2
f5e49dd
nyxmms2 is the new official commandline client for XMMS2. It can be run in
f5e49dd
either shell-mode (if started without arguments), or in inline-mode where
f5e49dd
it executes the command passed as argument directly.
f5e49dd
35dbb6b
%prep
35dbb6b
%setup -q -n %{name}-%{version}%{codename}
35dbb6b
%patch1 -p1 -b .plugins-use-libdir
35dbb6b
%patch2 -p1 -b .default-output-pulse
35dbb6b
%patch4 -p1 -b .noO0
35dbb6b
%patch5 -p1 -b .versionsanity
35dbb6b
35dbb6b
# This header doesn't need to be executable
35dbb6b
chmod -x src/include/xmmsclient/xmmsclient++/dict.h
35dbb6b
35dbb6b
# Clean up paths in wafadmin
35dbb6b
WAFADMIN_FILES=`find wafadmin/ -type f`
35dbb6b
for i in $WAFADMIN_FILES; do
35dbb6b
	sed -i 's|/usr/lib|%{_libdir}|g' $i
35dbb6b
done
f5e49dd
sed -i 's|"lib"|"%{_lib}"|g' wscript
35dbb6b
35dbb6b
%build
35dbb6b
export CFLAGS="%{optflags}"
35dbb6b
export CPPFLAGS="%{optflags}"
f5e49dd
export LIBDIR="%{_libdir}"
35dbb6b
./waf configure --prefix=%{_prefix} --with-libdir=%{_libdir} --with-ruby-libdir=%{ruby_sitearch} --with-perl-archdir=%{perl_archlib} --with-pkgconfigdir=%{_libdir}/pkgconfig
35dbb6b
./waf build -v %{?_smp_mflags}
35dbb6b
# make the docs
35dbb6b
doxygen
35dbb6b
35dbb6b
%install
35dbb6b
rm -rf %{buildroot}
f5e49dd
export LIBDIR="%{_libdir}"
35dbb6b
./waf install --destdir=%{buildroot} --prefix=%{_prefix} --with-libdir=%{_libdir} --with-ruby-libdir=%{ruby_sitearch} --with-perl-archdir=%{perl_archlib} --with-pkgconfigdir=%{_libdir}/pkgconfig
35dbb6b
35dbb6b
# exec flags for debuginfo
35dbb6b
chmod +x %{buildroot}%{_libdir}/%{name}/* %{buildroot}%{_libdir}/libxmmsclient*.so* %{buildroot}%{python_sitearch}/xmmsclient/xmmsapi.so \
35dbb6b
	%{buildroot}%{perl_archlib}/auto/Audio/XMMSClient/XMMSClient.so %{buildroot}%{ruby_sitearch}/xmmsclient_*.so
35dbb6b
35dbb6b
# Convert to utf-8
35dbb6b
for i in %{buildroot}%{_mandir}/man1/*.gz; do
35dbb6b
	gunzip $i;
35dbb6b
done
35dbb6b
for i in %{buildroot}%{_mandir}/man1/*.1 ChangeLog; do
35dbb6b
	iconv -o $i.iso88591 -f iso88591 -t utf8 $i
35dbb6b
	mv $i.iso88591 $i
35dbb6b
done
35dbb6b
35dbb6b
install -m0755 %{SOURCE1} %{buildroot}%{_bindir}
35dbb6b
35dbb6b
%clean
35dbb6b
rm -rf %{buildroot}
35dbb6b
35dbb6b
%post -p /sbin/ldconfig
35dbb6b
35dbb6b
%postun -p /sbin/ldconfig
35dbb6b
35dbb6b
%files
35dbb6b
%defattr(-,root,root,-)
35dbb6b
%doc AUTHORS ChangeLog COPYING COPYING.GPL COPYING.LGPL README TODO
35dbb6b
%{_bindir}/%{name}*
f5e49dd
%{_bindir}/vistest*
35dbb6b
%{_libdir}/libxmmsclient*.so.*
35dbb6b
%{_libdir}/%{name}
35dbb6b
%{_mandir}/man1/%{name}*
35dbb6b
%{_datadir}/pixmaps/%{name}*
35dbb6b
%{_datadir}/%{name}
35dbb6b
35dbb6b
%files devel
35dbb6b
%defattr(-,root,root,-)
35dbb6b
%{_includedir}/%{name}/
35dbb6b
%{_libdir}/libxmmsclient*.so
35dbb6b
%{_libdir}/pkgconfig/%{name}-*.pc
35dbb6b
35dbb6b
%files docs
35dbb6b
%defattr(-,root,root,-)
35dbb6b
%doc doc/xmms2/html
35dbb6b
35dbb6b
%files perl
35dbb6b
%defattr(-,root,root,-)
35dbb6b
%{perl_archlib}/Audio/
35dbb6b
%{perl_archlib}/auto/Audio/
35dbb6b
35dbb6b
%files python
35dbb6b
%defattr(-,root,root,-)
35dbb6b
%{python_sitearch}/xmmsclient/
35dbb6b
35dbb6b
%files ruby
35dbb6b
%defattr(-,root,root,-)
35dbb6b
%{ruby_sitearch}/xmmsclient*
35dbb6b
f5e49dd
%files -n nyxmms2
f5e49dd
%defattr(-,root,root,-)
f5e49dd
%{_bindir}/nyxmms2
f5e49dd
%{_mandir}/man1/nyxmms2.*
f5e49dd
35dbb6b
%changelog
89b7c5c
* Fri Jan 22 2010 Adrian Reber <adrian@lisas.de> - 0.6-7
89b7c5c
- Rebuild for libcdio-0.82
89b7c5c
8d6f7ab
* Tue Jan 19 2010 Tom "spot" Callaway <tcallawa@redhat.com> - 0.6-6
8d6f7ab
- rebuild for new boost
8d6f7ab
9c91272
* Fri Dec  4 2009 Stepan Kasal <skasal@redhat.com> - 0.6-5
9c91272
- rebuild against perl 5.10.1
9c91272
451ae66
* Fri Aug 21 2009 Tomas Mraz <tmraz@redhat.com> - 0.6-4
451ae66
- rebuilt with new openssl
451ae66
262fc7d
* Tue Aug 11 2009 Tom "spot" Callaway <tcallawa@redhat.com> - 0.6-3
262fc7d
- BuildRequires: glib2-devel, readline-devel, ncurses-devel
262fc7d
7aa09c3
* Tue Aug 11 2009 Tom "spot" Callaway <tcallawa@redhat.com> - 0.6-2
7aa09c3
- BuildRequires: SDL-devel
7aa09c3
f5e49dd
* Tue Aug 11 2009 Tom "spot" Callaway <tcallawa@redhat.com> - 0.6-1
f5e49dd
- update to 0.6
f5e49dd
f5f9b20
* Mon Jul 27 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.5-7
f5f9b20
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
f5f9b20
e510ee9
* Thu Feb 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.5-6
e510ee9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
e510ee9
a466998
* Sun Jan 18 2009 Tomas Mraz <tmraz@redhat.com> - 0.5-5
a466998
- rebuild with new openssl
a466998
4050b87
* Tue Jan 13 2009 Adrian Reber <adrian@lisas.de> - 0.5-4
4050b87
- Rebuild for libcdio-0.81
4050b87
19a0eaa
* Wed Dec 17 2008 Benjamin Kosnik  <bkoz@redhat.com> - 0.5-3
19a0eaa
- Rebuild for boost-1.37.0.
19a0eaa
35dbb6b
* Wed Dec 10 2008 Tom "spot" Callaway <tcallawa@redhat.com> 0.5-2
35dbb6b
- new docs subpackage
35dbb6b
- many cleanups from package review
35dbb6b
35dbb6b
* Thu Dec 4 2008 Tom "spot" Callaway <tcallawa@redhat.com> 0.5-1
35dbb6b
- Initial package for Fedora