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

pkgname=osqp
pkgver=0.6.3
pkgrel=2
pkgdesc="The Operator Splitting QP Solver"
arch=('i686' 'x86_64')
url="https://github.com/osqp/$pkgname"
license=('apache-2.0')
depends=()
optdepends=()
makedepends=('cmake' 'python-scipy')
source=("$url/releases/download/v$pkgver/$pkgname-v$pkgver-src.tar.gz")
options=('staticlibs')
sha256sums=('285b2a60f68d113a1090767ec8a9c81a65b3af2d258f8c78a31cc3f98ba58456')

prepare() {
    sed -i 's/sp.randn/np.random.randn/' tests/primal_infeasibility/generate_problem.py
}

build() {
    cmake -B build -S . \
        -DCMAKE_INSTALL_LIBDIR=lib \
        -DCMAKE_INSTALL_PREFIX=/usr \
        -DUNITTESTS=ON -DENABLE_MKL_PARDISO=OFF \
        -DDLONG=OFF \
        -DPRINTING=OFF \
        -Wno-dev
    cmake --build build
}

check() {
    cmake --build build -t test
}

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