APP=physfs
VERSION=3.0.2
BUILD=1sml
HOMEPAGE='http://icculus.org/physfs/'
DOWNLOAD='https://icculus.org/physfs/downloads/physfs-3.0.2.tar.bz2'
DESC="library to provide abstract access to various archives"
REQUIRES="zlib"

build() {
  mkandenterbuilddir
  rm -rf $APP-$VERSION

  tar xf $SRCDIR/$APP-$VERSION.tar.?z*
  cd $APP-$VERSION
  fixbuilddirpermissions

  mkdir -p smbuild && cd smbuild
  cmake .. \
    -DPHYSFS_BUILD_SHARED=ON \
    -DPHYSFS_BUILD_STATIC=OFF \
    -DPHYSFS_BUILD_TEST=OFF \
    -DCMAKE_BUILD_TYPE=Release \
    -DCMAKE_INSTALL_PREFIX=""

  make
  make install DESTDIR=$PKG

  cp ../LICENSE.txt $PKGDOCS/

  mkfinalpkg
}

SHA512SUMS="
2d407f3145dde9b8be86a88e1a22286c8663cc929a22155b9e4d4db9127addb4d0b963878e4d695861bf04cef872ef1decbbfb619c3546c486da3af2e908e0ff  physfs-3.0.2.tar.lz
"
