Linux HOWTOs

About | Home | Search


HOWTO: libcddb
Description: C library to access data on a CDDB server
Click here for ChangeLog
NOTE: I use GNU tar >= 1.13.25 so it's -j for .tar.bz2 files,
it's safe to assume that make, gcc, binutils, fileutils/coreutils, gawk, sed, and grep are prerequisites for almost everything


# libcddb 1.3.0
# =============
# Prerequisites:
# pkg-config
# libcdio >= 0.67 (optional)
# iconv

# libcdio can use libcddb and libcddb can use libcdio.  You may want to
# build this one, build that one, then build this one (or vice versa) to
# make sure everything is built in that can be.

cd
test -f installed/libcddb-1.3.0.tar.bz2 && mv installed/libcddb-1.3.0.tar.bz2 .
test ! -f libcddb-1.3.0.tar.bz2 &&
 wget http://downloads.sf.net/libcddb/libcddb-1.3.0.tar.bz2
mkdir -p -m 0700 src
cd src
find -maxdepth 1 -type d -name "libcddb-*" -exec rm -r {} \;
tar xjvf ~/libcddb-1.3.0.tar.bz2
cd libcddb-1.3.0
test $UID = 0 && chown -R root:root .
./configure

## If make fails with an error like this:
# ../lib/.libs/libcddb.so: undefined reference to `libiconv_open'
# ../lib/.libs/libcddb.so: undefined reference to `libiconv_close'
# ../lib/.libs/libcddb.so: undefined reference to `libiconv'
## re-run it like this:
# make LIBS=-liconv

make

# Become root to install it
su

rm -f /usr/local/lib/libcddb.*
make install
ldconfig

# Make sure your non-root user can remove the source later
chown -R $USER .
chmod -R u+w .

# Become yourself again
exit

cd
mkdir -p -m 0700 installed
rm -f installed/libcddb-*.tar.*
mv libcddb-1.3.0.tar.bz2 installed/


# If you ever want to uninstall libcddb, this should do it:
cd
su
test -d src/libcddb-* && ( cd src/libcddb-* ; make uninstall )
test -d /usr/local/include/cddb && rm -r /usr/local/include/cddb
rm -f /usr/local/bin/cddb_query /usr/local/lib/libcddb.* \
 /usr/local/lib/pkgconfig/libcddb.pc
ldconfig
exit
find ~/src -maxdepth 1 -type d -name "libcddb-*" -exec rm -r {} \;
rm -f ~/installed/libcddb-*.tar.*

Back to the list


Last updated: Tue, 07 Aug 2018 12:06:17 -0400
Jason Englander <jason at englanders dot us>