Blob Blame History Raw
# Minimum audacious/audacious-plugins version in inter-package
# dependencies.
# We enforce 2.1 as 2.0.1 or older is insufficient.
%define aud_ver 2.1

Name: audacious
Version: 2.1
Release: 7%{?dist}

License: GPLv3
Summary: GTK2 based media player similar to XMMS
URL: http://audacious-media-player.org/
Group: Applications/Multimedia

Source0: http://distfiles.atheme.org/audacious-%{version}.tgz

# will be obsolete in > 2.1
Patch0: audacious-2.1-pluginprio.patch
# debug helper and safety measure for #538379
Patch1: audacious-2.1-mowgli-crash.patch
# effect/flow crash fix from devel
Patch2: audacious-2.1-output.patch

BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

BuildRequires: gettext
BuildRequires: glib2-devel
BuildRequires: gtk2-devel
BuildRequires: libmowgli-devel
BuildRequires: mcs-devel
BuildRequires: libxml2-devel
BuildRequires: dbus-devel dbus-glib-devel
BuildRequires: libSM-devel
BuildRequires: desktop-file-utils

# disabled by default
BuildRequires: libsamplerate-devel

# The automatic SONAME dependency is not enough
# during version upgrades.
Requires: audacious-libs = %{version}-%{release}

Requires: audacious-plugins >= %{aud_ver}

# Skin packages can require this from xmms and all GUI compatible players
Provides: xmms-gui

%description
Audacious is a media player that currently uses a skinned user interface
based on Winamp 2.x skins.


%package libs
Summary: Library files for the Audacious media player
Group: System Environment/Libraries

%description libs
Library files for the Audacious media player.


%package devel
Summary: Development files for the Audacious media player
Group: Development/Libraries
Requires: %{name}-libs = %{version}-%{release}
Requires: glib2-devel gtk2-devel
Requires: dbus-glib-devel
Requires: mcs-devel
Requires: libmowgli-devel
Requires: pkgconfig

%description devel
Files needed when building software for the Audacious media player.


%prep
%setup -q -n %{name}-%{version}
%patch0 -p1 -b .pluginprio
%patch1 -p1 -b .mowgli-crash
%patch2 -p1 -b .output
sed -i '\,^.SILENT:,d' buildsys.mk.in

%build
%configure  \
    --enable-samplerate \
    --disable-sse2  \
    --disable-rpath \
    --disable-dependency-tracking
make %{?_smp_mflags}


%install
rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT INSTALL="install -p"
find $RPM_BUILD_ROOT -type f -name "*.la" -exec rm -f {} ';'

%find_lang %{name}

desktop-file-install  \
    --dir $RPM_BUILD_ROOT%{_datadir}/applications  \
    --remove-mime-type audio/mp3  \
    --remove-mime-type audio/mpeg  \
    --remove-mime-type audio/mpegurl  \
    --remove-mime-type audio/x-mp3  \
    --remove-mime-type audio/x-mpeg  \
    --remove-mime-type audio/x-mpegurl  \
    --remove-mime-type audio/x-ms-wma  \
    --remove-mime-type audio/x-scpls  \
    --remove-category Application  \
    $RPM_BUILD_ROOT%{_datadir}/applications/audacious2.desktop

mkdir -p $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/48x48/apps
mv $RPM_BUILD_ROOT%{_datadir}/pixmaps/audacious2.png $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/48x48/apps

# 2.2-alpha1 will install these compatibility softlinks
cd $RPM_BUILD_ROOT%{_bindir}
rm -f audacious audtool
ln -s audacious2 audacious
ln -s audtool2 audtool
cd -


%clean
rm -rf $RPM_BUILD_ROOT


%post
update-desktop-database &> /dev/null || :
touch --no-create %{_datadir}/icons/hicolor &>/dev/null || :

%postun
update-desktop-database &> /dev/null || :
if [ $1 -eq 0 ] ; then
    touch --no-create %{_datadir}/icons/hicolor &>/dev/null
    gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
fi

%posttrans
gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :

%post libs -p /sbin/ldconfig

%postun libs -p /sbin/ldconfig


%files -f %{name}.lang
%defattr(-,root,root,-)
%doc AUTHORS COPYING NEWS README
%{_bindir}/audacious2
%{_bindir}/audacious
%{_bindir}/audtool2
%{_bindir}/audtool
%{_datadir}/audacious/
%{_mandir}/man[^3]/*
%{_datadir}/applications/*.desktop
%{_datadir}/icons/hicolor/48x48/apps/*

%files libs
%defattr(-,root,root,-)
%{_libdir}/*.so.*

%files devel
%defattr(-,root,root,-)
%{_includedir}/audacious/
%{_includedir}/libaudcore/
%{_includedir}/libSAD/
%{_libdir}/*.so
%{_libdir}/pkgconfig/*.pc


%changelog
* Sat Nov 21 2009 Michael Schwendt <mschwendt@fedoraproject.org> - 2.1-7
- Fix effects output (also fixes sndstretch realloc crash).

* Thu Nov 19 2009 Michael Schwendt <mschwendt@fedoraproject.org> - 2.1-6
- Rebuild with a safety-measure/terminal-debug patch for the
  mowgli_dictionary_retune crash on x86_64 (#538379).

* Sun Sep 20 2009 Michael Schwendt <mschwendt@fedoraproject.org> - 2.1-5
- /usr/bin/audacious and /usr/bin/audtool compatibility links are
  provided officially by upstream within 2.2-alpha1.

* Sat Sep 12 2009 Michael Schwendt <mschwendt@fedoraproject.org> - 2.1-4
- Build with --enable-samplerate (off by default), BR libsamplerate-devel

* Mon Aug 24 2009 Michael Schwendt <mschwendt@fedoraproject.org> - 2.1-3
- Default to PulseAudio output plugin: Fix pluginenum.c indentation
  to make output plugin default/priority init work. Actually, when I
  noticed this bug, I went a step further and copied a rewrite from
  upstream devel scm.

* Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild

* Tue Jul 14 2009 Michael Schwendt <mschwendt@fedoraproject.org> - 2.1-1
- Upgrade to 2.1 final.

* Mon Jun 29 2009 Michael Schwendt <mschwendt@fedoraproject.org> - 2.1-0.1.beta1
- Upgrade to 2.1beta1.
- Drop obsolete patches.

* Fri Jun  5 2009 Michael Schwendt <mschwendt@fedoraproject.org> - 2.0.1-0.1
- Initial package for Audacious 2.0.1
  based on a major spec overhaul of the older Fedora packages.