summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 4c1acc1e501fee1b6837de6ed0f3e7648dab0122 (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
# Maintainer: Mort Yao <soi@mort.ninja>

pkgname=ocaml-ppx_derivers-git
pkgver=20190404
pkgrel=3
pkgdesc="deriving plugin registry"
arch=('x86_64')
url='https://github.com/ocaml-ppx/ppx_derivers'
license=('BSD')
provides=('ocaml-ppx_derivers=1.2.1')
conflicts=('ocaml-ppx_derivers')
makedepends=('ocamlbuild' 'ocaml-findlib' 'dune')
source=("${pkgname}::git://github.com/ocaml-ppx/ppx_derivers.git")
md5sums=('SKIP')

pkgver() {
  cd "$pkgname"
  git log -1 --pretty=format:%cd --date=short | sed 's/-//g'
}

build() {
  cd "$pkgname"

  dune build
}

package() {
  cd "$pkgname"

  install -dm755 "${pkgdir}$(ocamlfind -printconf destdir)" "${pkgdir}/usr/share"
  dune install --prefix "${pkgdir}/usr" --libdir "${pkgdir}$(ocamlfind -printconf destdir)"
  mv "${pkgdir}/usr/doc" "${pkgdir}/usr/share/"
  install -Dm644 "LICENSE.md" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE.md"
}