diff options
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 51 |
1 files changed, 30 insertions, 21 deletions
@@ -1,31 +1,40 @@ -# Maintainer: Jakob Gahde <j5lx@fmail.co.uk> - -_pkgname=ppx_deriving -pkgname=ocaml-${_pkgname} -pkgver=4.2.1 -pkgrel=1 -pkgdesc="Type-driven code generation for OCaml >=4.02" -arch=('i686' 'x86_64') -url="https://github.com/ocaml-ppx/ppx_deriving" +# Maintainer: Daniel Peukert <dan.peukert@gmail.com> +# Contributor: Jakob Gahde <j5lx@fmail.co.uk> +_projectname='ppx_deriving' +pkgname="ocaml-$_projectname" +pkgver='4.4.1' +pkgrel='1' +pkgdesc='Type-driven code generation for OCaml >=4.02.2' +arch=('x86_64' 'i686' 'arm' 'armv6h' 'armv7h' 'aarch64') +url="https://github.com/ocaml-ppx/$_projectname" license=('MIT') -depends=('ocaml' 'ocaml-migrate-parsetree' 'ocaml-ppx_derivers' 'ocaml-ppx_tools' 'ocaml-result') -makedepends=('ocamlbuild' 'ocaml-findlib' 'cppo') -source=("https://github.com/ocaml-ppx/${_pkgname}/archive/v${pkgver}.tar.gz") -md5sums=('2195fccf2a527c3ff9ec5b4e36e2f0a8') +depends=('ocaml>=4.02.2' 'ocaml-migrate-parsetree' 'ocaml-ppx_derivers' 'ocaml-ppx_tools' 'ocaml-result') +makedepends=('cppo' 'dune>=1.6.3' 'ocaml-findlib' 'ocaml-ppxfind') +checkdepends=('ocaml-ounit') +options=('!strip') +source=("$pkgname-$pkgver-$pkgrel.tar.gz::$url/archive/v$pkgver.tar.gz") +sha256sums=('27bc57774724fc4f48775f2011375a5ee1439570204abbf6607761c472757e2f') + +_sourcedirectory="$_projectname-$pkgver" build() { - cd "${srcdir}/${_pkgname}-${pkgver}" + cd "$srcdir/$_sourcedirectory/" + dune build -p "$_projectname" --verbose +} - make +check() { + cd "$srcdir/$_sourcedirectory/" + dune runtest -p "$_projectname" --verbose } package() { - cd "${srcdir}/${_pkgname}-${pkgver}" + cd "$srcdir/$_sourcedirectory/" + DESTDIR="$pkgdir" dune install --prefix '/usr' --libdir 'lib/ocaml' - export OCAMLPATH="$(ocamlc -where):${pkgdir}$(ocamlc -where)" - export OCAMLFIND_DESTDIR="${pkgdir}$(ocamlfind printconf destdir)" - mkdir -p "${OCAMLFIND_DESTDIR}" + install -dm755 "$pkgdir/usr/share/doc/$pkgname" + mv "$pkgdir/usr/doc/$_projectname/"* "$pkgdir/usr/share/doc/$pkgname/" + rm -r "$pkgdir/usr/doc/" - make install - install -Dm644 "LICENSE.txt" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE.txt" + install -dm755 "$pkgdir/usr/share/licenses/$pkgname" + ln -sf "/usr/share/doc/$pkgname/LICENSE.txt" "$pkgdir/usr/share/licenses/$pkgname/LICENSE.txt" } |