summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorMort Yao2019-10-19 22:09:05 +0200
committerMort Yao2019-10-19 22:09:05 +0200
commita92caf2165384d15ed8db38b8574d22c488270e4 (patch)
treea0eee6cc8899fdcc5b5fed5ba3edb5770f4146a7
downloadaur-a92caf2165384d15ed8db38b8574d22c488270e4.tar.gz
ocaml-yojson-git 20190520-1
-rw-r--r--.SRCINFO22
-rw-r--r--PKGBUILD37
2 files changed, 59 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..a49300b20286
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,22 @@
+# Generated by mksrcinfo v8
+# Sat Oct 19 20:08:21 UTC 2019
+pkgbase = ocaml-yojson-git
+ pkgdesc = Low level JSON binary for OCaml
+ pkgver = 20190520
+ pkgrel = 1
+ url = https://github.com/ocaml-community/yojson
+ arch = x86_64
+ license = BSD
+ makedepends = dune
+ makedepends = cppo
+ depends = ocaml-biniou
+ depends = ocaml-easy-format
+ provides = ocaml-yojson
+ conflicts = ocaml-yojson
+ options = !strip
+ options = staticlibs
+ source = ocaml-yojson-git::git://github.com/ocaml-community/yojson.git
+ md5sums = SKIP
+
+pkgname = ocaml-yojson-git
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..474125655aee
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,37 @@
+# Maintainer: Mort Yao <soi@mort.ninja>
+
+pkgname=ocaml-yojson-git
+pkgver=20190520
+pkgrel=1
+pkgdesc="Low level JSON binary for OCaml"
+arch=('x86_64')
+url='https://github.com/ocaml-community/yojson'
+license=('BSD')
+options=('!strip' 'staticlibs')
+provides=('ocaml-yojson')
+conflicts=('ocaml-yojson')
+depends=('ocaml-biniou' 'ocaml-easy-format')
+makedepends=('dune' 'cppo')
+source=("${pkgname}::git://github.com/ocaml-community/yojson.git")
+md5sums=('SKIP')
+
+pkgver() {
+ cd "$pkgname"
+ git log -1 --pretty=format:%cd --date=short | sed 's/-//g'
+}
+
+build() {
+ cd "$pkgname"
+
+ make all
+}
+
+package() {
+ cd "$pkgname"
+
+ DESTDIR="${pkgdir}" dune install --prefix=/usr --libdir="$(ocamlfind printconf destdir)"
+
+ # remove rogue dune-package file
+ rm -r "${pkgdir}"/usr/doc
+ rm -r "${pkgdir}"/usr/lib/ocaml/yojson/dune-package
+}