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

VERSION=2.01.00
PROGNAME="bpe $VERSION"
DESC="\
bpe (Binary Patch Editor)                                              \n\
                                                                       \n\
bpe is a simple, screen-oriented editor for searching and editing      \n\
ordinary files in either ASCII or hexadecimal modes.                   \n\
                                                                       \n\
bpe was written by Andreas Pleschutznig.  Bill Davidsen contributed    \n\
additional features, as did Ralphe Neill (the current maintainer)."

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

compile() {
   tar -zxvf $CWD/bpe-$VERSION.tar.gz
   cd bpe-$VERSION/
   chown -R root.root .
   find . -perm 777 -exec chmod 755 {} \;
   find . -perm 664 -exec chmod 644 {} \;
   cp -vp /usr/share/libtool/config.* support/
   CFLAGS=-O2 \
   ./configure --prefix=/usr
   make
}

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

   mkdir -p /package-bpe/usr/doc/bpe-$VERSION
   cp -a HISTORY LICENSE README-bpe \
       /package-bpe/usr/doc/bpe-$VERSION

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

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

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

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

