summaryrefslogtreecommitdiff
path: root/community/bullet/PKGBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'community/bullet/PKGBUILD')
-rw-r--r--community/bullet/PKGBUILD72
1 files changed, 72 insertions, 0 deletions
diff --git a/community/bullet/PKGBUILD b/community/bullet/PKGBUILD
new file mode 100644
index 000000000..c5fbddfba
--- /dev/null
+++ b/community/bullet/PKGBUILD
@@ -0,0 +1,72 @@
+# $Id: PKGBUILD 36776 2011-01-07 21:59:47Z svenstaro $
+# Maintainer: Sven-Hendrik Haase <sh@lutzhaase.com>
+# Contributor: Christoph Zeiler <archNOSPAM_at_moonblade.dot.org>
+
+pkgbase=bullet
+pkgname=('bullet' 'bullet-docs')
+pkgver=2.77
+pkgrel=3
+pkgdesc="A 3D Collision Detection and Rigid Body Dynamics Library for games and animation"
+arch=('i686' 'x86_64')
+url="http://www.bulletphysics.com/Bullet/"
+license=('custom:zlib')
+depends=('freeglut')
+makedepends=('cmake' 'doxygen' 'graphviz' 'ttf-dejavu')
+source=(http://bullet.googlecode.com/files/${pkgbase}-${pkgver}.tgz \
+ ${pkgbase}.pc)
+md5sums=('2f5074a1a29b618c672f1da4748e374b'
+ 'd1da06deba3b08b884d2212f6838905c')
+
+build() {
+ cd ${pkgbase}-${pkgver}
+
+ # get a clean build dir
+ [[ -d build ]] && rm -rf build
+ mkdir build && cd build
+
+ # generate CMake Makefile
+ cmake .. \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DBUILD_SHARED_LIBS=1 \
+ -DBUILD_DEMOS=0 \
+ -DBUILD_EXTRAS=1 \
+ -DINSTALL_LIBS=1 \
+ -DINSTALL_EXTRA_LIBS=1 \
+ -DCMAKE_BUILD_TYPE=Release # set =Debug for debugging version
+
+ # compile
+ make
+
+ # generate docs
+ cd ..
+ sed -i 's/GENERATE_HTMLHELP.*//g' Doxyfile
+ doxygen
+}
+
+package_bullet() {
+ optdepends=('bullet-docs: documentation')
+
+ cd ${pkgbase}-${pkgver}/build
+
+ # install it
+ make DESTDIR=${pkgdir} install
+
+ # manually handle pkgconfig file
+ mkdir -p "${pkgdir}"/usr/lib/pkgconfig
+ sed "s|VERSION|${pkgver}|g" ${srcdir}/bullet.pc > ${pkgdir}/usr/lib/pkgconfig/bullet.pc
+
+ # install license
+ install -Dm644 ../BulletLicense.txt ${pkgdir}/usr/share/licenses/${pkgbase}/LICENSE
+}
+
+package_bullet-docs() {
+ pkgdesc="Documentation for bullet"
+ depends=()
+
+ cd ${pkgbase}-${pkgver}
+
+ # install docs
+ install -Dm644 Bullet_User_Manual.pdf ${pkgdir}/usr/share/doc/bullet/Bullet_User_Manual.pdf
+ cp -r html ${pkgdir}/usr/share/doc/bullet/html
+}
+# vim: sw=2 ts=2 et: