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

VERSION=0.8.3
PROGNAME="libidl $VERSION"
DESC="\
libIDL                                                                 \n\
                                                                       \n\
libIDL is a library licensed under the GNU LGPL for creating trees of  \n\
CORBA Interface Definition Language (IDL) files, which is a            \n\
specification for defining portable interfaces.  libIDL was initially  \n\
written for ORBit (the ORB from the GNOME project, and the primary     \n\
means of libIDL distribution)."

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

compile() {
   tar -yxvf $CWD/libIDL-$VERSION.tar.bz2
   cd libIDL-$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-libidl

   mkdir -p /package-libidl/usr/doc/libIDL-$VERSION
   cp -a AUTHORS BUGS COPYING HACKING MAINTAINERS NEWS README \
       /package-libidl/usr/doc/libIDL-$VERSION

   ( cd /package-libidl/usr/info
     rm -f *.gz
     gzip -9 *
   )

   rm -f /package-libidl/usr/lib/libIDL-2.a
}

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

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

   cd $CTL
   cat $CWD/slack-desc > slack-desc
   sed -e 's%package-libidl/%%g' doinst.sh > doinst.sh.new
   cat doinst.sh.new > doinst.sh
   rm doinst.sh.new
}

