NAME="giflib"
DESC="Libraries for reading and writing GIFs"
VERSION="5.2.1"
FILES=("https://sourceforge.net/projects/giflib/files/giflib-$VERSION.tar.gz")
HASHES=("6f03aee4ebe54ac2cc1ab3e4b0a049e5")
DEPENDS=()

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

  make && make PREFIX=/usr DESTDIR="$ROOTDIR" install
  rm -fv "$ROOTDIR/usr/lib/libgif.a"

  find doc \( -name Makefile\* -o -name \*.1 \
         -o -name \*.xml \) -exec rm -v {} \;

  install -v -dm755 "$ROOTDIR/usr/share/doc/giflib-$VERSION"
  cp -v -R doc/* "$ROOTDIR/usr/share/doc/giflib-$VERSION"

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