diff options
author | Benjamin Chrétien | 2013-11-25 13:29:49 +0100 |
---|---|---|
committer | Benjamin Chrétien | 2013-11-25 13:29:49 +0100 |
commit | 4f3be0935a32030fd4e73c430c81ce08b85f83b1 (patch) | |
tree | 794f6fd25a8311c668b8d55d3c685713938f6ca5 /PKGBUILD | |
parent | f393a686e7949ea232f3dcaf4269afe634a9116b (diff) | |
download | aur-4f3be0935a32030fd4e73c430c81ce08b85f83b1.tar.gz |
Update roboptim-core-git PKGBUILD.
Diffstat (limited to 'PKGBUILD')
-rwxr-xr-x | PKGBUILD | 57 |
1 files changed, 26 insertions, 31 deletions
@@ -1,15 +1,15 @@ # Maintainer: Benjamin Chretien <chretien@lirmm.fr> # Contributor: Thomas Moulard <thomas.moulard@gmail.com> pkgname=roboptim-core-git -pkgver=20130314 +pkgver=2.0.r207.g8ed946d pkgrel=1 pkgdesc="Numerical Optimization for Robotics" arch=('i686' 'x86_64') url="http://roboptim.net/" license=('(L)GPL2') -depends=('eigen3>=3' 'boost>=1.41' 'doxygen' 'libltdl' 'log4cxx') +depends=('eigen3' 'boost>=1.41' 'libltdl' 'log4cxx>=0.10') optdepends=() -makedepends=('git' 'cmake') +makedepends=('git' 'cmake>=2.8' 'doxygen') provides=('roboptim-core') conflicts=('roboptim-core') @@ -17,42 +17,38 @@ conflicts=('roboptim-core') _gitroot="git://github.com/roboptim/roboptim-core.git" _gitname="roboptim-core" +source=("${_gitname}"::${_gitroot}) +md5sums=('SKIP') + # Build type _buildtype="RELWITHDEBINFO" # Build directory -_builddir="${srcdir}/${_gitname}-${pkgver}-build" +_builddir="${_gitname}-build" # Doxytag file to correct _doxytag="usr/share/doc/roboptim-core/doxygen-html/roboptim-core.doxytag" +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 "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" + msg "Updating Git submodules" - cd "${srcdir}/${_gitname}" || return 1 + cd "${srcdir}/${_gitname}" + git submodule init + git submodule update msg "Starting CMake (build type = ${_buildtype})" # Create a build directory - if [ -d ${_builddir} ] - then - cd ${_builddir} - else - mkdir ${_builddir} - cd ${_builddir} - fi + cd "${srcdir}" + mkdir -p ${_builddir} + cd "${_builddir}" # Run CMake in release cmake -DCMAKE_BUILD_TYPE="${_buildtype}" \ @@ -61,27 +57,26 @@ build() { # Compile the library msg "Building the project" - make --silent || return 1 + make --silent # Create the documentation msg "Creating the documentation" - make --silent doc || return 1 + make --silent doc } # Run unit tests check() { msg "Running unit tests" - cd "${srcdir}/${_gitname}-${pkgver}-build" - make test || return 1 + cd "${srcdir}/${_builddir}" + make test } # Create the package package() { - # Install in /opt/roboptim - cd "${srcdir}/${_gitname}-${pkgver}-build" + cd "${srcdir}/${_builddir}" msg "Installing files" - make --silent DESTDIR="${pkgdir}/" install || return 1 + make --silent DESTDIR="${pkgdir}/" install # Remove ${src_dir} from the doxytag msg "Correcting doxytag file" |