summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 49f55b4dfdbba18a755cd443128706a78ca81b90 (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
pkgname=coin-or-qpoases
pkgver=3.2.1
pkgrel=2
pkgdesc="COIN-OR QP solver with online active set strategy"
arch=(i686 x86_64)
url="https://github.com/coin-or/qpOASES"
license=(LGPL2.1)
groups=(coin-or)
makedepends=(cmake)
depends=(blas lapack)
_name=qpOASES
source=("$pkgname-$pkgver.tar.gz::$url/archive/refs/tags/releases/$pkgver.tar.gz")
sha256sums=('a7d153b4e23ee66bd50cdb6e84291d0084d9967a9c788a4d873440a6b10ca13b')

prepare() {
  sed -i "s/STATIC/SHARED/" "qpOASES-releases-$pkgver/CMakeLists.txt"
}

build() {
  cmake -B "build-$pkgver" -S "qpOASES-releases-$pkgver" \
      -DCMAKE_INSTALL_PREFIX=/usr
  cmake --build "build-$pkgver"
}

check() {
  "./build-$pkgver/bin/example1"
}

package() {
  DESTDIR="$pkgdir" cmake --build "build-$pkgver" -t install
}