#!/bin/bash ###################################################### # freebasic compiler lzm package for SLAX 6 # # # # Packed by Arnel A. Borja, galeon@ymail.com # # # # Package home http://freebasic.net # # # # November 27, 2010 # ###################################################### ###################################################### # NOTE: # # * This script requires the freebasic module # # * This script requires the FreeBASIC source in # # the current directory, automatically downloaded # # otherwise # ###################################################### ### Set up Variables ### VERSION=0.21.1 SRCNAM=FreeBASIC-$VERSION-source.tar.lzma WRKDIR=FreeBASIC-$VERSION-source MODNAM=freebasic-$VERSION TMPDIR=/tmp/freebasic ### Compile for SLAX ### rm -rf $TMPDIR rm -rf $WRKDIR wget -N http://nchc.dl.sourceforge.net/project/fbc/Source%20Code/FreeBASIC%20$VERSION/$SRCNAM tar -xf $SRCNAM cd $WRKDIR cd src/rtlib/obj/linux CFLAGS="-O3 -march=i486 -mtune=i686" ../../configure --prefix=/usr --build=i486-Slackware-linux make make MULTITHREADED=1 make install cd ../../../gfxlib2/obj/linux CFLAGS="-O3 -march=i486 -mtune=i686" ../../configure --prefix=/usr --build=i486-Slackware-linux make make install cd ../../../compiler/obj/linux CFLAGS="-O3 -march=i486 -mtune=i686" ../../configure --prefix=/usr --build=i486-Slackware-linux make make install cd ../../../.. mkdir $TMPDIR mkdir $TMPDIR/usr mkdir $TMPDIR/usr/man mkdir $TMPDIR/usr/man/man1 mkdir $TMPDIR/usr/share ./install.sh -i $TMPDIR/usr cd .. ### Remove unneeded files ### rm -rf $TMPDIR/usr/include/freebasic/dos rm -rf $TMPDIR/usr/include/freebasic/win rm -f $TMPDIR/usr/include/freebasic/windows.bi rm -rf $TMPDIR/usr/share/freebasic/examples/DOS rm -rf $TMPDIR/usr/share/freebasic/examples/Windows ### Copy SLAX files to the package ### mkdir -p $TMPDIR/usr/src/slaxbuilds cp $0 $TMPDIR/usr/src/slaxbuilds ### Adjust Directory Access Rights ### find $TMPDIR/ -type d | xargs chmod -v 755; ### Uncompress man pages ### find $TMPDIR/usr/man/ -type l -name "*.gz" | xargs -r gunzip -f find $TMPDIR/usr/man ! -type l -name "*.gz" | xargs -r gunzip dir2lzm $TMPDIR $MODNAM.lzm ### House keeping ### rm -rf $WRKDIR rm -rf $TMPDIR # EOF