summaryrefslogtreecommitdiff
path: root/pcr/ocaml-pcre/PKGBUILD
blob: e44cdaa3c14a9df1608d9847c39ff200f27c2eca (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
# Maintainer (AUR: Jakob Gahde <j5lx@fmail.co.uk>
# Contributor (AUR): Leonard de Ruijter <leonard@aur.archlinux.org>
# Contributor (Arch): Serge Zirukin <ftrvxmtrx@gmail.com>
# Contributor (Arch): Sergei Lebedev <superbobry@gmail.com>
# Contributor (Arch): Magnus Therning <magnus@therning.org>
# Maintainer : Parabola GNU / Linux-libre <aurelien@cwb.io>

# parabola changes and rationale:
#  no changes.

pkgname=ocaml-pcre
pkgver=7.3.5
pkgrel=1
pkgdesc="Perl compatible regular expressions for OCaml"
arch=('i686' 'x86_64' 'armv7h')
url="http://mmottl.github.io/pcre-ocaml"
license=('LGPL')
depends=('ocaml' 'pcre')
makedepends=('dune' 'ocaml-base')
replaces=('pcre-ocaml')
conflicts=('pcre-ocaml')
options=('!strip' 'staticlibs')
source=("https://github.com/mmottl/pcre-ocaml/releases/download/${pkgver}/pcre-${pkgver}.tbz")
sha512sums=('346a90a5ceb42459e28f483977d3a41533ab4b5bc4169a9cdfffd22b1d506240104621b831280995749b8982c53a4a533a06afca08ba58065d04263a13ec32c3')

build() {
  cd "${srcdir}/pcre-${pkgver}"

  dune build
}

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

  install -dm755 "${pkgdir}/$(ocamlfind -printconf destdir)" "${pkgdir}/usr/share"
  dune install --prefix "${pkgdir}/usr" --libdir "${pkgdir}$(ocamlfind printconf destdir)"
  mv "${pkgdir}/usr/doc" "${pkgdir}/usr/share/"
  install -Dm644 "LICENSE.md" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE.md"
}