diff options
author | fdeak <ferenc.deak@gmail.com> | 2010-05-11 14:05:52 +0200 |
---|---|---|
committer | Michiel van Wessem <michiel@slackbuilds.org> | 2010-05-11 14:05:52 +0200 |
commit | 0b0d89f0f2feb05e89557e1beb98cf24f7bcb1a5 (patch) | |
tree | 374a15d5f03ac845e5e996ac4bf97b189569e0b2 /development/ocaml/ocaml.SlackBuild | |
parent | 7656a7c3be1d13f4c31af4dae34c06a2e160fa87 (diff) | |
download | slackbuilds-0b0d89f0f2feb05e89557e1beb98cf24f7bcb1a5.tar.gz |
development/ocaml: Initial import
Diffstat (limited to 'development/ocaml/ocaml.SlackBuild')
-rw-r--r-- | development/ocaml/ocaml.SlackBuild | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/development/ocaml/ocaml.SlackBuild b/development/ocaml/ocaml.SlackBuild new file mode 100644 index 0000000000..3cd0855c83 --- /dev/null +++ b/development/ocaml/ocaml.SlackBuild @@ -0,0 +1,59 @@ +#!/bin/sh + +# Slackware build script for ocaml + +# Written by fdeak <ferenc.deak@gmail.com> + +set -e + +PRGNAM=ocaml +VERSION=3.09.3 +ARCH=${ARCH:-i486} +BUILD=${BUILD:-1} +TAG=${TAG:-_SBo} +CWD=$(pwd) +TMP=${TMP:-/tmp/SBo} +PKG=$TMP/package-$PRGNAM +OUTPUT=${OUTPUT:-/tmp} + +if [ "$ARCH" = "i486" ]; then + SLKCFLAGS="-O2 -march=i486 -mtune=i686" +elif [ "$ARCH" = "i686" ]; then + SLKCFLAGS="-O2 -march=i686 -mtune=i686" +fi + +rm -rf $PKG +mkdir -p $TMP $PKG $OUTPUT +cd $TMP +rm -rf $PRGNAM-$VERSION +tar xjf $CWD/$PRGNAM-$VERSION.tar.bz2 +cd $PRGNAM-$VERSION +chown -R root:root . +chmod -R u+w,go+r-w,a-s . + +./configure --prefix /usr +sed -i -e "s/\\(BYTECCCOMPOPTS=.*\\)/\\1 ${SLKCFLAGS}/" config/Makefile +sed -i -e "s/\\(NATIVECCCOMPOPTS=.*\\)/\\1 ${SLKCFLAGS}/" config/Makefile +make world.opt +make PREFIX=$PKG/usr install + +( cd $PKG + find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null + find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null +) + +( cd $PKG/usr/man + find . -type f -exec gzip -9 {} \; + for i in $(find . -type l) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done +) + +mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION +cp -a INSTALL LICENSE README Changes $PKG/usr/doc/$PRGNAM-$VERSION +cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild + +mkdir -p $PKG/install +cat $CWD/slack-desc > $PKG/install/slack-desc + +cd $PKG +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.tgz + |