summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 9d560aca740dbefa848cf91bde41ec439b56716c (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-migrate-parsetree-git
pkgver=20190905
pkgrel=1
pkgdesc="Convert OCaml parsetrees between different versions"
arch=('x86_64')
url="https://github.com/ocaml-ppx/ocaml-migrate-parsetree"
license=('custom:LGPL2.1 with linking exception')
provides=('ocaml-migrate-parsetree')
conflicts=('ocaml-migrate-parsetree')
depends=('ocaml' 'ocaml-result' 'ocaml-ppx_derivers')
makedepends=('dune')
options=('!strip')
source=("${pkgname}::git://github.com/ocaml-ppx/ocaml-migrate-parsetree.git")
md5sums=('SKIP')

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

build() {
  cd "$pkgname"

  dune build --profile release
}

package() {
  cd "$pkgname"

  dune install --verbose --destdir "${pkgdir}"
  install -Dm644 "LICENSE.md" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE.md"
}