NAME="xine-lib"
DESC="Libraries useful for interfacing with external plug-ins that allow the flow of information from the source to the audio and video hardware"
VERSION="1.2.13"
FILES=("https://downloads.sourceforge.net/xine/xine-lib-$VERSION.tar.xz")
HASHES=("9e1be39857b7a3cd7cc0f2b96331ff22")
DEPENDS=(
  "ffmpeg" "alsa-lib" "pulseaudio"
  "libdvdnav"
)

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

  ./configure --prefix=/usr          \
            --disable-vcd            \
            --with-external-dvdnav   \
            --docdir=/usr/share/doc/xine-lib-$VERSION
  doxygen doc/Doxyfile
  make && make DESTDIR="$ROOTDIR" install

  install -v -m755 -d "$ROOTDIR/usr/share/doc/xine-lib-$VERSION/api"
  install -v -m644    doc/api/* \
                    "$ROOTDIR/usr/share/doc/xine-lib-$VERSION/api"

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