summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 6935dbfd03b8f213f59af56bdaa0faa7c333a63c (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
45
46
# Maintainer: Christopher Price <pricechrispy at gmail dot com>
# Contributor: Caleb Maclennan <caleb@alerque.com>
# Contributor: Eric Fung <loseurmarbles[AT]gmail[DOT]com>
# Contributor: Dimitris Kiziridis <ragouel at outlook dot com>
# Contributor: Tambet Arak <tambetarak+nospam@gmail.com>
# Contributor: oliver < a t >  first . in-berlin . de
# Contributor: charlesthehawk at yahoo dot com
# Contributor: Serge Zirukin <ftrvxmtrx@gmail.com>

pkgname=ocaml-sqlite3
pkgver=5.1.0
pkgrel=2
arch=('x86_64')
license=('MIT')
pkgdesc='SQLite3 bindings for OCaml'
url='https://mmottl.github.io/sqlite3-ocaml/'
depends=('ocaml' 'ocaml-stdio' 'sqlite>=3')
makedepends=('dune' 'ocaml-findlib')
provides=('sqlite3-ocaml')
replaces=('sqlite3-ocaml')
conflicts=('sqlite3-ocaml')
options=('!strip' 'staticlibs')
source=("https://github.com/mmottl/sqlite3-ocaml/releases/download/${pkgver}/sqlite3-${pkgver}.tbz")
sha256sums=('bb0db711691a8dfa24fe29ec4ecb6912444ad90e0f4c447af89831e6d1dffea5')

build() {
    cd "${srcdir}/sqlite3-${pkgver}"
    dune build @install
}

package() {
    cd "${srcdir}/sqlite3-${pkgver}"

    install -d "${pkgdir}/usr/share/doc"          \
        "${pkgdir}/usr/share/licenses/${pkgname}" \
        "${pkgdir}/$(ocamlfind -printconf destdir)"

    dune install --destdir "$pkgdir" \
                 --prefix "/usr/share" \
                 --libdir "$(ocamlfind printconf destdir)"

    mv "${pkgdir}/usr/share/doc/sqlite3" "${pkgdir}/usr/share/doc/${pkgname}"

    mv "${pkgdir}/usr/share/doc/${pkgname}/LICENSE.md" \
       "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE.md"
}