#!/bin/bash NAME=ocaml VERSION=3.12.1 CWD=`pwd` TMP="/tmp" PKGTMP="$TMP/pkgtmp" mkdir $PKGTMP &>/dev/null tar -xjf $NAME-$VERSION.tar.bz2 || exit 1 cd $NAME-$VERSION || exit 1 # ./setup.py install --root $PKGTMP || exit 1 ./configure --prefix /usr || exit 1 make -j1 world || exit 1 make -j1 bootstrap || exit 1 make -j1 opt || exit 1 make -j1 opt.opt || exit 1 make -j1 PREFIX=/tmp/pkgtmp/usr install || exit 1 cd $PKGTMP makepkg -l y -c n $CWD/$NAME.pkg echo $VERSION > $CWD/$NAME.version && arch > $CWD/$NAME.arch