#!/bin/sh # my build script for enlightenment function do_cvs() { if [ -f ./e17/CVS/Root ]; then echo "Updating source from CVS" cd ./e17 cvs -z3 update -dP > ../cvs.log 2>&1 cd ../misc cvs -z3 update -dP >>../cvs.log 2>&1 cd ../e_modules cvs -z3 update -dP >>../cvs.log 2>&1 cd ../evidence cvs -z3 update -dP >> ../cvs.log 2>&1 cd .. else echo "Getting source from CVS" echo "Just hit enter for the cvs password!" cvs -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/enlightenment login cvs -z3 -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/enlightenment co e17 > cvs.log 2>&1 cvs -z3 -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/enlightenment co e_modules >> cvs.log 2>&1 cvs -z3 -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/enlightenment co misc>> cvs.log 2>&1 cvs -z3 -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/enlightenment logout echo "Just hit enter for the cvs password!" cvs -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/evidence login cvs -z3 -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/evidence co evidence >> cvs.log 2>&1 fi } function read_doc_from_spec() { FLAG=OFF while read LINE; do echo $LINE | grep ^% > /dev/null && FLAG=OFF [ $FLAG == ON ] && echo $LINE echo $LINE | grep ^%description > /dev/null && FLAG=ON done } function do_build() { if [ -d $1 ]; then CWD=`pwd` cd $1 PNAME=`basename $1` PREL="4vl5" PARCH="i586" echo "" echo "-----------------------------------------" echo Starting to build $PNAME [ -f build.log ] && rm build.log && touch build.log # Since from cvs must autogenerate then do configure [ -f Makefile ] && make clean distclean >> build.log 2>&1 rm backup*.tgz echo Finish Clean [ -x ./autogen.sh ] && ./autogen.sh --prefix=$Build_Dir >> build.log 2>&1 echo Finish AutoGen [ -x ./configure ] && ./configure --prefix=$Build_Dir >> build.log 2>&1 echo Finish Configuration # Get the version from the Makefile a=`grep ^VERSION Makefile` ; PVERS=${a##VERSION = } # Get the description in the spec file if it exists DESCFILE=description-pak [ -f $DESCFILE ] && rm $DESCFILE echo $PNAME for Enlightenment > $DESCFILE [ -f $PNAME.spec ] && read_doc_from_spec < $PNAME.spec >> $DESCFILE ## Add other information echo "" >> $DESCFILE echo "-------------------------------------" >> $DESCFILE echo "BUILDDATE > " `date +"%b %d, %Y"`>> $DESCFILE echo "HOST > " `uname -mrs` >> $DESCFILE echo "DISTRO > " `distrorelease` >> $DESCFILE echo "CFLAGS > $CFLAGS" >> $DESCFILE echo "Packager > $PACKAGER" >> $DESCFILE echo "Prefix > $Build_Dir" >> $DESCFILE # Temporarily rename spec file since checkinstall tries # to get version from this fileand messes up [ $PNAME == "e" ] && mv enlightenment.spec e.spec [ -f $PNAME.spec ] && mv $PNAME.spec $PNAME.ceps # Make and install package make >> build.log 2>&1 && echo Finish Make && checkinstall --install=yes \ --pkglicense=3_Clause_BSD \ --pkgname=$PNAME \ --pkgarch=$PARCH \ --pkgrelease=$PREL \ --pkgversion=$PVERS \ --pakdir=$CWD -y >> build.log 2>&1 && echo Finish CheckInstall [ $PNAME == "e" ] && mv e.ceps enlightenment.spec [ -f $PNAME.ceps ] && mv $PNAME.ceps $PNAME.spec cd $CWD echo Finished building $PNAME fi } function do_install() { PKG=`basename $1` PKG=`ls $PKG-*.tgz` && installpkg $PKG } function do_remove() { PKG=`basename $1` removepkg $PKG } order=" e17/libs/edb e17/libs/eet e17/libs/evas e17/libs/ecore e17/libs/embryo e17/libs/edje e17/libs/imlib2 e17/libs/epeg e17/libs/epsilon e17/libs/esmart e17/libs/emotion e17/libs/ewl e17/libs/engrave e17/libs/imlib2_loaders e17/libs/etox e17/apps/entice e17/apps/entrance e17/apps/eclair e17/apps/e misc/engage misc/erss e17/apps/e_utils e_modules e17/apps/elicit misc/embrace evidence misc/equate e17/apps/examine e17/apps/evfs misc/enotes" CMD_line=$1 Build_Dir=/usr/X11R6 export PATH=$PATH:$Build_Dir"/bin" export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$Build_Dir"/lib" export CPPFLAGS="$CPPFLAGS -I$Build_Dir/include -liconv" export LDFLAGS="$LDFLAGS -L$Build_Dir/lib -liconv" export CFLAGS="-O2 -mcpu=i586 -march=i586" export CXXFLAGS="$CFLAGS" export NOCONFIGURE=TRUE PACKAGER="JohnVan" case $CMD_line in -h | --help) echo "--cvs to get code from cvs into this directory" echo "--install to install e17 packages from this diresctory" echo "--build to build packages from source" echo "--remove to remove e17 packages via removepkg" ;; --cvs|--CVS) do_cvs grep -v ^cvs cvs.log | grep -v ^? | less ;; --install) for FILE in $order; do do_install $FILE done ;; --build) for FILE in $order; do time do_build $FILE echo "-----------------------------------------" done ;; --remove) for FILE in $order; do do_remove $FILE done ;; *) for FILE in $CMD_line; do time do_build $FILE echo "-----------------------------------------" done ;; esac