summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: cc96c50fb0b25d85769f5c73c4e4fc5175ab9c4a (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
# Maintainer: Carlos Aznarán <caznaranl@uni.pe>
pkgname=libnpy
pkgver=1.0.1
pkgrel=1
pkgdesc="C++ library for reading and writing of numpy's .npy files"
url="https://github.com/llohse/${pkgname}"
arch=(any)
license=(MIT)
depends=()
checkdepends=(meson cmake catch2-v2 python-numpy)
source=(${pkgname}-${pkgver}.tar.gz::${url}/archive/v${pkgver}.tar.gz)
sha512sums=('faeff4f620025f1f5358498dcfb2eed97aa27ece2a9ee323d177d1dce149d029e0cb0d4a9b5b356027c651ab591e7bd75aa09b6c079b851c27444183e95ff16b')

check() {
  cd ${pkgname}-${pkgver}
  arch-meson tests builddir
  meson compile -C builddir
  meson test -C builddir --print-errorlogs
}

package() {
  # install headers
  install -d ${pkgdir}/usr/include/${pkgname}
  install ${pkgname}-${pkgver}/include/npy.hpp ${pkgdir}/usr/include/${pkgname}
  install -Dm 644 ${pkgname}-${pkgver}/LICENSE -t "${pkgdir}/usr/share/licenses/${pkgname}"
}