Skip to content

Instantly share code, notes, and snippets.

@mewmew
Created January 21, 2018 17:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mewmew/c906bcab908718ef242abc3bb0031b9c to your computer and use it in GitHub Desktop.
Save mewmew/c906bcab908718ef242abc3bb0031b9c to your computer and use it in GitHub Desktop.
AUR PKGBUILD for PhysicsFS with MPQ files support.
pkgname=physfs-git
pkgver=12
pkgrel=1
pkgdesc="A library to provide abstract access to various archives"
arch=('x86_64')
url="https://github.com/dgengin/physfs"
license=('ZLIB')
depends=('zlib')
makedepends=('git' 'cmake' 'doxygen')
provides=("physfs")
conflicts=("physfs")
source=("git://github.com/dgengin/physfs.git")
sha1sums=('SKIP')
_pkgname=physfs
pkgver() {
cd ${srcdir}/${_pkgname}
git rev-list --count HEAD
}
build() {
cd "$srcdir/${_pkgname}"
mkdir -p build
cd build
cmake ../ -DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=/usr \
-DPHYSFS_BUILD_TEST=OFF
make all docs
}
package() {
cd "$srcdir/${_pkgname}"
cd build
make DESTDIR="${pkgdir}" install
install -d "${pkgdir}"/usr/share/{doc/physfs,man/man3}
install -m644 docs/html/* "${pkgdir}/usr/share/doc/physfs"
install -m644 docs/man/man3/* "${pkgdir}/usr/share/man/man3"
for i in author Deinit description extension Free Init major Malloc minor opaque patch Realloc remove url ; do
mv "${pkgdir}/usr/share/man/man3/$i.3" "${pkgdir}/usr/share/man/man3/PHYSFS_$i.3"
done
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment