summaryrefslogtreecommitdiff
blob: 843b1487304232b0a11723c43f096ab0fd6f7ebb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
# Copyright 1999-2000 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License, v2 or later
# Author Jerry Alexandratos <jerry@gentoo.org>
# Modified by $HOME/.maildir by Craig Joly <craig@taipan.mudshark.org>
# $Header: /var/cvsroot/gentoo-x86/net-mail/procmail/procmail-3.22-r1.ebuild,v 1.1 2002/05/04 01:15:49 jhhudso Exp $

S=${WORKDIR}/${P}
DESCRIPTION="Mail delivery agent/filter"
SRC_URI="http://www.procmail.org/${P}.tar.gz"
HOMEPAGE="http://www.procmail.org/"

DEPEND="virtual/glibc
        virtual/mta"

src_compile() {

    cp Makefile Makefile.orig
    sed -e "s:CFLAGS0 = -O:CFLAGS0 = ${CFLAGS}:" \
        -e "s:LOCKINGTEST=__defaults__:#LOCKINGTEST=__defaults__:" \
        -e "s:#LOCKINGTEST=/tmp:LOCKINGTEST=/tmp:" Makefile.orig > Makefile

    if [ -z "`use mbox`" ];
    then
	cd ${S}/src
	cp authenticate.c authenticate.c.orig
	sed -e "s:/\*#define MAILSPOOLHOME \"/.mail\":#define MAILSPOOLHOME \"/.maildir/\":" authenticate.c.orig > authenticate.c
	cd ${S}
    fi

    emake || die
}

src_install () {
    cd ${S}/new
    insinto /usr/bin
    insopts -m 6755
    doins procmail

    insopts -m 2755
    doins lockfile

    dobin formail mailstat

    doman *.1 *.5

    cd ${S}
    dodoc Artistic COPYING FAQ FEATURES HISTORY INSTALL KNOWN_BUGS README

	docinto examples
	dodoc examples/*
}