summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD36
1 files changed, 15 insertions, 21 deletions
diff --git a/PKGBUILD b/PKGBUILD
index e22f00e6ac3a..35b6e001170f 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,37 +1,31 @@
-# Maintainer: oliver <at> first . in - berlin . de
+# Contributor: oliver <at> first . in - berlin . de
pkgname=ocaml-xml-light
-pkgver=2.2
-pkgrel=4
+pkgver=2.5
+pkgrel=1
license=('LGPL')
arch=('i686' 'x86_64')
pkgdesc="Objective Caml lightweight xml parser"
url="http://tech.motion-twin.com/xmllight.html"
depends=('ocaml')
-makedepends=('ocaml-findlib')
+makedepends=('dune')
options=('!strip' '!makeflags' 'staticlibs')
-source=("http://tech.motion-twin.com/zip/xml-light-${pkgver}.zip"
+source=("https://github.com/ncannasse/xml-light/releases/download/${pkgver}/xml-light-${pkgver}.tbz"
"META")
-md5sums=('7658985cfdaeeb94b579b932eeaa3e00'
+md5sums=('b15b3ddfc73159052e9cd734290d10bd'
'ad22cde4d3a944673d3b0a25a1e835dc')
-OCAMLFIND_DESTDIR="${pkgdir}$(ocamlfind printconf destdir)"
-DOCDIR="${pkgdir}/usr/share/doc/${pkgname}"
-
build() {
-cd ${srcdir}/xml-light
-make all doc
-make opt
+cd ${srcdir}/xml-light-${pkgver}
+OCAMLPATH=/usr/lib/ocaml dune build --release
}
package() {
-cd ${srcdir}/xml-light
-mkdir -p ${pkgdir}$(ocamlfind printconf destdir)
-mkdir -p ${pkgdir}/usr/share/doc/${pkgname}
-rm -rf test.cmi
-cp ${srcdir}/META .
-env DESTDIR="${pkgdir}" \
-OCAMLFIND_DESTDIR=${pkgdir}$(ocamlfind printconf destdir) \
-ocamlfind install xml-light META *.mli *.cmi *.cma *.a *.cmxa *.cmx
-cp doc/* ${pkgdir}/usr/share/doc/${pkgname}
+cd ${srcdir}/xml-light-${pkgver}
+DESTDIR="$pkgdir" dune install --prefix '/usr' --libdir '/usr/lib/ocaml' --release
+install -dm755 "$pkgdir/usr/share/doc/$pkgname"
+mv "$pkgdir/usr/doc/xml-light/"* "$pkgdir/usr/share/doc/$pkgname/"
+rm -r "$pkgdir/usr/doc/"
+install -dm755 "$pkgdir/usr/share/licenses/$pkgname"
+ln -sf "/usr/share/doc/$pkgname/LICENSE.md" "$pkgdir/usr/share/licenses/$pkgname/LICENSE.md"
}