summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 9c09a72d8b54fb0281478f8c8810a3d5ad3fa7e3 (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
# Maintainer: Carlos Aznarán <caznaranl@uni.pe>
_base=pybind11_json
pkgname=${_base/_/-}
pkgdesc="Using nlohmann::json with pybind11"
pkgver=0.2.14
pkgrel=1
arch=(any)
url="https://github.com/${_base::6}/${_base}"
license=(BSD-3-Clause)
depends=(pybind11 nlohmann-json)
makedepends=(cmake python)
source=(${_base}-${pkgver}.tar.gz::${url}/archive/${pkgver}.tar.gz)
sha512sums=('5084fa778ca833a93c138649cdf04e7e2b77686c877799507573abc3db438108ee6590d4e204499e07490580f277cc565ca8000db2cb571b7ecdb2103e8f1dfc')

build() {
  cmake \
    -S ${_base}-${pkgver} \
    -B build \
    -DCMAKE_BUILD_TYPE=Release \
    -DCMAKE_INSTALL_PREFIX=/usr \
    -Wno-dev
  cmake --build build --target all
}

package() {
  DESTDIR="${pkgdir}" cmake --build build --target install
  install -Dm 644 ${_base}-${pkgver}/LICENSE -t "${pkgdir}/usr/share/licenses/${pkgname}"
}