summaryrefslogtreecommitdiff
path: root/pcr/ocaml-pcre/PKGBUILD
blob: 480b814a076d416c3b40b9d124184ff86603b893 (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
# 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.2.3
pkgrel=2
pkgdesc="Perl compatible regular expressions for OCaml"
arch=('i686' 'x86_64' 'armv7h')
url="http://mmottl.github.io/pcre-ocaml"
license=('LGPL')
depends=('pcre>=4.5')
makedepends=('ocaml-findlib' 'ocamlbuild')
replaces=('pcre-ocaml')
conflicts=('pcre-ocaml')
options=('!strip' 'staticlibs')
source=("https://github.com/mmottl/pcre-ocaml/releases/download/v$pkgver/pcre-ocaml-$pkgver.tar.gz")
md5sums=('90b503355160d7422a7c3ef1623e6444')

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

  ./configure --disable-debug --prefix /usr --destdir "${pkgdir}"
  make all
}

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

  export OCAMLFIND_DESTDIR="${pkgdir}$(ocamlfind printconf destdir)"
  install -dm755 "${OCAMLFIND_DESTDIR}/stublibs"
  make install
  mv "${pkgdir}/usr/share/doc/pcre" "${pkgdir}/usr/share/doc/${pkgname}"
  install -Dm644 COPYING.txt "${pkgdir}/usr/share/licenses/${pkgname}/COPYING"
}