You are not logged in.

#1 2005-03-03 22:31:58

cmp
Member
Registered: 2005-01-03
Posts: 350

[NEW] smarteiffel 2.1

While I'm afraid nobody at this forums is using eiffel, I still post my PKGBUILD for smarteiffel, the GNU eiffel compiler. The PKGBUILD looks a bit weird, because the install method enforced by smareiffel is quite weird, too.
If you have any comments, feel free to post them.
I'm quite sure that I missed certain dependencies, but I don't know which. I did only a quick test with the supplied tutorial files, which worked for me.

btw.: Does anybody know how to add a directory to the PATH enviroment variable? This should be done, but I didn't know how to do it.

edit: added the profile script

PKGBUILD:

# comments: the PKGBUILD does take care of the automaticly created ~/.serc file

pkgname=smarteiffel
pkgver=2.1
fakever=2-1
fakename=SmartEiffel
pkgrel=2
pkgdesc="The GNU Eiffel Compiler"
url="http://smarteiffel.loria.fr"
license="GPL"
depends=(gcc)
makedepends=(gcc)
source=($fakename-$fakever.tgz $pkgname.sh) 

build() {
    SRC=$startdir/src/$fakename
    BASEDIR=$startdir/pkg/opt/$pkgname
    
    # back up ~/.serc file
    if [ -f ~/.serc ]
    then
        mv ~/.serc $startdir/serc.bak
    fi
    
    # build the smarteiffel package
    cd $SRC
    make
    
    # modify the ~/.serc file and copy it to the pkg
    mv ~/.serc $BASEDIR/serc.example
    sed -i "s#$SRC#/opt/$pkgname#" $BASEDIR/serc.example
    
    # restore the old ~/.serc
    if [ -f $startdir/serc.bak ]
    then  
        mv $startdir/serc.bak ~/.serc
    fi
    
    # copy all files by 'hand' to the pkg dir
    # do not copy tutorials and the smarteiffel tools source
    mkdir -p $BASEDIR
    mkdir -p $BASEDIR/bin
    mkdir -p $BASEDIR/sys
    mkdir -p $BASEDIR/lib
    mkdir -p $BASEDIR/short
    
    cp -r $SRC/bin/* $BASEDIR/bin
    cp -r $SRC/sys/* $BASEDIR/sys
    cp -r $SRC/lib/* $BASEDIR/lib
    cp -r $SRC/short/* $BASEDIR/short
    
    # copy the profile script
    mkdir -p $startdir/pkg/etc/profile.d/
    install $startdir/src/$pkgname.sh $startdir/pkg/etc/profile.d/
}

smarteiffel.sh

export PATH=$PATH:/opt/smarteiffel/bin

Offline

#2 2005-03-03 22:39:49

Dusty
Schwag Merchant
From: Medicine Hat, Alberta, Canada
Registered: 2004-01-18
Posts: 5,986
Website

Re: [NEW] smarteiffel 2.1

cmp wrote:

btw.: Does anybody know how to add a directory to the PATH enviroment variable? This should be done, but I didn't know how to do it.

Mimic one of the scripts in /etc/profile.d

Dusty

Offline

#3 2005-03-03 22:45:15

cmp
Member
Registered: 2005-01-03
Posts: 350

Re: [NEW] smarteiffel 2.1

thank, I'll add this tomorrow.

Offline

#4 2005-03-04 18:45:23

cmp
Member
Registered: 2005-01-03
Posts: 350

Re: [NEW] smarteiffel 2.1

I updated the PKGBUILD. The only thing worth thinking about would be supplying a sample serc file directly and just ignore the created ~/.serc file, because for me there were some issues with this file, but I don't know how to resolve them.

Offline

Board footer

Powered by FluxBB