Lame

From ConShell
Jump to navigation Jump to search

Lame Ain't an MP3 Encoder is an open source MP3 encoding library. It is used by many other open source projects that deal with audio including ffmedia.

Building Lame as an RPM

This procedure was developed on a CentOS version 4.2 box. The

The lame source tarball available at Source Forge has a spec file in it. However, it was designed for RPM version 3 and a machine where the gcc rpm was called gcc3. Therefore we patch the spec file.

Prerequisites

The latest lame tarball. As of this writing it is lame 3.97. I've submitted my patch to the lame team so you might not need to patch lame before doing this. We also assume that your user has write access to /usr/local/src.

Procedure

1 cd /usr/local/src

2 Downlaod latest lame tarball

3 Save the following patch file as lame.spec.patch

--- lame.spec   2006-09-24 09:55:34.000000000 -0400
+++ lame.spec.zippy     2006-10-07 07:44:13.000000000 -0400
@@ -17,7 +17,7 @@
 Source: ftp://lame.sourceforge.net/pub/lame/src/%{name}-%{version}.tar.bz2
 BuildRoot: %{_tmppath}/%{name}-root
 Requires: ncurses >= 5.0
-BuildRequires: gcc3 = 3.0.1, /usr/bin/find, ncurses-devel
+BuildRequires: gcc, /usr/bin/find, ncurses-devel
 Provides: mp3encoder

 %description
@@ -71,7 +71,7 @@
        --enable-brhist \
        --disable-debug

-make CC="gcc3" CFLAGS="${CC_OPTS}" test
+make CC="gcc" CFLAGS="${CC_OPTS}" test

 %install
 rm -rf %{buildroot}
@@ -98,7 +98,10 @@
 %doc doc/html
 %{_bindir}/lame
 %{_libdir}/libmp3lame.so.*
+%{_mandir}/man/lame.1*
 %{_mandir}/man1/lame.1*
+%{_datadir}/doc/lame/html/lame.css
+%{_datadir}/doc/lame/html/*.html

 %files devel
 %defattr (-, root, root)

4 tar -xzvvf lame-3.97.tar.gz

5 patch lame-3.97/lame.spec < lame.spec.patch

6 tar -czvvf lame-3.97.tar.gz lame-3.97

7 rpmbuild --target=i686 --tb lame-3.97.tar.gz

That should be it.