summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorBenjamin Chrétien2015-01-20 15:16:06 +0100
committerBenjamin Chrétien2015-01-20 15:16:06 +0100
commit9988c27ec0dbad7e0d5942a6c779043ba7df18ba (patch)
tree2653d418ef8898c3813c71db0b07c5fc61a70c04 /PKGBUILD
downloadaur-9988c27ec0dbad7e0d5942a6c779043ba7df18ba.tar.gz
Ipopt + RobOptim update.
Diffstat (limited to 'PKGBUILD')
-rwxr-xr-xPKGBUILD74
1 files changed, 74 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100755
index 000000000000..32d974b916e6
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,74 @@
+# Maintainer: Benjamin Chretien <chretien at lirmm dot fr>
+pkgname=roboptim-core-plugin-nlopt-git
+pkgver=0.1.r0.g0956b6e
+pkgrel=1
+pkgdesc="NLopt interface for RobOptim Core."
+arch=('i686' 'x86_64')
+url="http://roboptim.net/"
+license=('(L)GPL2')
+depends=('eigen3' 'boost>=1.41' 'libltdl' 'log4cxx>=0.10' 'roboptim-core-git' 'nlopt')
+optdepends=()
+makedepends=('git' 'cmake' 'doxygen')
+
+# Repository location
+_gitroot="git://github.com/roboptim/roboptim-core-plugin-nlopt"
+_gitname="roboptim-core-plugin-nlopt"
+
+source=("${_gitname}"::${_gitroot})
+md5sums=('SKIP')
+
+# Build type
+_buildtype="RelWithDebInfo"
+
+# Build directory
+_builddir="${_gitname}-build"
+
+pkgver() {
+ cd "$srcdir/${_gitname}"
+ # Use the tag of the last commit
+ git describe --long | 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" \
+ "${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
+}