summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: a58f42da215d43a742920f450baed3392fc9a5be (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
# Maintainer: Daniel Peukert <daniel@peukert.cc>
_projectname='reactiveData'
pkgname="ocaml-reactivedata"
pkgver='0.3'
pkgrel='2'
pkgdesc='Functional reactive programming with incremental changes in data structures for OCaml'
arch=('x86_64' 'aarch64')
url="https://github.com/ocsigen/$_projectname"
license=('LGPL-3.0-or-later WITH OCaml-LGPL-linking-exception')
depends=('ocaml>=4.08.0' 'ocaml-react>=1.2.1')
makedepends=('dune>=1.0.0')
options=('!strip')
source=("$pkgname-$pkgver.tar.gz::$url/archive/$pkgver.tar.gz")
b2sums=('75ec85d465e461fd4f101e4854a00a43166e46b2aa9265c9bc43ae908997d6fad95f8cab2d83c72f7e3e1ea8380736c6df2ba2c4d6b8b37d9428accc692620e5')

_sourcedirectory="$_projectname-$pkgver"

build() {
	cd "$srcdir/$_sourcedirectory/"
	dune build --release --verbose
}

package() {
	cd "$srcdir/$_sourcedirectory/"
	DESTDIR="$pkgdir" dune install --prefix '/usr' --libdir '/usr/lib/ocaml' --docdir '/usr/share/doc' --mandir '/usr/share/man' --release --verbose

	for _folder in "$pkgdir/usr/share/doc/"*; do
		mv "$_folder" "$pkgdir/usr/share/doc/ocaml-$(basename "$_folder" | tr '[:upper:]' '[:lower:]')"
	done

	install -dm755 "$pkgdir/usr/share/licenses/$pkgname"
	ln -sf "/usr/share/doc/$pkgname/LICENSE" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}