mpg123 rpm etc‎ > ‎

mpg123-1.12.3 (F12 & Atom)

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 12 and Atom. (Here are my other records.)

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

[mike@ao ~]$ cat .rpmmacros
%packager    Michael Roy <mclroy@gmail.com>
%_topdir    /home/mike
%_rpmtopdir    %{_topdir}/rpm
%_builddir    %{_rpmtopdir}/BUILD
%_rpmdir    %{_rpmtopdir}/RPMS
%_sourcedir    %{_rpmtopdir}/SOURCES
%_specdir    %{_rpmtopdir}/SPECS
%_srcrpmdir    %{_rpmtopdir}/SRPMS
%_tmppath    %{_rpmtopdir}/TMP
[mike@ao ~]$

and perhaps this one:

[mike@ao ~]$ cat .rpmrc
optflags: i686 -O2 -g -m32 -march=atom -mtune=atom
[mike@ao ~]$

Download the player from mpg123.org:

[mike@ao ~]$ cd rpm/SOURCES/
[mike@ao SOURCES]$ vi lnks
[mike@ao SOURCES]$ wget -i lnks
--2010-07-12 02:46:08--  http://mpg123.org/download/mpg123-1.12.3.tar.bz2.sig
...
2010-07-12 02:46:08 (1.61 MB/s) - “mpg123-1.12.3.tar.bz2.sig” saved [72/72]

--2010-07-12 02:46:08--  http://mpg123.org/download/mpg123-1.12.3.tar.bz2
...
2010-07-12 02:46:09 (1.10 MB/s) - “mpg123-1.12.3.tar.bz2” saved [809725/809725]
[mike@ao SOURCES]$

Verify the download:

[mike@ao SOURCES]$ gpg --verify mpg123-1.12.3.tar.bz2.sig
gpg: Signature made Mon 05 Jul 2010 02:18:03 AM MSD using DSA key ID D446D524
gpg: Good signature from "Thomas Orgis <thomas@orgis.org>"
gpg:                 aka "Thomas Orgis (Sobukus) <thomas-ebay@orgis.net>"
gpg:                 aka "Thomas Orgis <thorgis@rz.uni-potsdam.de>"
gpg:                 aka "Thomas Orgis (Sobukus) <thomas-ebay@orgis.org>"
gpg:                 aka "Thomas Orgis <thomas-handel@orgis.org>"
gpg:                 aka "Thomas Orgis <thomas-forum@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
[mike@ao SOURCES]$

[mike@ao SOURCES]$ ls -al mpg123-1.12.3.*
-rw-rw-r--. 1 mike mike 809725 2010-07-05 02:26 mpg123-1.12.3.tar.bz2
-rw-rw-r--. 1 mike mike     72 2010-07-05 02:26 mpg123-1.12.3.tar.bz2.sig
[mike@ao SOURCES]$

To be able to build the mpg123 package one would like to have other packages installed, for example:

[root@ao ~]# yum install libtool-ltdl-devel pulseaudio-libs-devel alsa-lib-devel

Then simply build it right from the tarball:

[mike@ao SOURCES]$ time rpmbuild -tb --target i686-linux mpg123-1.12.3.tar.bz2 > log.1.12.3 2>&1

real    2m25.511s
user    2m3.528s
sys    0m21.342s
[mike@ao SOURCES]$

[mike@ao SOURCES]$ tail log.1.12.3
Requires: /usr/bin/pkg-config libmpg123.so.0
Checking for unpackaged file(s): /usr/lib/rpm/check-files /home/mike/BUILDROOT/mpg123-1.12.3-1.i386
Wrote: /home/mike/rpm/RPMS/i686/mpg123-1.12.3-1.i686.rpm
Wrote: /home/mike/rpm/RPMS/i686/mpg123-devel-1.12.3-1.i686.rpm
Executing(%clean): /bin/sh -e /home/mike/rpm/TMP/rpm-tmp.ophIxp
+ umask 022
+ cd /home/mike/rpm/BUILD
+ cd mpg123-1.12.3
+ /bin/rm -rf /home/mike/BUILDROOT/mpg123-1.12.3-1.i386
+ exit 0
[mike@ao SOURCES]$

Then install or update it:

[root@ao ~]# rpm -ihv /home/mike/rpm/RPMS/i686/mpg123-1.12.3-1.i686.rpm
Preparing...                ########################################### [100%]
   1:mpg123                 ########################################### [100%]
[root@ao ~]#
[root@ao ~]# rpm -qa | grep mpg123
mpg123-1.12.3-1.i686
[root@ao ~]#

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

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

Available modules
-----------------
sdl            output  Output audio using SDL (Simple DirectMedia Layer).
jack           output  Output audio using JACK (JACK Audio Connection Kit).
pulse          output  Output audio using PulseAudio Server
dummy          output  Dummy audio output - does not output audio.
arts           output  Output audio using aRts Sound Daemon
alsa           output  Output audio using Advanced Linux Sound Architecture (ALSA).
oss            output  Output audio using OSS
[mike@ao ~]$

Finally, enjoy your sounds:

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

2010.07.12    Michael    mclroy@gmail.com