summaryrefslogtreecommitdiffstats
path: root/net-ftp/bsdftpd-ssl/bsdftpd-ssl-1.0.2-r2.ebuild
blob: 2748a8a50defab52b8ed66491836b4fd33c10f8a (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
# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: 

inherit eutils

DESCRIPTION="BSD SSL enabled FTP server"
SRC_URI="http://dside.dyndns.org/files/darklin/bsdftpd-ssl-1.0.2.tar.bz2"
SLOT="0"
LICENSE="GPL-2"
KEYWORDS="amd64 x86"
RDEPEND="sys-libs/ncurses dev-util/byacc"

src_unpack() {
    unpack ${P}.tar.bz2
    EPATCH_OPTS="-p1 -d ${P}" epatch ${FILESDIR}/bsdftpd-ds-keypassword.patch.bz2
    EPATCH_OPTS="-p1 -d ${P}" epatch ${FILESDIR}/bsdftpd-ds-extprog.patch.bz2
    EPATCH_OPTS="-p1 -d ${P}" epatch ${FILESDIR}/bsdftpd-ds-anonymous.patch.bz2
    EPATCH_OPTS="-p1 -d ${P}" epatch ${FILESDIR}/bsdftpd-ds-pport.patch.bz2
    EPATCH_OPTS="-p1 -d ${P}" epatch ${FILESDIR}/bsdftpd-ds-termcap.patch.bz2
    EPATCH_OPTS="-p1 -d ${P}" epatch ${FILESDIR}/bsdftpd-ds-compile.patch
    EPATCH_OPTS="-p1 -d ${P}" epatch ${FILESDIR}/bsdftpd-ds-argmax.diff
    EPATCH_OPTS="-p1 -d ${P}" epatch ${FILESDIR}/bsdftpd-ds-cmdtab.diff
    EPATCH_OPTS="-p1 -d ${P}" epatch ${FILESDIR}/bsdftpd-ds-getline.diff
}

src_compile() {
    ./config.sh Linux
    make || die
}

src_install() {
    into /usr
    mkdir -p ${D}/usr/bin/
    mkdir -p ${D}/usr/sbin
    make install DESTDIR=${D} INSTALLTOP=${D}/usr
    mkdir -p ${D}/etc/init.d/
    mkdir -p ${D}/etc/conf.d/
    mkdir -p ${D}/etc/pam.d/

    install -m 0755 ${FILESDIR}/bsdftpd.sysinit ${D}/etc/init.d/bsdftpd
    install -m 0644 ${FILESDIR}/bsdftpd.sysconfig ${D}/etc/conf.d/bsdftpd
    install -m 0644 ${FILESDIR}/bsdftpd.pam ${D}/etc/pam.d/ftpd
    install -m 0755 ${FILESDIR}/auth.sslftp ${D}/usr/bin
    install -m 0644 ${FILESDIR}/x509.auth ${D}/etc
}