1 # Maintainer: Sergei Lebedev <superbobry@gmail.com>
2 # Contributor: Nicolas Pouillard <nicolas.pouillard@gmail.com>
3 # Contributor: Sylvester Johansson <scj(at)archlinux(dot)us>
7 pkgdesc="zip and gzip library for ocaml"
9 url="http://cristal.inria.fr/~xleroy/software.html#camlzip"
11 depends=('ocaml' 'zlib')
12 makedepends=('ocaml-findlib')
14 source=(http://forge.ocamlcore.org/frs/download.php/328/camlzip-$pkgver.tar.gz
15 http://sources.gentoo.org/viewcvs.py/*checkout*/gentoo-x86/dev-ml/camlzip/files/camlzip-1.03-Makefile-findlib.patch?rev=1.2
16 http://sources.gentoo.org/viewcvs.py/*checkout*/gentoo-x86/dev-ml/camlzip/files/META)
17 md5sums=('b3930f4f2e2563b9a5e1b17aa455e635'
18 '0e0f9c6860c23f4efef72563969188dd'
19 '357f403e3152810089ea2f7bb86bf77d')
22 cd "$srcdir/camlzip-$pkgver"
24 cp ../camlzip-1.03-Makefile-findlib.patch?rev=1.2 makefile.patch
25 sed -ie 's|$(OCAMLFIND) install camlzip|$(OCAMLFIND) install $(OCAMLFIND_INSTFLAGS) zip|' makefile.patch || return 1
26 patch -i makefile.patch || return 1
28 ln -s $startdir/META META
29 sed -ie 's|version=.*|version="'$pkgver'"|' META || return 1
31 make all allopt || return 1
35 cd "$srcdir/camlzip-$pkgver"
37 export OCAMLFIND_DESTDIR="$pkgdir$(ocamlfind printconf destdir)"
38 export OCAMLFIND_LDCONF="ignore"
40 mkdir -p "$OCAMLFIND_DESTDIR/stublibs"
41 make install || return 1
42 install -Dm 644 LICENSE $pkgdir/usr/share/licenses/$pkgname/LICENSE