blob: 39c39758df44e9cb4affe1432453b8ab0260aa29 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
# Author: Bruno Pagani <archange@archlinux.org>
# Maintainer: Zhiwei Chen <condy0919@gmail.com)
_pkgname=yojson
pkgname=ocaml-${_pkgname}
pkgver=2.2.2
pkgrel=1
pkgdesc="Low level JSON binary for OCaml"
arch=('x86_64')
url="https://github.com/ocaml-community/${_pkgname}"
license=('BSD')
options=('!strip' 'staticlibs')
depends=('ocaml' 'ocaml-biniou' 'ocaml-easy-format')
makedepends=('dune')
source=(https://github.com/ocaml-community/${_pkgname}/releases/download/${pkgver}/${_pkgname}-${pkgver}.tbz)
sha256sums=('9abfad8c9a79d4723ad2f6448e669c1e68dbfc87cc54a1b7c064b0c90912c595')
build() {
cd ${_pkgname}-${pkgver}
# no benchmarks
rm -rf bench/
# we're using ocaml > 4.08
sed -i '/libraries seq/d' lib/dune
dune build -p yojson
}
package() {
cd ${_pkgname}-${pkgver}
DESTDIR="${pkgdir}" dune install -p yojson --prefix=/usr --libdir="/usr/lib/ocaml"
# remove rogue dune-package file
rm -r "${pkgdir}"/usr/doc
rm -r "${pkgdir}"/usr/lib/ocaml/${_pkgname}/dune-package
}
|