#!/bin/sh

VERSION=5.8.6
BUILD=1
ARCH=i386

PKGNAME=ftchmail-$VERSION-$ARCH-$BUILD

PROGNAME="ftchmail"

DESC="\
fetchmail is a mail-retrieval and forwarding utility.  It fetches     \n\
mail from a POP, IMAP, or ETRN-capable remote mailserver and forwards \n\
it to your local (client) machine's delivery system.  You can then    \n\
handle the retrieved mail using normal mail user agents such as elm,  \n\
pine, or Mail.  The fetchmail utility can be run in a daemon mode to  \n\
repeatedly poll one or more systems at a specified interval."

MAINTAINER="Logan Johnson <logan@slackware.com>"
SOURCE=http://www.tuxedo.org/~esr/fetchmail
LOCATION=

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

TAG=OPT

compile() {
   tar -xvzf $CWD/fetchmail-$VERSION.tar.gz
   cd fetchmail-$VERSION/
   ./configure --prefix=/usr --enable-nls --with-ssl $ARCH-slackware-linux
   make CFLAGS=-O2 LDFLAGS=-s
}

install() {
   make install
   rm -f /usr/man/man1/fetchmailconf.1

   mkdir -p /usr/doc/fetchmail-$VERSION
   cp -a ABOUT-NLS COPYING FAQ FEATURES INSTALL MANIFEST NEWS NOTES README \
         *.html contrib fetchmail.lsm \
         /usr/doc/fetchmail-$VERSION
   chown -R root.root /usr/doc/fetchmail-$VERSION

   cd /usr/man/man1
   ln -sf fetchmail.1.gz fetchmailconf.1.gz
}
