#Packager: Shador pkgname=ocaml pkgver=3.11.2 pkgrel=1ab #arch=x86_64 source=("http://caml.inria.fr/pub/distrib/ocaml-3.11/ocaml-3.11.2.tar.bz2" "http://gaia.homelinux.org/salix/packages-x86_64/$pkgname/$pkgver/install.patch") sourcetemplate="http://gaia.homelinux.org/salix/packages-x86_64/$pkgname/$pkgver/" docs=("readme" "install" "license" "changes" "upgrading" "version") url='http://caml.inria.fr/' slackdesc=\ ( #|-----handy-ruler------------------------------------------------------| "$pkgname (Objective Caml system)" "The Objective Caml system is the main implementation of the Caml" "language. It features a powerful module system and a full-fledged" "object-oriented layer. It comes with a native-code compiler that" "supports numerous architectures, for high performance; a bytecode" "compiler, for increased portability; and an interactive loop, for" "experimentation and rapid development." ) build() { threadcount=$(($(sed -ne '/cpu cores/h;${g;s/[^0-9]*//p}' \ < /proc/cpuinfo)*2)) if [ $threadcount -lt 2 ]; then threadcount=2 elif [ $threadcount -gt 8 ]; then threadcount=8 fi #threads="-j${threadcount}" cd $startdir/src/$pkgname-$pkgver PREFIX=/usr DESTDIR=$startdir/pkg patch -p1 -i $startdir/src/install.patch configure \ --prefix ${PREFIX} \ --libdir ${PREFIX}/lib${LIBDIRSUFFIX}/ocaml \ --mandir ${PREFIX}/man make $threads world.opt || return 1 sed -e 's,\(PREFIX\|BINDIR\|LIBDIR\|STUBLIBDIR\|MANDIR\)=\([^\$]\),\1='$DESTDIR'\2,' -i config/Makefile make install }