#!/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 apr, apr-util, subversion # # and freebasic modules # # * This script might not be fully non-interactive; # # svn might not accept the server certificate of # # SourceForge.Net # ###################################################### ### Set up Variables ### VERSION=svn-`date +%Y%m%d` SRCNAM=https://fbc.svn.sourceforge.net/svnroot/fbc/trunk/FreeBASIC WRKDIR=FreeBASIC-$VERSION MODNAM=freebasic-$VERSION TMPDIR=/tmp/freebasic ### Compile for SLAX ### rm -rf $TMPDIR rm -rf $WRKDIR mkdir $WRKDIR cd $WRKDIR svn checkout $SRCNAM . 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 find $TMPDIR -depth -type d -name ".svn" -exec rm -rf '{}' \; ### 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