# Maintainer: Hans-Nikolai Viessmann # Contributor: Jakob Gahde # Contributor: Bruno Pagani pkgname=cppo pkgver=1.6.9 pkgrel=2 pkgdesc="C-style preprocessor for OCaml" arch=('x86_64') url="https://github.com/ocaml-community/cppo" license=('BSD') depends=('glibc') optdepends=('ocamlbuild: ocamlbuild plugin') makedepends=('dune' 'ocamlbuild') source=("https://github.com/ocaml-community/cppo/archive/refs/tags/v${pkgver}.tar.gz") sha256sums=('16036d85c11d330a7c8b56f4e071d6bbe86d8937c89d3d79f6eef0e38bdda26a') build() { cd "${srcdir}/${pkgname}-${pkgver}" dune build --profile release } check() { cd "${srcdir}/${pkgname}-${pkgver}" dune runtest } package() { cd "${srcdir}/${pkgname}-${pkgver}" # hmmm, --libdir behaviour changed in dune 3.2.0, it must now be an absolute path?! DESTDIR="${pkgdir}" dune install --prefix "/usr" --libdir "/usr/lib/ocaml" install -Dm644 LICENSE.md "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE.md" mv "${pkgdir}/usr/doc" "${pkgdir}/usr/share/" }