summaryrefslogtreecommitdiffstats
path: root/abs/extra/ocaml-topkg/PKGBUILD
blob: 333d708f2545dcd9146ddee88d61ee071d5480f3 (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
# Maintainer:  Jürgen Hötzel <juergen@archlinux.org>
pkgname=ocaml-topkg
pkgver=0.9.1
pkgrel=2
pkgdesc="A packager for distributing OCaml software"
arch=('x86_64')
url="http://erratique.ch/software/topkg"
license=('BSD')
depends=('ocaml' 'ocaml-result')
makedepends=('ocaml-findlib' 'ocamlbuild' 'opam' 'ocaml-compiler-libs')
source=("http://erratique.ch/software/topkg/releases/topkg-${pkgver}.tbz")
md5sums=('8978a0595db1a22e4251ec62735d4b84')

build() {
  cd "${srcdir}/topkg-${pkgver}"

  pkg/pkg.ml build --pkg-name topkg
}

package() {
  cd "${srcdir}/topkg-${pkgver}"

  opam-installer --prefix="${pkgdir}/usr" \
    --libdir="${pkgdir}$(ocamlc -where)" \
    --docdir="${pkgdir}/usr/share/doc"
  install -dm755 "${pkgdir}/usr/share/licenses/${pkgname}"
  mv "${pkgdir}/usr/share/doc/topkg/LICENSE.md" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE.md"
}