summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorBenjamin Chr├ętien2013-03-22 13:16:07 +0900
committerBenjamin Chr├ętien2013-03-22 13:16:07 +0900
commitba9c1c5272b63ac92c27a4310e81eedf5106c3cf (patch)
tree4f0ec2cca42e378a2b64add635289f4c8c7b4c2b
downloadaur-ba9c1c5272b63ac92c27a4310e81eedf5106c3cf.tar.gz
Add roboptim-trajectory-git
-rw-r--r--.SRCINFO21
-rwxr-xr-xPKGBUILD88
2 files changed, 109 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..caaba65bb9a
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,21 @@
+pkgbase = roboptim-trajectory-git
+ pkgdesc = Trajectory optimization for robotics
+ pkgver = 20130322
+ pkgrel = 1
+ url = http://roboptim.net/
+ arch = i686
+ arch = x86_64
+ license = (L)GPL2
+ makedepends = git
+ makedepends = cmake
+ depends = roboptim-core-git
+ depends = roboptim-core-plugin-ipopt-git
+ depends = boost>=1.41
+ depends = doxygen
+ depends = pkg-config
+ depends = libltdl
+ provides = roboptim-trajectory
+ conflicts = roboptim-trajectory
+
+pkgname = roboptim-trajectory-git
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100755
index 00000000000..760da5d032e
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,88 @@
+# Maintainer: Benjamin Chretien <chretien@lirmm.fr>
+# Contributor: Thomas Moulard <thomas.moulard@gmail.com>
+
+pkgname=roboptim-trajectory-git
+pkgver=20130322
+pkgrel=1
+pkgdesc="Trajectory optimization for robotics"
+arch=('i686' 'x86_64')
+url="http://roboptim.net/"
+license=('(L)GPL2')
+depends=('roboptim-core-git' 'roboptim-core-plugin-ipopt-git' 'boost>=1.41'
+ 'doxygen' 'pkg-config' 'libltdl')
+makedepends=('git' 'cmake')
+provides=('roboptim-trajectory')
+conflicts=('roboptim-trajectory')
+optdepends=()
+
+# Repository location
+_gitroot="git://github.com/roboptim/roboptim-trajectory.git"
+_gitname="roboptim-trajectory"
+
+# Build type
+_buildtype="RELWITHDEBINFO"
+
+# Build directory
+_builddir="${srcdir}/${_gitname}-${pkgver}-build"
+
+# Build the project
+build() {
+ msg "Connecting to Git server..."
+
+ if [ -d ${srcdir}/${_gitname} ] ; then
+ # Update local files (including submodules)
+ cd ${srcdir}/${_gitname} && git pull origin && git submodule update || return 1
+ msg "The local files are updated."
+ else
+ # Clone repository and submodules
+ git clone --recursive ${_gitroot} ${srcdir}/${_gitname} || return 1
+ fi
+
+ msg "Git checkout done or server timeout"
+
+ cd "${srcdir}/${_gitname}" || return 1
+
+ msg "Starting CMake (build type = ${_buildtype})..."
+
+ # Create a build directory
+ if [ -d ${_builddir} ]
+ then
+ cd ${_builddir}
+ else
+ mkdir ${_builddir}
+ cd ${_builddir}
+ fi
+
+ # Run CMake in release
+ cmake -DCMAKE_BUILD_TYPE="${_buildtype}" \
+ -DCMAKE_INSTALL_PREFIX="/usr" \
+ -DIPOPT_SOLVER=1 \
+ "${srcdir}/${_gitname}"
+
+ # Compile the library
+ msg "Building the project..."
+ make --silent || return 1
+
+ # Create the documentation
+ msg "Creating the documentation..."
+ make --silent doc || return 1
+}
+
+# Run unit tests
+check() {
+ msg "Running unit tests..."
+ cd "${srcdir}/${_gitname}-${pkgver}-build"
+
+ # Need to update LD_LIBRARY_PATH else tests fail
+ export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${_builddir}/src"
+ make test || return 1
+}
+
+# Create the package
+package() {
+ # Install in /opt/roboptim
+ cd "${srcdir}/${_gitname}-${pkgver}-build"
+
+ msg "Installing files..."
+ make --silent DESTDIR="${pkgdir}/" install || return 1
+}