diff --git a/.SRCINFO b/.SRCINFO index 38aecb0d62da..6d5666751374 100644 --- a/.SRCINFO +++ b/.SRCINFO @@ -1,20 +1,17 @@ -# Generated by mksrcinfo v8 -# Thu Jan 25 14:58:05 UTC 2018 pkgbase = ocaml-ocamlgraph pkgdesc = Graph library for OCaml - pkgver = 1.8.8 + pkgver = 2.1.0 pkgrel = 1 - url = http://ocamlgraph.lri.fr/index.en.html - arch = i686 + url = https://github.com/backtracking/ocamlgraph arch = x86_64 - license = LGPL - makedepends = ocaml - makedepends = ocaml-findlib - makedepends = lablgtk2 - options = !strip - options = !makeflags - source = http://ocamlgraph.lri.fr/download/ocamlgraph-1.8.8.tar.gz - md5sums = 9d71ca69271055bd22d0dfe4e939831a + license = LGPL-2.1-only + checkdepends = ocaml-graphics + makedepends = dune>=2.0 + makedepends = ocaml>=4.08.0 + depends = glibc + depends = ocaml-stdlib-shims + depends = ocaml>=4.08.0 + source = ocaml-ocamlgraph-2.1.0.tar.gz::https://github.com/backtracking/ocamlgraph/archive/refs/tags/2.1.0.tar.gz + b2sums = c60fae1c38bdcae6e00dadc652c84fdec285d0ff37ff86881fa191815c0decad82f525557c43dfee0dbf88866d1001dc450563eca51ce585ba2ac2bdc52c0cb1 pkgname = ocaml-ocamlgraph - diff --git a/PKGBUILD b/PKGBUILD index 24fde4fa1753..a9af0008eeb8 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -1,40 +1,44 @@ -# Maintainer: Thorsten Wißmann -# Maintainer: Serge Zirukin +# Maintainer: Manuel Wiesinger +# Contributor: Thorsten Wißmann +# Contributor: Serge Zirukin # Contributor: Sergei Lebedev # Contributor: Thomas S Hatch # Contributor: Paolo Herms # Contributor: Magnus Therning # Contributor: Jose Neder -pkgname=ocaml-ocamlgraph -pkgver=1.8.8 +_srcname=ocamlgraph +pkgname=ocaml-$_srcname +pkgver=2.1.0 pkgrel=1 pkgdesc="Graph library for OCaml" -url="http://ocamlgraph.lri.fr/index.en.html" -source=("http://ocamlgraph.lri.fr/download/ocamlgraph-$pkgver.tar.gz") -md5sums=('9d71ca69271055bd22d0dfe4e939831a') -options=('!strip' '!makeflags') -depends=() -makedepends=('ocaml' 'ocaml-findlib' 'lablgtk2') -arch=('i686' 'x86_64') -license=('LGPL') +url="https://github.com/backtracking/ocamlgraph" +source=("$pkgname-$pkgver.tar.gz::${url}/archive/refs/tags/${pkgver}.tar.gz") +b2sums=('c60fae1c38bdcae6e00dadc652c84fdec285d0ff37ff86881fa191815c0decad82f525557c43dfee0dbf88866d1001dc450563eca51ce585ba2ac2bdc52c0cb1') +makedepends=('dune>=2.0' 'ocaml>=4.08.0') +checkdepends=('ocaml-graphics') +depends=('glibc' 'ocaml-stdlib-shims' 'ocaml>=4.08.0') +arch=('x86_64') +license=('LGPL-2.1-only') + +check() { + cd "$srcdir/$_srcname-$pkgver" + dune runtest --release +} build() { - cd "$srcdir/ocamlgraph-$pkgver" - ./configure --prefix=/usr - # do not build the viewer because lablgtk2 is build without - # libgnomecanvas, see - # https://git.archlinux.org/svntogit/packages.git/tree/trunk/PKGBUILD?h=packages/lablgtk2 - make all doc + cd "$srcdir/$_srcname-$pkgver" + dune build -p $_srcname } package() { - cd "$srcdir/ocamlgraph-$pkgver" - OCAMLFIND_DESTDIR=$pkgdir$(ocamlfind printconf destdir) - mkdir -p $OCAMLFIND_DESTDIR - make DESTDIR=$pkgdir OCAMLFINDDEST="-destdir $OCAMLFIND_DESTDIR" install-findlib - install -d -m 0755 "${pkgdir}/usr/share/doc/$pkgname" - install -t "${pkgdir}/usr/share/doc/$pkgname/" doc/* - #install -Dm 755 dgraph/dgraph.opt "${pkgdir}/usr/bin/graph-viewer" - #install -Dm 755 editor/editor.opt "${pkgdir}/usr/bin/graph-editor" + cd "$srcdir/ocamlgraph-$pkgver" + + DESTDIR="${pkgdir}" dune install \ + --prefix "/usr" \ + --libdir "/usr/lib/ocaml" \ + --docdir "/usr/share/doc" \ + -p ${_srcname} + + mv $pkgdir/usr/share/doc/$_srcname $pkgdir/usr/share/doc/$pkgname }