summaryrefslogtreecommitdiff
blob: c34ff81f098de471f95b2ff8472751fca2874188 (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
77
78
79
# 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.2_rc3.ebuild,v 1.1 2001/06/23 21:34:37 achim Exp $

P=${PN}-1.2.2rc3
S=${WORKDIR}/${P}
DESCRIPTION="proftpd."
SRC_URI="ftp://ftp.proftpd.org/distrib/${P}.tar.bz2
	 http://www.lastditcheffort.org/aah/src/mod_sql-3.2.2.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}/contrib
    unpack mod_sql-3.2.2.tar.gz
}

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"
    else
      if [ "`use postgres`" ] ; then
    	  modules="$modules:mod_sql:mod_sql_postgres"
	  myinc="/usr/include/postgresql"
      fi
    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/proftp --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/proftp \
	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* contrib/README.mod_sql
     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/proftp
}