# Maintainer: Daniel Peukert # Contributor: Jakob Gahde _projectname='ppx_hash' pkgname="ocaml-$_projectname" pkgver='0.13.0' pkgrel='1' pkgdesc='A ppx rewriter that generates hash functions from type expressions and definitions' arch=('x86_64' 'i686' 'arm' 'armv6h' 'armv7h' 'aarch64') url="https://github.com/janestreet/$_projectname" license=('MIT') depends=('ocaml>=4.04.2' 'ocaml-base>=0.13.0' 'ocaml-ppx_compare>=0.13.0' 'ocaml-ppx_sexp_conv>=0.13.0' 'ocaml-ppxlib>=0.9.0') makedepends=('dune>=1.5.1') options=('!strip') source=("$pkgname-$pkgver-$pkgrel.tar.gz::$url/archive/v$pkgver.tar.gz") sha256sums=('fc7d8f9c0ec3ae859f38509419a36754456c15067a1e180d0e80a970726b010c') _sourcedirectory="$_projectname-$pkgver" build() { cd "$srcdir/$_sourcedirectory/" dune build -p "$_projectname" --verbose } package() { cd "$srcdir/$_sourcedirectory/" DESTDIR="$pkgdir" dune install --prefix '/usr' --libdir 'lib/ocaml' install -dm755 "$pkgdir/usr/share/doc/$pkgname" mv "$pkgdir/usr/doc/$_projectname/"* "$pkgdir/usr/share/doc/$pkgname/" rm -r "$pkgdir/usr/doc/" install -dm755 "$pkgdir/usr/share/licenses/$pkgname" ln -sf "/usr/share/doc/$pkgname/LICENSE.md" "$pkgdir/usr/share/licenses/$pkgname/LICENSE.md" }