desktop/box2d/PKGBUILD
Adrián Chaves Fernández (Gallaecio) 08e7ab222e box2d: 2.3.1
2016-05-14 10:37:43 +02:00

45 lines
1.2 KiB
Bash

#
# Games Packages for Chakra, part of chakra-project.org
#
# Maintainer: Adrián Chaves Fernández (Gallaecio) <adriyetichaves@gmail.com>
# Contributor: Zie Evolution <zie.evolution@googlemail.com>
# Contributor: Sven-Hendrik Haase <sh@lutzhaase.com>
pkgname=box2d
pkgver=2.3.1
pkgrel=1
pkgdesc="2D rigid body simulation library for games"
url="http://www.box2d.org/"
license=('zlib')
arch=('i686' 'x86_64')
depends=('libgl')
makedepends=('cmake')
optdepends=()
source=(https://github.com/erincatto/Box2D/archive/v${pkgver}.tar.gz)
md5sums=('70e25df706e848dbe611ca5b5c07a4ae')
build() {
cd ${srcdir}/Box2D-${pkgver}/Box2D
cmake . \
-DBOX2D_INSTALL=ON \
-DBOX2D_BUILD_SHARED=ON \
-DBOX2D_BUILD_STATIC=ON \
-DBOX2D_BUILD_EXAMPLES=OFF \
-DCMAKE_INSTALL_PREFIX=/usr
make
}
package() {
cd ${srcdir}/Box2D-${pkgver}/Box2D
make DESTDIR=${pkgdir} install
mkdir -p ${pkgdir}/usr/share/doc/box2d/
cp -r Documentation/* ${pkgdir}/usr/share/doc/box2d/
find ${pkgdir}/usr/share/doc/box2d/ -type f | xargs chmod 644
find ${pkgdir}/usr/share/doc/box2d/ -type d | xargs chmod 755
install -Dm644 License.txt ${pkgdir}/usr/share/licenses/box2d/LICENSE
}