summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 2053c8a2f813b24ddccd01baf61f340d5c04ebe3 (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
# Maintainer: yasuo-ozu <yasuo@ozu.email>

pkgname=qbsolv
pkgver=0.3.4
pkgrel=1
pkgdesc='A decomposing solver that finds a minimum value of a large quadratic unconstrained binary optimization (QUBO) problem'
arch=('x86_64')
url='https://github.com/dwavesystems/qbsolv'
license=('APACHE')
depends=()
optdepends=()
makedepends=(cmake make)
options=()
source=("git+https://github.com/dwavesystems/${pkgname}" "patch.patch")
md5sums=('SKIP' 'SKIP')

# pkgver() {
#   cd "${pkgname}"
#   cat setup.py|sed -ne '/^\s*version='\''.*'\'',$/p' | sed -e 's/^.*'\''\(.*\)'\'',$/\1/'
# }

build() {
  cd "${pkgname}"
  git apply ../patch.patch
  mkdir -p build
  cd build
  cmake -DQBSOLV_BUILD_CMD=ON ..
  make preinstall
}

package() {
  cd "${pkgname}/build"
  /usr/bin/cmake -DCMAKE_INSTALL_PREFIX=${pkgdir} -P cmake_install.cmake
  install -Dm755 qbsolv "${pkgdir}/usr/bin/qbsolv"
  install -Dm644 libqbsolv.a "${pkgdir}/usr/lib/libqbsolv.a"
  install -Dm644 ../LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}