summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: ea6cd91031d3702570b16d463f2c0fc07a3f27d3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
# Maintainer: Jonas 'cherti' Große Sundrup <aur@letopolis.de>

pkgname=rbdl
_pkgname=rbdl-orb
pkgrel=2
pkgver=3.1.3
pkgdesc="RBDL - Rigid Body Dynamics Library"
url="https://github.com/ORB-HD/rbdl-orb"
arch=('x86_64')
license=('ZLIB')
makedepends=('cmake' 'git')
depends=('lua51' 'unittestpp' 'eigen')
provides=('rbdl')
conflicts=('rbdl-hg')
_giturl='https://github.com/ORB-HD/rbdl-orb.git'

build() {
	# We require the repository including submodules.
	# The git-release-tooling unfortunately does not include them, and as a
	# consequence GitHub-releases do not either. So we manually checkout the
	# version we want.
    git clone --recursive $_giturl $pkgname-$pkgver
    cd $pkgname-$pkgver
	git checkout v$pkgver

    mkdir -p build
    cd build

    cmake .. -DCMAKE_INSTALL_PREFIX=/usr \
                      -DCMAKE_BUILD_TYPE=Release \
                      -DLUA_INCLUDE_DIR=/usr/include/lua5.1 \
                      ${_lua_param} ${_unittestpp_param} ${_rosurdf_param} \
                      -DRBDL_BUILD_ADDON_LUAMODEL=ON \
                      -DRBDL_BUILD_ADDON_URDFREADER=ON \
                      -DRBDL_BUILD_PYTHON_WRAPPER=ON

    make
}

package() {
	cd $srcdir/$pkgname-$pkgver
	install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"

	cd build
	make DESTDIR="${pkgdir}" install

	cd python
	python setup.py install --root="$pkgdir/" --optimize=1 --skip-build
}