Date: Wednesday, February 14, 2018 @ 00:56:45 Author: archange Revision: 293941
archrelease: copy trunk to community-x86_64 Added: ocaml-yojson/repos/community-x86_64/ ocaml-yojson/repos/community-x86_64/PKGBUILD (from rev 293940, ocaml-yojson/trunk/PKGBUILD) ----------+ PKGBUILD | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) Copied: ocaml-yojson/repos/community-x86_64/PKGBUILD (from rev 293940, ocaml-yojson/trunk/PKGBUILD) =================================================================== --- community-x86_64/PKGBUILD (rev 0) +++ community-x86_64/PKGBUILD 2018-02-14 00:56:45 UTC (rev 293941) @@ -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}/ +}