blob: 0060f78398953fa23a31dafdbe7e2c8843cacc27 (
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
44
|
# Maintainer: Daniel Peukert <dan.peukert@gmail.com>
# Contributor: Jakob Gahde <j5lx@fmail.co.uk>
_projectname='ppxfind'
pkgname="ocaml-$_projectname"
pkgver='1.4'
pkgrel='1'
pkgdesc='Tool combining ocamlfind and ppx'
arch=('x86_64' 'i686' 'arm' 'armv6h' 'armv7h' 'aarch64')
url="https://github.com/diml/$_projectname"
license=('MIT')
depends=('ocaml>=4.02.3' 'ocaml-findlib' 'ocaml-migrate-parsetree')
makedepends=('dune' 'ocaml-findlib')
options=('!strip')
source=(
"$pkgname-$pkgver-$pkgrel.tar.gz::$url/archive/$pkgver.tar.gz"
'dune-version.diff'
)
sha256sums=('49e2f5cb7fb31e8fc2d482097d1bc96c8915ab50ea37133366da03a9a5ca3604'
'5c589918a6f98fbb962590276629e4639037c02aaabdb10f5ec18b40ee2767c2')
_sourcedirectory="$_projectname-$pkgver"
prepare() {
cd "$srcdir/$_sourcedirectory/"
# Needed until Arch upgrades to dune>=2.0.0
patch --forward -p1 < '../dune-version.diff'
}
build() {
cd "$srcdir/$_sourcedirectory/"
dune build -p "$_projectname" --verbose
}
package() {
cd "$srcdir/$_sourcedirectory/"
DESTDIR="$pkgdir" dune install --prefix '/usr' --libdir 'lib/ocaml'
install -dm755 "$pkgdir/usr/share/doc/$pkgname"
mv "$pkgdir/usr/doc/$_projectname/"* "$pkgdir/usr/share/doc/$pkgname/"
rm -r "$pkgdir/usr/doc/"
install -dm755 "$pkgdir/usr/share/licenses/$pkgname"
ln -sf "/usr/share/doc/$pkgname/LICENSE.md" "$pkgdir/usr/share/licenses/$pkgname/LICENSE.md"
}
|