summaryrefslogtreecommitdiff
blob: e8ada6b3e7f1a3d5cacf59af0a2e1b579738e352 (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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
# Copyright 1999-2000 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License, v2 or later
# Author Achim Gottinger <achim@gentoo.org>
# $Header: /var/cvsroot/gentoo-x86/net-ftp/proftpd/proftpd-1.2.1.ebuild,v 1.3 2001/07/20 18:00:06 jerry Exp $

S=${WORKDIR}/${P}
DESCRIPTION="proftpd."
SRC_URI="ftp://ftp.proftpd.org/distrib/${P}.tar.bz2
     http://www.lastditcheffort.org/aah/src/mod_sql-3.1.5.patch.tar.gz"
HOMEPAGE="http://www.proftpd.net/"

DEPEND="virtual/glibc
    pam? ( >=sys-libs/pam-0.75 )
    mysql? ( >=dev-db/mysql-3.23.26 )
    ldap? ( >=net-nds/openldap-1.2.11 )
    postgres? ( >=dev-db/postgresql-7.1 )"


src_unpack() {
    unpack ${P}.tar.bz2
    cd ${S}
    gzip -dc ${DISTDIR}/mod_sql-3.1.5.patch.tar.gz | patch -p0
}

src_compile() {                           
    local modules
    local myinc
    modules="mod_ratio:mod_readme:mod_linuxprivs"

    if [ "`use pam`" ]; then
        modules="$modules:mod_pam"
    fi

    if [ "`use mysql`" ]; then
        modules="$modules:mod_sql:mod_sql_mysql"
    elif [ "`use postgres`" ]; then
        modules="$modules:mod_sql:mod_sql_postgres"
        myinc="/usr/include/postgresql"
    fi

    if [ "`use ldap`" ]; then
        modules="$modules:mod_ldap"
    fi

    if [ "$myinc" ]; then
        myinc="--with-includes=$myinc"
    fi
    
    ./configure --host=${CHOST} --prefix=/usr --sbindir=/usr/sbin \
        --sysconfdir=/etc/proftpd --localstatedir=/var/run \
        --mandir=/usr/share/man --with-modules=$modules \
        --disable-sendfile --enable-shadow --enable-autoshadow $myinc

    try make
}

src_install() {                               
    try make install prefix=${D}/usr sysconfdir=${D}/etc/proftpd \
        mandir=${D}/usr/share/man localstatedir=${D}/var/run \
        sbindir=${D}/usr/sbin

    into /usr
    dodir /home/ftp
    dobin contrib/genuser.pl
    dodoc COPYING CREDITS ChangeLog NEWS
    dodoc README*
    cd doc
    dodoc API Changes-1.2.0pre3 license.txt GetConf ShowUndocumented
    dodoc Undocumented.txt development.notes 
    docinto html
    dodoc *.html
    docinto rfc
    dodoc rfc/*.txt

    cp ${FILESDIR}/proftpd.conf ${D}/etc/proftpd
}