%global man_ext .gz # alternatives priority (we are the real thing) %global apriority 99 %global default_audio dummy %{!?_without_alsa: %global default_audio alsa} %{!?_without_pulse: %global default_audio pulse} Name: mpg123 Version: 1.22.4 Release: 1.n0i.11%{?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 BuildRequires: libtool-ltdl-devel BuildRequires: doxygen %{!?_without_alsa:BuildRequires: alsa-lib-devel} %{!?_without_arts:BuildRequires: arts-devel} %{!?_without_esd:BuildRequires: esound-devel} %{!?_without_jack:BuildRequires: jack-audio-connection-kit-devel} %{!?_without_nas:BuildRequires: nas-devel} %{!?_without_openal:BuildRequires: openal-soft-devel} %{!?_without_oss:BuildRequires: alsa-oss-devel} %{!?_without_portaudio:BuildRequires: portaudio-devel} %{!?_without_pulse:BuildRequires: pulseaudio-libs-devel} %{!?_without_sdl:BuildRequires: SDL-devel} 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. %package -n libmpg123 Summary: MPEG audio Layer 1, 2 and Layer3 library Group: System Environment/Libraries %description -n libmpg123 MPEG audio Layer 1, 2 and Layer3 library. %package -n libmpg123-devel Summary: Development files for mpg123 Group: Development/Libraries Requires: libmpg123 = %{version}-%{release}, pkgconfig %description -n libmpg123-devel The libmpg123-devel package contains libraries and header files for developing applications that use libmpg123. %if %{!?_without_alsa:1}0 %package plugins-alsa Summary: ALSA output plug-in for mpg123 Group: Applications/Multimedia Requires: %{name}%{?_isa} = %{version}-%{release} %description plugins-alsa ALSA output plug-in for mpg123 %endif %if %{!?_without_arts:1}0 %package plugins-arts Summary: aRts output plug-in for mpg123 Group: Applications/Multimedia Requires: %{name}%{?_isa} = %{version}-%{release} %description plugins-arts aRts output plug-in for mpg123 %endif %if %{!?_without_esd:1}0 %package plugins-esd Summary: ESD output plug-in for mpg123 Group: Applications/Multimedia Requires: %{name}%{?_isa} = %{version}-%{release} %description plugins-esd ESD output plug-in for mpg123. %endif %if %{!?_without_jack:1}0 %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. %endif %if %{!?_without_nas:1}0 %package plugins-nas Summary: NAS output plug-in for mpg123 Group: Applications/Multimedia Requires: %{name}%{?_isa} = %{version}-%{release} %description plugins-nas NAS output plug-in for mpg123. %endif %if %{!?_without_openal:1}0 %package plugins-openal Summary: OpenAL output plug-in for mpg123 Group: Applications/Multimedia Requires: %{name}%{?_isa} = %{version}-%{release} %description plugins-openal OpenAL output plug-in for mpg123. %endif %if %{!?_without_oss:1}0 %package plugins-oss Summary: OSS output plug-in for mpg123 Group: Applications/Multimedia Requires: %{name}%{?_isa} = %{version}-%{release} %description plugins-oss OSS output plug-in for mpg123. %endif %if %{!?_without_portaudio:1}0 %package plugins-portaudio Summary: Portaudio output plug-in for mpg123 Group: Applications/Multimedia Requires: %{name}%{?_isa} = %{version}-%{release} %description plugins-portaudio Portaudio output plug-in for mpg123. %endif %if %{!?_without_pulse:1}0 %package plugins-pulseaudio Summary: Pulseaudio output plug-in for mpg123 Group: Applications/Multimedia Requires: %{name}%{?_isa} = %{version}-%{release} %description plugins-pulseaudio Pulseaudio output plug-in for mpg123. %endif %if %{!?_without_sdl:1}0 %package plugins-sdl Summary: SDL output plug-in for mpg123 Group: Applications/Multimedia Requires: %{name}%{?_isa} = %{version}-%{release} %description plugins-sdl SDL output plug-in for mpg123. %endif %prep %setup -q 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 %build %configure \ --with-default-audio=%{default_audio} \ --disable-dependency-tracking \ --with-optimization=3 \ --enable-network=yes \ --with-audio=dummy,%{!?_without_alsa:,alsa}%{!?_without_pulse:,pulse}%{!?_without_arts:,arts}%{!?_without_esd:,esd}%{!?_without_jack:,jack}%{!?_without_nas:,nas}%{!?_without_oss:,oss}%{!?_without_portaudio:,portaudio}%{!?_without_sdl:,sdl} \ %ifarch x86_64 --with-cpu=x86-64 \ %endif %ifarch x86 --with-cpu=i586 \ %endif # 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} pushd doc 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 %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_dummy.* %{_mandir}/man1/mpg123.bin.1%{man_ext} %{_mandir}/man1/out123.1%{man_ext} %ghost %{_mandir}/man1/mpg123.1%{man_ext} %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* %if %{!?_without_alsa:1}0 %files plugins-alsa %{_libdir}/mpg123/output_alsa.* %endif %if %{!?_without_arts:1}0 %files plugins-arts %{_libdir}/mpg123/output_arts.* %endif %if %{!?_without_esd:1}0 %files plugins-esd %{_libdir}/mpg123/output_esd.* %endif %if %{!?_without_jack:1}0 %files plugins-jack %{_libdir}/mpg123/output_jack.* %endif %if %{!?_without_nas:1}0 %files plugins-nas %{_libdir}/mpg123/output_nas.* %endif %if %{!?_without_openal:1}0 %files plugins-openal %{_libdir}/mpg123/output_openal.* %endif %if %{!?_without_oss:1}0 %files plugins-oss %{_libdir}/mpg123/output_oss.* %endif %if %{!?_without_portaudio:1}0 %files plugins-portaudio %{_libdir}/mpg123/output_portaudio.* %endif %if %{!?_without_pulse:1}0 %files plugins-pulseaudio %{_libdir}/mpg123/output_pulse.* %endif %if %{!?_without_sdl:1}0 %files plugins-sdl %{_libdir}/mpg123/output_sdl.* %endif %changelog * Fri Aug 28 2015 Marius FERARU - 1.22.4-1.n0i.11 - version 1.22.4 * Mon Jun 22 2015 Marius FERARU - 1.22.2-1.n0i.10 - version 1.22.2 * Thu Jan 15 2015 Marius FERARU - 1.21.0-1.n0i.9 - version 1.21.0 * Thu Mar 13 2014 Marius FERARU - 1.19.0-1.n0i.8 - version 1.19.0 * Wed Jan 15 2014 Marius FERARU - 1.17.0-1.n0i.7 - version 1.17.0 * Tue Jul 02 2013 Marius FERARU - 1.15.4-1.n0i.6 - version 1.15.4 * Sun Mar 24 2013 Marius FERARU - 1.15.1-2.n0i.5 - rebuild on Fedora 18 * Wed Feb 27 2013 Marius FERARU - 1.15.1-1 - version 1.15.1 - sync with rpmfusion's packaging approach - optional dependencies/build - full plugin split (each one into its own package) * Mon Jul 02 2012 Richard Shaw - 1.14.3-1 - Update to latest upstream release. - Move README and README.remote to correct package. Fixes #1898. * Wed Apr 4 2012 Hans de Goede - 1.13.7-1 - New upstream bugfix release 1.13.7 - Properly build and install development documentation (rf#2257) * Sun Jan 29 2012 Hans de Goede - 1.13.4-1 - New upstream release 1.13.4 * Wed Jan 25 2012 Nicolas Chauvet - 1.12.3-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild * Tue Aug 24 2010 Hans de Goede 1.12.3-1 - New upstream release 1.12.3 * Fri Jul 16 2010 Hans de Goede 1.12.1-4 - Put the pulseaudio and jack output plugins in their own subpackages (rf#1278) * Mon Jun 21 2010 Hans de Goede 1.12.1-3 - Move mpg123 (and its manpage) to mpg123.bin and use alternatives, so as to peacefully co-exist with mpg321 (rf#1278) * Fri Jun 18 2010 Hans de Goede 1.12.1-2 - Add arts-devel BuildRequire and add the arts output plug-in to the mpg123-plugins-extras package * Mon Jun 14 2010 Hans de Goede 1.12.1-1 - Update to 1.12.1 - Put libmpg123 into its own package - Put some less often used output plugins into their own mpg123-plugins-extras package * Thu May 29 2008 Matthias Saou 1.4.2-2 - Don't remove plugins *.la files, as they're required to run. * Mon May 12 2008 Matthias Saou 1.4.2-1 - Update to 1.4.2. - Obolete mpg321 up to last known version, as it's pretty much dead. - Add libtool-ltdl-devel build req, without a copy is installed. - Add scriplets for new library. * Mon Jun 04 2007 Dag Wieers - 0.66-1 - Updated to release 0.66. * Wed Feb 07 2007 Dag Wieers - 0.65-1 - Updated to release 0.65. * Tue Jan 16 2007 Dag Wieers - 0.64-1 - Updated to release 0.64. * Mon Jan 15 2007 Dag Wieers - 0.63-1 - Updated to release 0.63. * Sun Oct 22 2006 Dag Wieers - 0.61-1 - Updated to release 0.61. * Mon Sep 4 2006 Matthias Saou 0.60-1 - Update to 0.60 final. - Add support for all available compatible outputs, unfortunately it's a build time choice, so default to alsa. - Obsolete mpg321 up to the last know package version. * Tue Jul 25 2006 Matthias Saou 0.60-0.1.beta2 - Initial RPM release, now that mpg123 is maintained again and went GPL/LGPL. - Audio output type is not (yet?) plugin-based, so use libao (for ALSA).