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

VERSION=1.5.6
PROGNAME="GNU libtool $VERSION"
DESC="\
libtool (a generic library support script)                             \n\
                                                                       \n\
This is GNU Libtool, a generic library support script. Libtool hides   \n\
the complexity of using shared libraries behind a consistent, portable \n\
interface.  To use libtool, add the new generic library building       \n\
commands to your Makefile, Makefile.in, or Makefile.am.  See the       \n\
documentation for details.                                             \n\
                                                                       \n\
You must install the "m4" package to be able to use libtool."

BUILD=1
MAINTAINER="Mark Post <mark.post@eds.com>"
SOURCE=ftp://ftp.gnu.org/gnu/libtool/
PKGNAME=libtool-$VERSION-s390-$BUILD
TAG=OPT

compile() {
   tar -yxvf $CWD/libtool-$VERSION.tar.bz2
   cd libtool-$VERSION/
   chown -R root.root .
   CC=gcc \
   LTCC=gcc \
   CFLAGS=-O2 \
   ./configure --prefix=/usr \
               --build=s390-slackware-linux \
               --host=s390-slackware-linux \
               --target=s390-slackware-linux

   make
}

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

   mkdir -p /package-libtool/usr/doc/libtool-$VERSION
   cp -a AUTHORS COPYING INSTALL NEWS README THANKS TODO \
       /package-libtool/usr/doc/libtool-$VERSION

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

#  rm -rf /package-libtool/usr/share/libtool/libltdl/
}

attributes() {
   chown -R root.bin $PKG/package-libtool/usr/bin/
   chmod 644 $PKG/package-libtool/usr/doc/libtool-$VERSION/*
#  chmod 644 $PKG/package-libtool/usr/doc/libtool-$VERSION/COPYING \
#            $PKG/package-libtool/usr/doc/libtool-$VERSION/INSTALL
}

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

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

