diff options
| author | Igor Gnatenko <ignatenko@redhat.com> | 2016-06-27 16:26:07 +0200 |
|---|---|---|
| committer | Igor Gnatenko <i.gnatenko.brain@gmail.com> | 2016-07-09 19:53:24 +0200 |
| commit | 2c1d777d9c3980dafb83ed8ba15dbc7615283486 (patch) | |
| tree | c35251e3eff187404efdf4de7b131fcd0697e47d | |
| parent | 7dd23679e90d7f96aa97fde4c9f1f982535fab3f (diff) | |
| download | mpg123-2c1d777d9c3980dafb83ed8ba15dbc7615283486.tar.gz mpg123-2c1d777d9c3980dafb83ed8ba15dbc7615283486.tar.xz mpg123-2c1d777d9c3980dafb83ed8ba15dbc7615283486.zip | |
Update to 1.23.4; fixes in packaging
Signed-off-by: Igor Gnatenko <ignatenko@redhat.com>
| -rw-r--r-- | .gitignore | 1 | ||||
| -rw-r--r-- | mpg123-1.22.2-apetag.patch | 60 | ||||
| -rw-r--r-- | mpg123.spec | 241 | ||||
| -rw-r--r-- | sources | 2 |
4 files changed, 109 insertions, 195 deletions
@@ -1 +1,2 @@ mpg123-1.22.4.tar.bz2 +/mpg123-1.23.4.tar.bz2 diff --git a/mpg123-1.22.2-apetag.patch b/mpg123-1.22.2-apetag.patch deleted file mode 100644 index 87e836d..0000000 --- a/mpg123-1.22.2-apetag.patch +++ /dev/null @@ -1,60 +0,0 @@ -diff -up mpg123-1.22.2/src/libmpg123/parse.c.apetag mpg123-1.22.2/src/libmpg123/parse.c ---- mpg123-1.22.2/src/libmpg123/parse.c.apetag 2015-05-24 14:50:24.000000000 +0200 -+++ mpg123-1.22.2/src/libmpg123/parse.c 2015-06-22 09:39:00.904835586 +0200 -@@ -1077,6 +1077,44 @@ static int handle_id3v2(mpg123_handle *f - return PARSE_AGAIN; - } - -+static int handle_apetag(mpg123_handle *fr, unsigned long newhead) -+{ -+ unsigned char apebuf[28]; -+ unsigned long val; -+ int i, ret; -+ -+ fr->oldhead = 0; -+ -+ /* Apetag headers are 32 bytes, newhead contains 4, read the rest */ -+ if((ret=fr->rd->fullread(fr,apebuf,28)) < 0) return ret; -+ -+ /* Apetags start with "APETAGEX", "APET" is already tested. */ -+ if(strncmp((char *)apebuf,"AGEX",4) != 0) -+ goto apetag_bad; -+ -+ /* Version must be 2.000 / 2000 */ -+ val = (apebuf[7]<<24)|(apebuf[6]<<16)|(apebuf[5]<<8)|apebuf[4]; -+ if(val != 2000) -+ goto apetag_bad; -+ -+ /* Last 8 bytes must be 0 */ -+ for(i=20; i<28; i++) -+ if(apebuf[i]) -+ goto apetag_bad; -+ -+ /* Looks good, skip the rest. */ -+ val = (apebuf[11]<<24)|(apebuf[10]<<16)|(apebuf[9]<<8)|apebuf[8]; -+ if((ret=fr->rd->skip_bytes(fr,val)) < 0) return ret; -+ -+ return PARSE_AGAIN; -+ -+apetag_bad: -+ if(fr->rd->back_bytes(fr,31) < 0 && NOQUIET) -+ error("Cannot seek 31 bytes back!"); -+ -+ return PARSE_AGAIN; /* Give the resync code a chance to fix things */ -+} -+ - /* Advance a byte in stream to get next possible header and forget - buffered data if possible (for feed reader). */ - #define FORGET_INTERVAL 1024 /* Used by callers to set forget flag each <n> bytes. */ -@@ -1202,6 +1240,11 @@ static int wetwork(mpg123_handle *fr, un - { - return handle_id3v2(fr, newhead); - } -+ /* Check for an apetag header */ -+ if(newhead == ('A'<<24)+('P'<<16)+('E'<<8)+'T') -+ { -+ return handle_apetag(fr, newhead); -+ } - else if(NOQUIET && fr->silent_resync == 0) - { - fprintf(stderr,"Note: Illegal Audio-MPEG-Header 0x%08lx at offset %"OFF_P".\n", 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@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@gmail.com> - 1.22.4-1 - New upstream release 1.22.4 (rf3802) @@ -1 +1 @@ -2dfafae3bbc532b4c8b04a77c6a6de89 mpg123-1.22.4.tar.bz2 +dea9e3a815d127d04ebe9f6b80f229ce mpg123-1.23.4.tar.bz2 |
