# Maintainer: Daniel Peukert # Contributor: Jakob Gahde _projectname='ppx_deriving' pkgname="ocaml-$_projectname" pkgver='5.2.1' pkgrel='4' epoch='1' pkgdesc='Type-driven code generation for OCaml' # If you're running on i686, pentium4, armv7h or aarch64, you have to add it to the arch array of the cppo, ocaml-biniou, ocaml-easy-format and ocaml-yojson AUR dependencies arch=('x86_64' 'i686' 'pentium4' 'armv7h' 'aarch64') url="https://github.com/ocaml-ppx/$_projectname" license=('MIT') depends=('ocaml>=4.05.0' 'ocaml-findlib' 'ocaml-ppx_derivers' 'ocaml-ppxlib>=0.20.0' 'ocaml-result') makedepends=('cppo' 'dune>=1.6.3') checkdepends=('ocaml-ounit') options=('!strip') source=("$pkgname-$epoch:$pkgver-$pkgrel.tar.gz::$url/archive/v$pkgver.tar.gz") sha512sums=('01d2eb920f3375960a9228138ccb5f2af49bfba1111894795c24b3c37d5a021d6bc95e9de1d867c35d03645334300ccc89f1fca0cb75007ec62e5620f328e078') _sourcedirectory="$_projectname-$pkgver" build() { cd "$srcdir/$_sourcedirectory/" dune build --release --verbose } check() { cd "$srcdir/$_sourcedirectory/" dune runtest --release --verbose } package() { cd "$srcdir/$_sourcedirectory/" DESTDIR="$pkgdir" dune install --prefix '/usr' --libdir '/usr/lib/ocaml' --docdir '/usr/share/doc' --mandir '/usr/share/man' --release --verbose install -dm755 "$pkgdir/usr/share/licenses/$pkgname" ln -sf "/usr/share/doc/$pkgname/LICENSE.txt" "$pkgdir/usr/share/licenses/$pkgname/LICENSE.txt" }