mirror of
https://gitdl.cn/https://github.com/chakralinux/desktop.git
synced 2025-01-24 10:32:13 +08:00
47 lines
1.3 KiB
Bash
47 lines
1.3 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.2.1
|
|
pkgrel=1
|
|
pkgdesc="2D rigid body simulation library for games"
|
|
url="http://www.box2d.org/"
|
|
license=('zlib')
|
|
arch=('i686' 'x86_64')
|
|
#depends=('freeglut')
|
|
makedepends=('cmake')
|
|
optdepends=()
|
|
source=(http://box2d.googlecode.com/files/Box2D_v${pkgver}.zip)
|
|
md5sums=('9e9d32a34fb5554c47f0f9cade0fa611')
|
|
|
|
build() {
|
|
cd ${srcdir}/Box2D_v${pkgver}
|
|
|
|
msg "Starting build"
|
|
[[ -d build ]] && rm -r build
|
|
mkdir build && cd build
|
|
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_v${pkgver}/build
|
|
|
|
make DESTDIR=${pkgdir} install
|
|
|
|
mkdir -p ${pkgdir}/usr/share/doc/box2d/
|
|
cp -r ${srcdir}/Box2D_v${pkgver}/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 ${srcdir}/Box2D_v${pkgver}/License.txt ${pkgdir}/usr/share/licenses/box2d/LICENSE
|
|
} |