NAME="libcddb"
DESC="Library that implements the different protocols to access data on a CDDB server"
VERSION="1.3.2"
FILES=("https://downloads.sourceforge.net/libcddb/libcddb-$VERSION.tar.bz2")
HASHES=("8bb4a6f542197e8e9648ae597cd6bc8a")
DEPENDS=()

PACKAGE() {
  tar xf $NAME-$VERSION.tar.bz2
  cd $NAME-$VERSION

  sed -e '/DEFAULT_SERVER/s/freedb.org/gnudb.gnudb.org/' \
    -e '/DEFAULT_PORT/s/888/&0/'                         \
    -i include/cddb/cddb_ni.h
  sed '/^Genre:/s/Trip-Hop/Electronic/' -i tests/testdata/920ef00b.txt
  sed '/DISCID/i# Revision: 42'         -i tests/testcache/misc/12340000

  ./configure --prefix=/usr --disable-static
  make && make DESTDIR="$ROOTDIR" install

  cd .. && rm -r $NAME-$VERSION
}
