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

VERSION=4.2.0
PROGNAME="getmail $VERSION"
DESC="\
getmail (POP3 mail retriever)                                          \n\
                                                                       \n\
getmail is a POP3 mail retriever, with support for both ordinary and   \n\
domain (or multidrop) POP3 mailboxes.  It is written in Python, and    \n\
licensed under the GNU General Public License version 2.               \n\
                                                                       \n\
getmail was written by Charles Cazabon."

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

compile() {
   tar -zxvf $CWD/getmail-$VERSION.tar.gz
   chown -R root.root getmail-$VERSION
   cd getmail-$VERSION
   python setup.py build
}

install() {
   python setup.py install --root=/package-getmail

   ( cd /package-getmail/usr/share
     mv man ..
     mv doc ..
     cd ..
     rmdir share
   )

   gzip -9 /package-getmail/usr/man/man1/*
}

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

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

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

