updated on Thu Jan 26 16:09:46 UTC 2012
[aur-mirror.git] / morse-249-git / PKGBUILD
blob75b60f50bb570df3073ede80a3834d7211547216
1 pkgname=morse-249-git
2 pkgver=20101123
3 pkgrel=1
4 pkgdesc="A versatile simulator for generic mobile robots simulation based on Blender. Blender 2.49 branch."
5 arch=('i686' 'x86_64')
6 url="http://morse.openrobots.org/"
7 license=('custom')
8 depends=('blender<2.50' 'python2' 'python2-yarp')
9 provides=('morse')
10 makedepends=('git' 'cmake')
12 _gitroot="git://github.com/laas/morse.git"
13 _gitname="morse"
14 _gitbranch="BLENDER_249_STABLE"
16 build() {
17   cd "$srcdir"
18   msg "Connecting to GIT server...."
20   if [ -d $_gitname ] ; then
21     cd $_gitname && git pull origin $_gitbranch
22     msg "The local files are updated."
23   else
24     git clone $_gitroot $_gitname
25     cd $_gitname && git checkout -t origin/$_gitbranch
26   fi
28   cd ../
30   msg "GIT checkout done or server timeout"
31   msg "Starting make..."
33   msg "Start making..."
35   rm -fr build
36   mkdir build
37   cd build
39   cmake ../$_gitname -DPYTHON_EXECUTABLE=/usr/bin/python2 -DPYTHON_INCLUDE_DIR=/usr/include/python2.7/ -DPYTHON_LIBRARY=/usr/lib/libpython2.7.so -DCMAKE_BUILD_TYPE=Release -DBUILD_YARP2_SUPPORT=ON -DCMAKE_INSTALL_PREFIX=/usr
40   make
43 package() {
44   cd "$srcdir/build"
46   make DESTDIR="$pkgdir/" install
48   install -d "${pkgdir}/usr/share/morse"
50   mv "${pkgdir}/usr/bin/morse" "${pkgdir}/usr/bin/morse2"
51   echo "#!/bin/bash" > "${pkgdir}/usr/bin/morse"
52   echo "export PYTHONPATH=\$PYTHONPATH:/usr/lib/python2.7/site-packages/morse/blender" >> "${pkgdir}/usr/bin/morse"
53   echo "exec morse2" >> "${pkgdir}/usr/bin/morse"
54   chmod +x "${pkgdir}/usr/bin/morse"
56   install -d "${pkgdir}/usr/share/licenses/$pkgname"
57   install -m644 ../$_gitname/LICENSE "$pkgdir/usr/share/licenses/$pkgname/"