diff options
author | William Bowman <wilbowma@indiana.edu> | 2011-08-05 11:11:34 -0300 |
---|---|---|
committer | Niels Horn <niels.horn@slackbuilds.org> | 2011-08-05 11:11:34 -0300 |
commit | bef4f3c03fd2f42dbc028393bc09a88100be5ba1 (patch) | |
tree | 5e77ff66789bb088f476e78341c57ee21842d2eb /academic/coq/coq.SlackBuild | |
parent | 76f24b37e8348f8e1cd835b72fb5a8372786d229 (diff) | |
download | slackbuilds-bef4f3c03fd2f42dbc028393bc09a88100be5ba1.tar.gz |
academic/coq: Added (The Coq Proof Assistant)
Signed-off-by: Niels Horn <niels.horn@slackbuilds.org>
Diffstat (limited to 'academic/coq/coq.SlackBuild')
-rw-r--r-- | academic/coq/coq.SlackBuild | 104 |
1 files changed, 104 insertions, 0 deletions
diff --git a/academic/coq/coq.SlackBuild b/academic/coq/coq.SlackBuild new file mode 100644 index 0000000000..fe4011d7d8 --- /dev/null +++ b/academic/coq/coq.SlackBuild @@ -0,0 +1,104 @@ +#!/bin/sh +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see <http://www.gnu.org/licenses/>. +# +# Slackware build script for coq + +# Written by William Bowman (wilbowma@indiana.edu) + +PRGNAM=coq +VERSION=${VERSION:-8.3pl2} +BUILD=${BUILD:-1} +TAG=${TAG:-_SBo} + +if [ -z "$ARCH" ]; then + case "$( uname -m )" in + i?86) ARCH=i486 ;; + arm*) ARCH=arm ;; + *) ARCH=$( uname -m ) ;; + esac +fi + +CWD=$(pwd) +TMP=${TMP:-/tmp/SBo} +PKG=$TMP/package-$PRGNAM +OUTPUT=${OUTPUT:-/tmp} + +# This is built using the ocaml compiler, not GCC, so SLKCFLAGS are +# not used. +if [ "$ARCH" = "i486" ]; then + LIBDIRSUFFIX="" +elif [ "$ARCH" = "i686" ]; then + LIBDIRSUFFIX="" +elif [ "$ARCH" = "x86_64" ]; then + LIBDIRSUFFIX="64" +else + LIBDIRSUFFIX="" +fi + +set -e + +rm -rf $PKG +mkdir -p $TMP $PKG $OUTPUT +cd $TMP +rm -rf $PRGNAM-$VERSION +tar xvf $CWD/$PRGNAM-$VERSION.tar.gz +cd $PRGNAM-$VERSION +chown -R root:root . +find . \ + \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \ + -exec chmod 755 {} \; -o \ + \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \ + -exec chmod 644 {} \; + + +if hash ocamlopt || hash ocamlopt.opt ; then + OPT="-opt" +else + OPT="" +fi + +./configure \ + -prefix /usr \ + -libdir /usr/lib${LIBDIRSUFFIX}/coq \ + -arch $ARCH \ + $OPT + +make world +umask 022 +COQINSTALLPREFIX=$PKG make install + +find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \ + | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true + +find $PKG/usr/man -type f -exec gzip -9 {} \; +for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done + +mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION +cp -a \ + CHANGES COMPATIBILITY COPYRIGHT CREDITS INSTALL* LICENSE README* \ + $PKG/usr/doc/$PRGNAM-$VERSION +cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild +zcat $CWD/gpl.txt.gz > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM-SlackBuild-license + +mkdir -p $PKG/install +cat $CWD/slack-desc > $PKG/install/slack-desc + +# Delete this if they don't have emacs. I don't like needless things +if [ `which emacs | grep "no emacs"` ]; then + rm -rf $PKG/usr/lib${LIBDIRSUFFIX}/emacs +fi + +cd $PKG +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz} |