summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 69b133d00b151edf341aaabb8e3800926387b10c (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
43
# 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
pkgname=$_pkgname-git
pkgver=2.1.0.beta4.r13.g6929b39c
pkgrel=1
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)
conflicts=($_pkgname)
source=('git://github.com/ocaml/opam.git')
sha256sums=('SKIP')

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

build() {
  cd "$srcdir/$_pkgname"
  # 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"
  make DESTDIR="$pkgdir" install
}