summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: c678c134a2ef39f76f0814f5b7059675d8ddf4c8 (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: Felix Golatofski <contact@xdfr.de>
# Contributor: Jakob Gahde <j5lx@fmail.co.uk>

pkgname=ocaml-dtools
pkgver=0.4.2
pkgrel=1
pkgdesc="OCaml modules for writing daemons"
arch=('i686' 'x86_64')
url="https://github.com/savonet/ocaml-dtools"
license=('GPL2')
depends=('ocaml' 'ocaml-syslog')
makedepends=('ocaml-findlib')
options=('!strip')
source=("${pkgname}-${pkgver}::https://github.com/savonet/ocaml-dtools/archive/${pkgver}.tar.gz")
sha256sums=('9ddbef6b8e3c90f2339c81831de7c4ee70308846d72007e5e10ac97941e10c7d')

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

package() {
    cd "${srcdir}/${pkgname}-${pkgver}"
    DESTDIR="$pkgdir" dune install --prefix '/usr' --libdir 'lib/ocaml' --release --verbose


    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" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}