# Maintainer: Thomas S Hatch <thatch45 at gmail dot com>
# Contributor: Kostas Andreadis <kmandreadis@gmail.com>
# Contributor: Sergei Lebedev <superbobry@gmail.com>
pkgname=ocaml-calendar
pkgver=2.03.1
pkgrel=1
pkgdesc="OCaml library managing dates and times"
arch=('i686' 'x86_64')
url="http://forge.ocamlcore.org/forum/forum.php?forum_id=293"
license=('LGPL')
depends=('ocaml')
makedepends=('ocaml-findlib')
source=(http://forge.ocamlcore.org/frs/download.php/605/calendar-$pkgver.tar.gz)
md5sums=('8f14a2c7d84e4caf03099b049716d728')
options=('!strip')
OCAMLFIND_DESTDIR=$pkgdir$(ocamlfind printconf destdir)
build() {
cd "$srcdir/calendar-$pkgver"
./configure --prefix=/usr
make
}
package() {
cd "$srcdir/calendar-$pkgver"
mkdir -p $OCAMLFIND_DESTDIR
make OCAMLFIND_DESTDIR=$OCAMLFIND_DESTDIR install
install -Dm 644 COPYING $pkgdir/usr/share/licenses/$pkgname/LICENSE
# Fix the broken META file
sed -i 's/calendarLib.cmo\ //' $OCAMLFIND_DESTDIR/calendar/META
sed -i 's/calendarLib.cmx\ //' $OCAMLFIND_DESTDIR/calendar/META
}