# Maintainer: Alexander Rødseth <rodseth@gmail.com>
# Contributor: Tobias Powalowski <tpowa@archlinux.org>

pkgname=camlp4
pkgver=4.12+1
pkgrel=1
pkgdesc='Caml preprocessor and pretty-printer'
arch=('x86_64')
license=('GPL2')
url='https://github.com/ocaml/camlp4/releases'
depends=('ocaml>=4.12.0')
makedepends=('git' 'ocamlbuild' 'ocaml-compiler-libs')
options=('!makeflags' '!emptydirs' 'staticlibs')
source=("https://github.com/ocaml/camlp4/archive/$pkgver.tar.gz")
sha256sums=('84a53195d916f208b8fd761cbd34cec7882863b94d9df2ce43198d727739cda3')

build() {
  cd "${srcdir}/$pkgname-${pkgver/+/-}"
  ./configure
  make all camlp4/META
}

package() {
  cd "${srcdir}/$pkgname-${pkgver/+/-}"
  make \
    BINDIR="$pkgdir/usr/bin" \
    LIBDIR="$pkgdir/usr/lib/ocaml" \
    PKGDIR="$pkgdir/usr/lib/ocaml" \
    install install-META
}

# vim:set ts=2 sw=2 et:
