mpg123 rpm etc‎ > ‎

mpg123-1.9.1

mpg123 is a console MPEG audio player, a really fast highly optimized player for your mp3 files.
Here is my humble experience in building it on Fedora 10. (Here are my other records.)

One would like to have the rpm environment set up correctly to run rpmbuild successfully, for example:

[mpg@ex ~]$ cat .rpmmacros
%packager            Michael Roy <mclroy@gmail.com>

%_topdir                /home/mpg

%_rpmtopdir          %{_topdir}/rpm
%_builddir             %{_rpmtopdir}/BUILD
%_rpmdir               %{_rpmtopdir}/RPMS
%_sourcedir          %{_rpmtopdir}/SOURCES
%_specdir             %{_rpmtopdir}/SPECS
%_srcrpmdir          %{_rpmtopdir}/SRPMS
%_tmppath            %{_rpmtopdir}/TMP
[mpg@ex ~]$

and perhaps this one:

[mpg@ex ~]$ cat .rpmrc
optflags: i686 -O2 -g -m32 -mtune=core2
[mpg@ex ~]$

Download the player from mpg123.org:

[mpg@ex ~]$ cd rpm/SOURCES/
[mpg@ex SOURCES]$ vi lnks
[mpg@ex SOURCES]$ wget -i lnks
--2009-10-15 08:37:00--  http://mpg123.org/download/mpg123-1.9.1.tar.bz2.sig
...
2009-10-15 08:37:02 (2.95 MB/s) - `mpg123-1.9.1.tar.bz2.sig' saved [72/72]

--2009-10-15 08:37:02--  http://mpg123.org/download/mpg123-1.9.1.tar.bz2
...
2009-10-15 08:37:18 (46.0 KB/s) - `mpg123-1.9.1.tar.bz2' saved [736625/736625]

Verify the download:

[mpg@ex SOURCES]$ gpg --verify mpg123-1.9.1.tar.bz2.sig
gpg: Signature made Fri 09 Oct 2009 02:59:45 AM MSD using DSA key ID D446D524
gpg: Good signature from "Thomas Orgis <thomas@orgis.org>"
gpg:                 aka "Thomas Orgis <thomas-forum@orgis.org>"
gpg:                 aka "Thomas Orgis <thomas-handel@orgis.org>"
gpg:                 aka "Thomas Orgis <thorgis@rz.uni-potsdam.de>"
gpg:                 aka "Thomas Orgis (Sobukus) <thomas-ebay@orgis.net>"
gpg:                 aka "Thomas Orgis (Sobukus) <thomas-ebay@orgis.org>"
gpg: WARNING: This key is not certified with a trusted signature!
gpg:          There is no indication that the signature belongs to the owner.
Primary key fingerprint: 7236 3885 A742 B736 E0C8  9721 9B4C 52BC D446 D524
[mpg@ex SOURCES]$
[mpg@ex SOURCES]$ ls -al mpg123-1.9.1.tar.bz2*
-rw-rw-r-- 1 mpg mpg 736625 2009-10-09 03:03 mpg123-1.9.1.tar.bz2
-rw-rw-r-- 1 mpg mpg     72 2009-10-09 03:03 mpg123-1.9.1.tar.bz2.sig
[mpg@ex SOURCES]$

Then simply build it right from the tarball:

[mpg@ex SOURCES]$ rpmbuild -tb --target i686-linux mpg123-1.9.1.tar.bz2 > log.1.9.1 2>&1
[mpg@ex SOURCES]$ tail log.1.9.1
Requires: libmpg123.so.0
Checking for unpackaged file(s): /usr/lib/rpm/check-files /home/mpg/BUILDROOT/mpg123-1.9.1-1.i386
Wrote: /home/mpg/rpm/RPMS/i686/mpg123-1.9.1-1.i686.rpm
Wrote: /home/mpg/rpm/RPMS/i686/mpg123-devel-1.9.1-1.i686.rpm
Executing(%clean): /bin/sh -e /home/mpg/rpm/TMP/rpm-tmp.vXY5Dt
+ umask 022
+ cd /home/mpg/rpm/BUILD
+ cd mpg123-1.9.1
+ /bin/rm -rf /home/mpg/BUILDROOT/mpg123-1.9.1-1.i386
+ exit 0
[mpg@ex SOURCES]$

Then install or update it:

[root@ex ~]# rpm -Uhv /home/mpg/rpm/RPMS/i686/mpg123-1.9.1-1.i686.rpm
Preparing...                ########################################### [100%]
   1:mpg123                 ########################################### [100%]
[root@ex ~]#
[root@ex ~]# rpm -qa | grep mpg123
mpg123-1.9.1-1.i686
[root@ex ~]#

Btw, mpg123 supports all major audio interfaces (among others):

[mike@ex ~]$ mpg123 --list-modules

Available modules
-----------------
dummy          output  Dummy audio output - does not output audio.
alsa           output  Output audio using Advanced Linux Sound Architecture (ALSA).
pulse          output  Output audio using PulseAudio Server
oss            output  Output audio using OSS
jack           output  Output audio using JACK (JACK Audio Connection Kit).
[mike@ex ~]$

And enjoy your sounds:

[mike@ex ~]$ mpg123 -C -o pulse what.mp3


2009.10.15    Michael    mclroy@gmail.com