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

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

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

package() {
  cd "${srcdir}/$pkgname-${pkgver}-1"
  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:
