add xmms subpackage, conditionalized, but on by default
This commit is contained in:
parent
0cf8bb6643
commit
dfc6516e25
62
flac.spec
62
flac.spec
@ -1,20 +1,27 @@
|
||||
# Disable if you don't need xmms
|
||||
%global with_xmms 1
|
||||
|
||||
%if %{with_xmms}
|
||||
%define xmms_inputdir %(xmms-config --input-plugin-dir 2>/dev/null || echo %{_libdir}/xmms/General)
|
||||
%endif
|
||||
|
||||
Summary: An encoder/decoder for the Free Lossless Audio Codec
|
||||
Name: flac
|
||||
Version: 1.3.1
|
||||
Release: 4%{?dist}
|
||||
Release: 5%{?dist}
|
||||
License: BSD and GPLv2+ and GFDL
|
||||
Group: Applications/Multimedia
|
||||
|
||||
Source0: http://downloads.xiph.org/releases/flac/flac-%{version}.tar.xz
|
||||
URL: http://www.xiph.org/flac/
|
||||
|
||||
# use our CFLAGS and don't force SSE intrinsics
|
||||
Patch1: flac-cflags.patch
|
||||
|
||||
Requires: %{name}-libs%{?_isa} = %{version}-%{release}
|
||||
|
||||
BuildRequires: libogg-devel
|
||||
BuildRequires: automake autoconf libtool gettext-devel doxygen
|
||||
%if %{with_xmms}
|
||||
BuildRequires: xmms-devel desktop-file-utils
|
||||
Source1: xmms-flac.desktop
|
||||
%endif
|
||||
%ifarch %{ix86}
|
||||
# 2.0 supports symbol visibility
|
||||
BuildRequires: nasm >= 2.0
|
||||
@ -42,7 +49,6 @@ the stream format, reference encoders and decoders in library form,
|
||||
flac, a command-line program to encode and decode FLAC files, metaflac,
|
||||
a command-line metadata editor for FLAC files and input plugins for
|
||||
various music players.
|
||||
|
||||
This package contains the FLAC libraries.
|
||||
|
||||
%package devel
|
||||
@ -55,6 +61,21 @@ Requires: pkgconfig
|
||||
This package contains all the files needed to develop applications that
|
||||
will use the Free Lossless Audio Codec.
|
||||
|
||||
%if %{with_xmms}
|
||||
%package -n xmms-flac
|
||||
Summary: XMMS plugin needed to play FLAC (Free Lossless Audio Codec) files
|
||||
# The entire FLAC sources are covered by multiple licenses, but the xmms plugin
|
||||
# is only GPLv2+
|
||||
License: GPLv2+
|
||||
Requires(post): desktop-file-utils
|
||||
Requires(postun): desktop-file-utils
|
||||
|
||||
%description -n xmms-flac
|
||||
FLAC is a Free Lossless Audio Codec. The FLAC format supports streaming,
|
||||
seeking, and archival, and gives 25-75% compression on typical CD audio.
|
||||
This is the input plugin for XMMS to be able to read FLAC files.
|
||||
%endif
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
%patch1 -p1 -b .cflags
|
||||
@ -66,7 +87,11 @@ will use the Free Lossless Audio Codec.
|
||||
# -funroll-loops makes encoding about 10% faster
|
||||
export CFLAGS="%{optflags} -funroll-loops"
|
||||
%configure \
|
||||
%if %{with_xmms}
|
||||
--enable-xmms-plugin \
|
||||
%else
|
||||
--disable-xmms-plugin \
|
||||
%endif
|
||||
--disable-silent-rules \
|
||||
--disable-thorough-tests
|
||||
|
||||
@ -75,6 +100,10 @@ make %{?_smp_mflags}
|
||||
%install
|
||||
make install DESTDIR=%{buildroot}
|
||||
|
||||
%if %{with_xmms}
|
||||
desktop-file-install --dir=%{buildroot}%{_datadir}/applications %{SOURCE1}
|
||||
%endif
|
||||
|
||||
# split documentation
|
||||
mv %{buildroot}%{_docdir}/flac* ./flac-doc
|
||||
mkdir -p flac-doc-devel
|
||||
@ -82,6 +111,9 @@ mv flac-doc{/html/api,-devel}
|
||||
rm flac-doc/FLAC.tag
|
||||
|
||||
rm %{buildroot}%{_libdir}/*.la
|
||||
%if %{with_xmms}
|
||||
rm %{buildroot}%{xmms_inputdir}/*.la
|
||||
%endif
|
||||
|
||||
%check
|
||||
make -C test check FLAC__TEST_LEVEL=0 &> /dev/null
|
||||
@ -90,6 +122,14 @@ make -C test check FLAC__TEST_LEVEL=0 &> /dev/null
|
||||
|
||||
%postun libs -p /sbin/ldconfig
|
||||
|
||||
%if %{with_xmms}
|
||||
%post -n xmms-flac
|
||||
update-desktop-database &> /dev/null || :
|
||||
|
||||
%postun -n xmms-flac
|
||||
update-desktop-database &> /dev/null || :
|
||||
%endif
|
||||
|
||||
%files
|
||||
%doc flac-doc/*
|
||||
%{_bindir}/flac
|
||||
@ -107,7 +147,17 @@ make -C test check FLAC__TEST_LEVEL=0 &> /dev/null
|
||||
%{_libdir}/pkgconfig/*
|
||||
%{_datadir}/aclocal/*.m4
|
||||
|
||||
%if %{with_xmms}
|
||||
%files -n xmms-flac
|
||||
%license COPYING.GPL
|
||||
%{_datadir}/applications/xmms-flac.desktop
|
||||
%{xmms_inputdir}/libxmms-flac.so
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
* Mon Aug 10 2015 Tom Callaway <spot@fedoraproject.org> - 1.3.1-5
|
||||
- add xmms-flac plugin as a conditionalized subpackage
|
||||
|
||||
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.3.1-4
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
|
||||
|
||||
|
9
xmms-flac.desktop
Normal file
9
xmms-flac.desktop
Normal file
@ -0,0 +1,9 @@
|
||||
[Desktop Entry]
|
||||
Name=XMMS
|
||||
Exec=xmms -p -e %F
|
||||
Icon=xmms
|
||||
MimeType=audio/x-flac;audio/flac;
|
||||
Categories=AudioVideo;Player;
|
||||
Terminal=false
|
||||
Type=Application
|
||||
NoDisplay=true
|
Loading…
Reference in New Issue
Block a user