summaryrefslogtreecommitdiffstats
path: root/abs/extra/opam/PKGBUILD
blob: 0db29ee285fc65c3128e4dbe11b6e6fdf302fb05 (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
# Maintainer: Alexander F. Rødseth <xyproto@archlinux.org>
# Contributor: Vincent B. <vb@luminar.eu.org>

pkgname=opam
pkgver=2.0.3
pkgrel=1
pkgdesc='OCaml package manager'
arch=(x86_64)
url='https://opam.ocaml.org/'
license=(GPL)
depends=(bubblewrap ocaml-compiler-libs unzip)
optdepends=('darcs: For downloading packages with darcs'
            'git: For downloading packages with git'
            'mercurial: For downloading packages with mercurial'
            'rsync: For downloading packages with rsync')
source=("https://github.com/ocaml/opam/releases/download/$pkgver/opam-full-$pkgver.tar.gz")
sha256sums=('0589da4da184584a5445d59385009536534f60bc0e27772245b2f49e5fa8f0e2')

build() {
  cd "opam-full-$pkgver"
  ./configure --prefix=/usr
  make lib-ext all -j1 \
    OCAMLC='ocamlc -unsafe-string' \
    OCAMLOPT='ocamlopt -unsafe-string'
}

package() {
  make -C "opam-full-$pkgver" DESTDIR="$pkgdir" install

  install -d "$pkgdir/usr/share/doc"
  mv "$pkgdir/usr/doc/opam-installer" "$pkgdir/usr/share/doc/opam"
  rmdir "$pkgdir/usr/doc"
}

# getver: opam.ocaml.org
# vim: ts=2 sw=2 et: