NAME="libusb"
DESC="Library used by some applications for USB device access"
VERSION="1.0.26"
FILES=("https://github.com/libusb/libusb/releases/download/v$VERSION/libusb-$VERSION.tar.bz2")
HASHES=("9c75660dfe1d659387c37b28c91e3160")
DEPENDS=()

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

  ./configure --prefix=/usr --disable-static
  make 

  pushd doc                
    doxygen -u doxygen.cfg
    make docs             
  popd

  make DESTDIR="$ROOTDIR" install
  install -v -d -m755 "$ROOTDIR/usr/share/doc/libusb-$VERSION/apidocs"
  install -v -m644    doc/api-1.0/* \
                    "$ROOTDIR/usr/share/doc/libusb-$VERSION/apidocs"

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