# $Id: PKGBUILD 232952 2015-03-06 16:52:56Z foutrelis $
# Maintainer: Evangelos Foutras <evangelos@foutrelis.com>
# Contributor: Armin K. <krejzi at email dot com>

pkgname=ocaml-ctypes
pkgver=0.3.4
pkgrel=2
pkgdesc="Library for binding to C libraries using pure OCaml"
arch=('i686' 'x86_64')
url="https://github.com/ocamllabs/ocaml-ctypes"
license=('MIT')
depends=('ocaml' 'libffi')
makedepends=('ocaml-findlib')
options=('!strip' '!makeflags')
source=($pkgname-$pkgver::https://github.com/ocamllabs/ocaml-ctypes/archive/$pkgver.tar.gz)
sha256sums=('95b3c21a0348d9e17a30d834926e17e39447e58fe31a9a49e6d0289a0fcd3c43')

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

package() {
  cd "$srcdir/$pkgname-$pkgver"

  local _destdir="$pkgdir$(ocamlfind printconf destdir)"
  install -d "$_destdir/stublibs"

  make OCAMLFIND_DESTDIR="$_destdir" install

  install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}

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