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

Contents of /net-ftp/vsftpd/vsftpd-3.0.0.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


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

(Portage version: 2.1.10.49/cvs/Linux x86_64)

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

  ViewVC Help
Powered by ViewVC 1.1.20