commit 2c1d777d9c3980dafb83ed8ba15dbc7615283486
Author: Igor Gnatenko <ignatenko(a)redhat.com>
Date: Mon Jun 27 16:26:07 2016 +0200
Update to 1.23.4; fixes in packaging
Signed-off-by: Igor Gnatenko <ignatenko(a)redhat.com>
.gitignore | 1 +
mpg123-1.22.2-apetag.patch | 60 -----------
mpg123.spec | 241 ++++++++++++++++++++-------------------------
sources | 2 +-
4 files changed, 109 insertions(+), 195 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 01e2937..72d1a5d 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,2 @@
mpg123-1.22.4.tar.bz2
+/mpg123-1.23.4.tar.bz2
diff --git a/mpg123.spec b/mpg123.spec
index a210ca8..30fbab9 100644
--- a/mpg123.spec
+++ b/mpg123.spec
@@ -1,174 +1,147 @@
-%global man_ext .gz
-# alternatives priority (we are the real thing)
-%global apriority 99
+%global out out123
+%global fmt fmt123
Name: mpg123
-Version: 1.22.4
+Version: 1.23.4
Release: 1%{?dist}
-Summary: MPEG audio player
-Group: Applications/Multimedia
-License: GPLv2+ and LGPLv2
-URL:
http://mpg123.org/
-Source:
http://downloads.sourceforge.net/mpg123/mpg123-%{version}.tar.bz2
-# Fix playback of files with apetags, submitted upstream
-Patch0: mpg123-1.22.2-apetag.patch
-BuildRequires: libtool-ltdl-devel SDL-devel portaudio-devel
-BuildRequires: jack-audio-connection-kit-devel nas-devel
-BuildRequires: alsa-lib-devel pulseaudio-libs-devel openal-soft-devel
-BuildRequires: doxygen
-Requires: libmpg123%{?_isa} = %{version}-%{release}
-Requires(post): %{_sbindir}/alternatives
-Requires(postun): %{_sbindir}/alternatives
-Provides: mp3-cmdline = %{version}-%{release}
-
-%description
-Real time command line MPEG audio player for Layer 1, 2 and Layer3.
+Summary: Real time MPEG 1.0/2.0/2.5 audio player/decoder for layers 1, 2 and 3
+License: LGPLv2+
+URL:
http://mpg123.org
+Source0: %{url}/download/%{name}-%{version}.tar.bz2
+
+BuildRequires: autoconf
+BuildRequires: automake
+BuildRequires: libtool
+
+BuildRequires: gcc
+BuildRequires: libtool-ltdl-devel
+BuildRequires: pkgconfig(alsa)
+
+Requires: %{name}-libs%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release}
+
+Recommends: (%{name}-plugins-pulseaudio%{?_isa} if pulseaudio%{?_isa})
+Recommends: (%{name}-plugins-jack%{?_isa} if jack-audio-connection-kit%{?_isa})
+Recommends: (%{name}-plugins-portaudio%{?_isa} if portaudio%{?_isa})
+
+%global _description \
+Real time MPEG 1.0/2.0/2.5 audio player/decoder for layers 1, 2 and 3 (most\
+commonly MPEG 1.0 layer 3 aka MP3), as well as re-usable decoding and output\
+libraries.
+
+%description %{_description}
%package plugins-pulseaudio
-Summary: Pulseaudio output plug-in for mpg123
-Group: Applications/Multimedia
-Requires: %{name}%{?_isa} = %{version}-%{release}
+Summary: Plulseaudio output plug-in for %{name}
+BuildRequires: pkgconfig(libpulse-simple)
+Requires: %{name}%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release}
+Enhances: %{name}%{?_isa}
-%description plugins-pulseaudio
-Pulseaudio output plug-in for mpg123.
+%description plugins-pulseaudio %{_description}
+Pulseaudio output plug-in.
%package plugins-jack
-Summary: JACK output plug-in for mpg123
-Group: Applications/Multimedia
-Requires: %{name}%{?_isa} = %{version}-%{release}
-
-%description plugins-jack
-JACK output plug-in for mpg123.
+Summary: JACK output plug-in for %{name}
+BuildRequires: pkgconfig(jack)
+Requires: %{name}%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release}
+Enhances: %{name}%{?_isa}
+Obsoletes: %{name}-plugins-extras%{?_isa} < 1.23.4-1
+%description plugins-jack %{_description}
-%package plugins-extras
-Summary: Extra output plugins for mpg123
-Group: Applications/Multimedia
-Requires: %{name}%{?_isa} = %{version}-%{release}
+JACK output plug-in.
-%description plugins-extras
-Extra (non often used) output plugins for mpg123 which require additional
-dependencies to be installed.
+%package plugins-portaudio
+Summary: PortAudio output plug-in for %{name}
+BuildRequires: pkgconfig(portaudio-2.0)
+Requires: %{name}%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release}
+Enhances: %{name}%{?_isa}
+%description plugins-portaudio %{_description}
-%package -n libmpg123
-Summary: MPEG audio Layer 1, 2 and Layer3 library
-Group: System Environment/Libraries
+PortAudio output plug-in.
-%description -n libmpg123
-MPEG audio Layer 1, 2 and Layer3 library.
+%package libs
+Summary: %{summary}
+Obsoletes: lib%{name}%{?_isa} < 1.23.4-1
+%description libs %{_description}
-%package -n libmpg123-devel
-Summary: Development files for mpg123
-Group: Development/Libraries
-Requires: libmpg123%{?_isa} = %{version}-%{release}
+%package libs-devel
+Summary: %{summary}
+BuildRequires: /usr/bin/doxygen
+Requires: %{name}-libs%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release}
+Obsoletes: lib%{name}-devel%{?_isa} < 1.23.4-1
-%description -n libmpg123-devel
-The libmpg123-devel package contains libraries and header files for
-developing applications that use libmpg123.
+%description libs-devel %{_description}
+Development files for decoding and output libraries.
%prep
-%setup -q
-%patch0 -p1
-iconv -f iso8859-1 -t utf8 AUTHORS -o AUTHORS.utf8
-touch -r AUTHORS AUTHORS.utf8
-mv AUTHORS.utf8 AUTHORS
-echo "HTML_TIMESTAMP=NO" >> doc/doxygen.conf
-
+%autosetup
%build
-%configure
-# Get rid of /usr/lib64 rpath on 64bit
-sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g'
libtool
-sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
-make %{?_smp_mflags}
+autoreconf -vfi
+%configure --enable-modules=yes --with-default-audio=alsa
--with-audio=alsa,jack,pulse,oss
+%make_build
pushd doc
-doxygen doxygen.conf
+ doxygen doxygen.conf
popd
-
%install
-make install DESTDIR=$RPM_BUILD_ROOT
-rm $RPM_BUILD_ROOT%{_libdir}/*.la
-mkdir -p $RPM_BUILD_ROOT%{_mandir}/man3
-install -m 644 -p doc/man/man3/mpg123*.3 $RPM_BUILD_ROOT%{_mandir}/man3
-install -m 644 -p doc/man/man3/MPG123*.3 $RPM_BUILD_ROOT%{_mandir}/man3
-# mpg321 also "provides" a mpg123 manpage an binary so mv ours to mpg123.bin
-# and use alternatives
-mv $RPM_BUILD_ROOT%{_bindir}/mpg123 $RPM_BUILD_ROOT%{_bindir}/mpg123.bin
-mv $RPM_BUILD_ROOT%{_mandir}/man1/mpg123.1 \
- $RPM_BUILD_ROOT%{_mandir}/man1/mpg123.bin.1
-# prepare ghost alternatives
-# touch does not set the correct file mode bits
-ln -s mpg123.bin $RPM_BUILD_ROOT%{_bindir}/mpg123
-ln -s mpg123.bin $RPM_BUILD_ROOT%{_bindir}/mp3-cmdline
-ln -s mpg123.bin.1 $RPM_BUILD_ROOT%{_mandir}/man1/mpg123.1
-
-
-%post
-%{_sbindir}/alternatives \
- --install %{_bindir}/mpg123 mpg321_binlink %{_bindir}/mpg123.bin %{apriority} \
- --slave %{_mandir}/man1/mpg123.1%{man_ext} mpg321_manlink
%{_mandir}/man1/mpg123.bin.1%{man_ext} \
- --slave %{_bindir}/mp3-cmdline mpg321_mp3cmdline %{_bindir}/mpg123.bin \
- >/dev/null 2>&1 || :
-
-%postun
-if [ "$1" -eq 0 ]; then
- %{_sbindir}/alternatives \
- --remove mpg321_binlink %{_bindir}/mpg123.bin \
- >/dev/null 2>&1 || :
-fi
-
-%post -n libmpg123 -p /sbin/ldconfig
-
-%postun -n libmpg123 -p /sbin/ldconfig
+%make_install
+find %{buildroot}%{_libdir} -type f -name '*.la' -delete -print
+%post libs -p /sbin/ldconfig
+%postun libs -p /sbin/ldconfig
%files
-%doc README doc/README.remote
-%{_bindir}/mpg123.bin
-%{_bindir}/mpg123-id3dump
-%{_bindir}/mpg123-strip
-%{_bindir}/out123
-%ghost %{_bindir}/mpg123
-%ghost %{_bindir}/mp3-cmdline
-%dir %{_libdir}/mpg123
-%{_libdir}/mpg123/output_alsa.*
-%{_libdir}/mpg123/output_dummy.*
-%{_libdir}/mpg123/output_oss.*
-%{_mandir}/man1/mpg123.bin.1%{man_ext}
-%{_mandir}/man1/out123.1%{man_ext}
-%ghost %{_mandir}/man1/mpg123.1%{man_ext}
+%doc doc/README.remote
+%{_bindir}/%{name}
+%{_bindir}/%{name}-id3dump
+%{_bindir}/%{name}-strip
+%{_bindir}/%{out}
+%doc %{_mandir}/man1/%{name}.1*
+%doc %{_mandir}/man1/%{out}.1*
+%dir %{_libdir}/%{name}/
+%{_libdir}/%{name}/output_alsa.so
+%{_libdir}/%{name}/output_dummy.so
+%{_libdir}/%{name}/output_oss.so
%files plugins-pulseaudio
-%{_libdir}/mpg123/output_pulse.*
+%{_libdir}/%{name}/output_pulse.so
%files plugins-jack
-%{_libdir}/mpg123/output_jack.*
-
-%files plugins-extras
-%{_libdir}/mpg123/output_nas.*
-%{_libdir}/mpg123/output_openal.*
-%{_libdir}/mpg123/output_portaudio.*
-%{_libdir}/mpg123/output_sdl.*
-
-%files -n libmpg123
-%doc AUTHORS ChangeLog COPYING NEWS README
-%{_libdir}/libmpg123.so.*
-
-%files -n libmpg123-devel
-%doc doc/BENCHMARKING doc/README.gain doc/html doc/examples
-%{_includedir}/mpg123.h
-%{_libdir}/libmpg123.so
-%{_libdir}/pkgconfig/libmpg123.pc
-%{_mandir}/man3/*.3*
-
+%{_libdir}/%{name}/output_jack.so
+
+%files plugins-portaudio
+%{_libdir}/%{name}/output_portaudio.so
+
+%files libs
+%license COPYING
+%doc NEWS
+%{_libdir}/lib%{name}.so.*
+%{_libdir}/lib%{out}.so.*
+
+%files libs-devel
+%doc NEWS.lib%{name} doc/html doc/examples doc/BENCHMARKING doc/README.gain
+%{_includedir}/%{name}.h
+%{_includedir}/%{out}.h
+%{_includedir}/%{fmt}.h
+%{_libdir}/lib%{name}.so
+%{_libdir}/lib%{out}.so
+%{_libdir}/pkgconfig/lib%{name}.pc
+%{_libdir}/pkgconfig/lib%{out}.pc
%changelog
+* Mon Jun 27 2016 Igor Gnatenko <ignatenko(a)redhat.com> - 1.23.4-1
+- Update to 1.23.4
+- Use weak and rich deps for plugins
+- rename libmpg123 to mpg123-libs
+- Drop usage of alternatives (nothing uses it actually)
+- Correct license
+
* Sat Oct 31 2015 Hans de Goede <j.w.r.degoede(a)gmail.com> - 1.22.4-1
- New upstream release 1.22.4 (rf3802)
diff --git a/sources b/sources
index 3c5f35a..2a659f9 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-2dfafae3bbc532b4c8b04a77c6a6de89 mpg123-1.22.4.tar.bz2
+dea9e3a815d127d04ebe9f6b80f229ce mpg123-1.23.4.tar.bz2