IGNOREPATH=/home:/etc:/var:/dev:/boot:/root:/tmp:/usr/local:/bin:/sbin:/mnt:/usr/src
STRIPLIB=y
STRIPBIN=y

VERSION=2.8.1
PROGNAME="ORBit $VERSION"
DESC="\
orbit2                                                                 \n\
                                                                       \n\
ORBit is a high-performance CORBA (Common Object Request Broker        \n\
Architecture) ORB (object request broker).  It allows programs to      \n\
send requests and receive replies from other programs, regardless      \n\
of the locations of the two programs.  CORBA is an architecture that   \n\
enables communication between program objects, regardless of the       \n\
programming language they're written in or the operating system they   \n\
run on."

BUILD=1
MAINTAINER="Mark Post <mark.post@eds.com>"
SOURCE=ftp://ftp.gnome.org/pub/gnome/sources/ORBit2/
PKGNAME=orbit2-$VERSION-s390-$BUILD
TAG=OPT

compile() {
   tar -yxvf $CWD/ORBit2-$VERSION.tar.bz2
   cd ORBit2-$VERSION
   chown -R root.root .
   find . -perm 666 -exec chmod 644 {} \;
   find . -perm 664 -exec chmod 644 {} \;
   CFLAGS=-O2 \
   ./configure --prefix=/usr \
               --sysconfdir=/etc \
               --localstatedir=/var/lib \
               --build=s390-slackware-linux \
               --host=s390-slackware-linux \
               --target=s390-slackware-linux
   make
}

install() {
   make install DESTDIR=/package-orbit2

   mkdir -p /package-orbit2/usr/doc/ORBit2-$VERSION
   cp -a AUTHORS COPYING HACKING MAINTAINERS NEWS README \
       /package-orbit2/usr/doc/ORBit2-$VERSION
}

attributes() {
   chown -R root.bin $PKG/package-orbit2/usr/bin/
}

special() {
   cd $PKG
   mv package-orbit2/* ./
   rmdir package-orbit2/

   cd $CTL
   cat $CWD/slack-desc > slack-desc

   sed -e 's%package-orbit2/%%g' doinst.sh > doinst.sh.new
   cat doinst.sh.new > doinst.sh
   rm doinst.sh.new
}

