/[gentoo-x86]/net-ftp/vsftpd/vsftpd-2.3.2-r1.ebuild
Gentoo

Contents of /net-ftp/vsftpd/vsftpd-2.3.2-r1.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.8 - (hide annotations) (download)
Sun May 13 10:57:37 2012 UTC (2 years, 5 months ago) by swift
Branch: MAIN
Changes since 1.7: +3 -3 lines
SELinux policy module for FTP daemons is provided by selinux-ftp

(Portage version: 2.1.10.49/cvs/Linux x86_64)

1 swift 1.8 # Copyright 1999-2012 Gentoo Foundation
2 hwoarang 1.1 # Distributed under the terms of the GNU General Public License v2
3 swift 1.8 # $Header: /var/cvsroot/gentoo-x86/net-ftp/vsftpd/vsftpd-2.3.2-r1.ebuild,v 1.7 2011/01/21 17:17:45 xarthisius Exp $
4 hwoarang 1.1
5     inherit eutils toolchain-funcs
6    
7     DESCRIPTION="Very Secure FTP Daemon written with speed, size and security in mind"
8     HOMEPAGE="http://vsftpd.beasts.org/"
9     SRC_URI="ftp://vsftpd.beasts.org/users/cevans/${P}.tar.gz"
10    
11     LICENSE="GPL-2"
12     SLOT="0"
13 xarthisius 1.7 KEYWORDS="alpha amd64 arm ia64 ppc ppc64 s390 sh sparc x86 ~x86-fbsd"
14 hwoarang 1.1 IUSE="caps pam tcpd ssl selinux xinetd"
15    
16     DEPEND="caps? ( >=sys-libs/libcap-2 )
17     pam? ( virtual/pam )
18     tcpd? ( >=sys-apps/tcp-wrappers-7.6 )
19     ssl? ( >=dev-libs/openssl-0.9.7d )"
20     RDEPEND="${DEPEND}
21     net-ftp/ftpbase
22 swift 1.8 selinux? ( sec-policy/selinux-ftp )
23 hwoarang 1.1 xinetd? ( sys-apps/xinetd )"
24    
25     src_unpack() {
26     unpack ${A}
27     cd "${S}"
28    
29     # as-needed patch. Bug #335977
30     epatch "${FILESDIR}/${P}-as-needed.patch"
31    
32     # kerberos patch. bug #335980
33     epatch "${FILESDIR}/${P}-kerberos.patch"
34    
35     # Patch the source, config and the manpage to use /etc/vsftpd/
36     epatch "${FILESDIR}/${PN}-2.2.0-gentoo.patch"
37    
38     # Fix building without the libcap
39     epatch "${FILESDIR}/${PN}-2.1.0-caps.patch"
40    
41     # Configure vsftpd build defaults
42     use tcpd && echo "#define VSF_BUILD_TCPWRAPPERS" >> builddefs.h
43     use ssl && echo "#define VSF_BUILD_SSL" >> builddefs.h
44     use pam || echo "#undef VSF_BUILD_PAM" >> builddefs.h
45    
46     # Ensure that we don't link against libcap unless asked
47     if ! use caps ; then
48     sed -i '/^#define VSF_SYSDEP_HAVE_LIBCAP$/ d' sysdeputil.c
49     epatch "${FILESDIR}"/${PN}-2.2.0-dont-link-caps.patch
50     fi
51    
52     # Let portage control stripping
53     sed -i '/^LINK[[:space:]]*=[[:space:]]*/ s/-Wl,-s//' Makefile
54     }
55    
56     src_compile() {
57     emake CFLAGS="${CFLAGS}" CC="$(tc-getCC)" || die
58     }
59    
60     src_install() {
61     into /usr
62     doman vsftpd.conf.5 vsftpd.8 || die "doman failed"
63     dosbin vsftpd || die "disbin failed"
64    
65     dodoc AUDIT BENCHMARKS BUGS Changelog FAQ \
66     README README.security REWARD SIZE \
67     SPEED TODO TUNING || die "dodoc failed"
68     newdoc vsftpd.conf vsftpd.conf.example || die "newdoc failed"
69    
70     docinto security
71     dodoc SECURITY/* || die "dodoc failed"
72    
73     insinto "/usr/share/doc/${PF}/examples"
74     doins -r EXAMPLE/* || die "doins faileD"
75    
76     insinto /etc/vsftpd
77     newins vsftpd.conf vsftpd.conf.example || die "newins failed"
78    
79     insinto /etc/logrotate.d
80     newins "${FILESDIR}/vsftpd.logrotate" vsftpd || die "newins failed"
81    
82     if use xinetd ; then
83     insinto /etc/xinetd.d
84     newins "${FILESDIR}/vsftpd.xinetd" vsftpd || die "newins failed"
85     fi
86    
87     newinitd "${FILESDIR}/vsftpd.init" vsftpd || die "newinitd failed"
88    
89     keepdir /usr/share/vsftpd/empty
90     }
91    
92     pkg_preinst() {
93     # If we use xinetd, then we set listen=NO
94     # so that our default config works under xinetd - fixes #78347
95     if use xinetd ; then
96     sed -i 's/listen=YES/listen=NO/g' "${D}"/etc/vsftpd/vsftpd.conf.example
97     fi
98     }
99    
100     pkg_postinst() {
101     einfo "vsftpd init script can now be multiplexed."
102     einfo "The default init script forces /etc/vsftpd/vsftpd.conf to exist."
103     einfo "If you symlink the init script to another one, say vsftpd.foo"
104     einfo "then that uses /etc/vsftpd/foo.conf instead."
105     einfo
106     einfo "Example:"
107     einfo " cd /etc/init.d"
108     einfo " ln -s vsftpd vsftpd.foo"
109     einfo "You can now treat vsftpd.foo like any other service"
110     }

  ViewVC Help
Powered by ViewVC 1.1.20