# Maintainer: Daniel Peukert # Contributor: Jakob Gahde # Contributor: wenLiangcan # Contributor: Taylor Venable _projectname='utop' pkgname="ocaml-$_projectname" pkgver='2.12.1' pkgrel='2' pkgdesc='Universal toplevel for OCaml' # If you're running on aarch64, you have to add it to the arch array of the cppo, ocaml-biniou, ocaml-cmdliner, ocaml-easy-format, ocaml-uchar, ocaml-uutf and ocaml-yojson AUR dependencies arch=('x86_64' 'aarch64') url="https://github.com/ocaml-community/$_projectname" license=('BSD') depends=('ocaml>=4.08.0' 'ocaml-findlib>=1.7.2' 'ocaml-lambda-term>=3.1.0' 'ocaml-logs' 'ocaml-lwt' 'ocaml-react>=1.0.0' 'ocaml-zed>=3.2.0') makedepends=('cppo>=1.1.2' 'dune>=1.0.0') options=('!strip') source=("$pkgname-$pkgver-$pkgrel.tar.gz::$url/archive/$pkgver.tar.gz") sha512sums=('cc52bdb2a58141e6f7b678c93f69b0aa5ca4c628cb6841e02e6a783191a917bd838c06682d55f4f455a01a7004e43b5193d8574968b8400050b0f7b5a102ca3a') _sourcedirectory="$_projectname-$pkgver" prepare() { cd "$srcdir/$_sourcedirectory/" sed -i "s/%%VERSION%%/$pkgver/g" 'src/lib/uTop.ml' } build() { cd "$srcdir/$_sourcedirectory/" dune build --release --verbose } package() { cd "$srcdir/$_sourcedirectory/" DESTDIR="$pkgdir" dune install --prefix '/usr' --libdir '/usr/lib/ocaml' --docdir '/usr/share/doc' --mandir '/usr/share/man' --release --verbose install -dm755 "$pkgdir/usr/share/licenses/$pkgname" ln -sf "/usr/share/doc/$pkgname/LICENSE" "$pkgdir/usr/share/licenses/$pkgname/LICENSE" }