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

VERSION=6.1.1
PROGNAME="GNU debugger $VERSION3"
DESC="\
gdb (the GNU symbolic debugger)                                        \n\
                                                                       \n\
The purpose of a debugger such as GDB is to allow you to see what is   \n\
going on "inside" another program while it executes -- or what another \n\
program was doing at the moment it crashed.  GDB can help you catch    \n\
bugs in the act.  You can use GDB to debug programs written in C, C++, \n\
Modula-2, and Fortran 77."

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

compile() {
   tar -yxvf $CWD/gdb-$VERSION.tar.bz2
   cd gdb-$VERSION/
   chown -R root.root .
   ./configure --prefix=/usr s390-slackware-linux
   ( cd readline
     make
   )
   make
}

install() {
   mkdir -p /package-gdb/usr/doc/gdb-$VERSION/gdb
   cp -a COPYING COPYING.LIB README /package-gdb/usr/doc/gdb-$VERSION

   cd gdb/
   cp -a NEWS README TODO /package-gdb/usr/doc/gdb-$VERSION/gdb
   cp -a gdbserver/README /package-gdb/usr/doc/gdb-$VERSION/README.gdbserver

   make install prefix=/package-gdb/usr
   rm /package-gdb/usr/info/stabs.info*
   rm /package-gdb/usr/bin/gdbtui

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

   ( cd /package-gdb/usr/man/man1
     rm -f *.gz gdbtui.1
     gzip -9 *.1
   )
}

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

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

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

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


