blob: c635bb7a3933781da424e5152115551d3d5633fb (
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
|
# Maintainer: Benjamin Chretien <chretien at lirmm dot fr>
pkgname=roboptim-core-git
pkgver=3.2.r20.g8efb578
pkgrel=1
pkgdesc="Numerical Optimization for Robotics"
arch=('i686' 'x86_64')
url="http://roboptim.net/"
license=('(L)GPL2')
depends=('eigen3' 'boost>=1.41' 'libltdl' 'log4cxx>=0.10')
optdepends=()
makedepends=('git' 'cmake' 'doxygen')
provides=('roboptim-core')
conflicts=('roboptim-core')
# Repository location
_gitroot="git+https://github.com/roboptim/roboptim-core.git#branch=master"
_gitname="roboptim-core"
source=("${_gitname}"::${_gitroot})
md5sums=('SKIP')
# Build type
_buildtype="Release"
# Build directory
_builddir="${_gitname}-build"
pkgver() {
cd "$srcdir/${_gitname}"
# Use the tag of the last commit
git describe --long --tags | sed -E 's/([^-]*-g)/r\1/;s/-/./g;s/^v([0-9])/\1/'
}
# Build the project
build() {
msg "Updating Git submodules"
cd "${srcdir}/${_gitname}"
git submodule init
git submodule update
msg "Starting CMake (build type = ${_buildtype})"
# Create a build directory
cd "${srcdir}"
mkdir -p ${_builddir}
cd "${_builddir}"
# Run CMake in release
cmake -DCMAKE_BUILD_TYPE="${_buildtype}" \
-DCMAKE_INSTALL_PREFIX="/usr" \
-DSTORAGE_ORDER="ColMajor" \
-DCMAKE_INSTALL_LIBDIR="lib" \
"${srcdir}/${_gitname}"
# Compile the library
msg "Building the project"
make --silent
# Create the documentation
msg "Creating the documentation"
make --silent doc
}
# Run unit tests
check() {
msg "Running unit tests"
cd "${srcdir}/${_builddir}"
make test
}
# Create the package
package() {
cd "${srcdir}/${_builddir}"
msg "Installing files"
make --silent DESTDIR="${pkgdir}/" install
}
|