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

VERSION=15.4
PROGNAME="cscope $VERSION"
DESC="\
cscope (source code browsing tool)                                     \n\
                                                                       \n\
Cscope is a text screen based source browsing tool.  Although it is    \n\
primarily designed to search C code (including lex and yacc files),    \n\
it can also be used for C++ code.                                      \n\
                                                                       \n\
For more information, see http://cscope.sourceforge.net."

BUILD=1
MAINTAINER="Mark Post <mark.post@eds.com>"
SOURCE=http://cscope.sourceforge.net
PKGNAME=cscope-$VERSION-s390-$BUILD
TAG=OPT

compile() {
   tar -zxvf $CWD/cscope-$VERSION.tar.gz
   cd cscope-$VERSION/
   cp -vp /usr/share/libtool/config.* ./
   chown -R root.root .
   ./configure --prefix=/usr
   make
}

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

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

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

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

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

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

