Date: Wednesday, February 14, 2018 @ 00:56:29 Author: archange Revision: 293940
Initial addition of ocaml-yojson in [community] Added: ocaml-yojson/ ocaml-yojson/repos/ ocaml-yojson/trunk/ ocaml-yojson/trunk/PKGBUILD ----------+ PKGBUILD | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) Added: ocaml-yojson/trunk/PKGBUILD =================================================================== --- ocaml-yojson/trunk/PKGBUILD (rev 0) +++ ocaml-yojson/trunk/PKGBUILD 2018-02-14 00:56:29 UTC (rev 293940) @@ -0,0 +1,39 @@ +# Maintainer: Bruno Pagani <archa...@archlinux.org> + +_pkgname=yojson +pkgname=ocaml-${_pkgname} +pkgver=1.4.0 +pkgrel=1 +pkgdesc="An optimized parsing and printing library for JSON" +arch=('x86_64') +url="https://github.com/mjambon/${_pkgname}" +license=('BSD') +options=('!strip' 'staticlibs') +depends=('ocaml-biniou' 'ocaml-easy-format') +makedepends=('ocaml-findlib' 'dune' 'cppo' 'opam') +source=(${pkgname}-${pkgver}.tar.gz::"${url}/archive/v${pkgver}.tar.gz") +sha256sums=('7d06340b769ed6ff5b2171a0e820d1e8f4337aef3929090fc976efe845639146') + +build() { + cd ${_pkgname}-${pkgver} + make all +} + +check() { + cd ${_pkgname}-${pkgver} + make test +} + +package() { + cd ${_pkgname}-${pkgver} + + # Initialize OPAM + export OPAMROOT="${srcdir}"/opam + opam init -n + + # Work around missing install command + OCAMLFIND_DESTDIR="${pkgdir}$(ocamlfind printconf destdir)" jbuilder install + + # Install LICENSE + install -Dm644 "${srcdir}"/opam/system/doc/${_pkgname}/LICENSE -t "${pkgdir}"/usr/share/licenses/${pkgname}/ +}