summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: ad2586fd03dc2dd34c0b8b6e4a6d8efa68bb9488 (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
# Maintainer: Guilhem Saurel <saurel@laas.fr>

_org='stack-of-tasks'
_pkgname='eiquadprog'
pkgname=("${_pkgname}" "${_pkgname}-docs")
pkgver=1.2.9
pkgrel=1
pkgdesc="Quadratic Programing solver with eigen"
arch=('any')
url="https://github.com/${_org}/${_pkgname}"
license=('LGPL')
depends=()
optdepends=('doxygen')
makedepends=('cmake' 'boost' 'boost-libs' 'eigen')
source=($url/releases/download/v${pkgver}/${_pkgname}-${pkgver}.tar.gz{,.sig})
sha256sums=('41f317803933d42a2228b041e7f94d75fb4239449a2e291f404ab18c82622cd4'
            'SKIP')
validpgpkeys=('9B1A79065D2F2B806C8A5A1C7D2ACDAF4653CF28')

build() {
    cmake -B "build-$pkgver" -S "$pkgbase-$pkgver" \
        -DCMAKE_INSTALL_LIBDIR=lib \
        -DCMAKE_INSTALL_PREFIX=/usr \
        -Wno-dev
    cmake --build "build-$pkgver"
}

check() {
    cmake --build "build-$pkgver" -t test
}

package_eiquadprog() {
    DESTDIR="$pkgdir/" cmake --build "build-$pkgver" -t install
    rm -rf ${pkgdir}/usr/share/doc
    install -Dm644 "${_pkgname}-${pkgver}/COPYING.LESSER" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}

package_eiquadprog-docs() {
    DESTDIR="$pkgdir/" cmake --build "build-$pkgver" -t install
    rm -rf ${pkgdir}/usr/{lib,include,"share/$_pkgname"}
    install -Dm644 "${_pkgname}-${pkgver}/COPYING.LESSER" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}