summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 9311e26dcb67caedd999cf00e7c2cfdf800b11b7 (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
37
38
39
40
41
42
# Maintainer: Antonin Décimo <antonin dot decimo at gmail dot com>
# Contributor: Vincent Bernardoff <vb@luminar.eu.org>
# Contributor: Raphaël Proust <raphlalou@gmail.com>

pkgname=opam-git
pkgver=2.1.0.beta2.r165.g1138d481
pkgrel=3
pkgdesc='OCaml package manager'
arch=('i686' 'x86_64' 'armv6h' 'armv7h')
url='https://opam.ocaml.org/'
license=(GPL)
depends=(bubblewrap ocaml-compiler-libs unzip)
makedepends=('git' 'curl')
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'
)
provides=("${pkgname%-git}")
conflicts=("${pkgname%-git}")
source=("${pkgname%-git}"::'git+git://github.com/ocaml/opam.git')
sha256sums=('SKIP')

pkgver() {
  cd "$srcdir/${pkgname%-git}"
  git describe --long | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
}

build() {
  cd "$srcdir/${pkgname%-git}"
  # A clean environment seems mandatory to avoid conflicts with
  # existing installation of Opam packages. This may cause surprises
  # if you have a peculiar customization of your OCaml/Opam setup.
  env -i PATH=/usr/bin LANG=$LANG ./configure --prefix=/usr
  env -i PATH=/usr/bin LANG=$LANG make lib-ext all
}

package() {
  cd "$srcdir/${pkgname%-git}"
  make DESTDIR="$pkgdir" install
}