1 |
commit: 4b1177c541366e90ee857c23e7ed7e7f9df058fa |
2 |
Author: Lars Wendler <polynomial-c <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue Mar 26 00:00:20 2019 +0000 |
4 |
Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Mar 26 00:04:08 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4b1177c5 |
7 |
|
8 |
net-ftp/pure-ftpd: Added live ebuild. |
9 |
|
10 |
Package-Manager: Portage-2.3.62, Repoman-2.3.12 |
11 |
Signed-off-by: Lars Wendler <polynomial-c <AT> gentoo.org> |
12 |
|
13 |
net-ftp/pure-ftpd/pure-ftpd-9999.ebuild | 143 ++++++++++++++++++++++++++++++++ |
14 |
1 file changed, 143 insertions(+) |
15 |
|
16 |
diff --git a/net-ftp/pure-ftpd/pure-ftpd-9999.ebuild b/net-ftp/pure-ftpd/pure-ftpd-9999.ebuild |
17 |
new file mode 100644 |
18 |
index 00000000000..30e10ab43e3 |
19 |
--- /dev/null |
20 |
+++ b/net-ftp/pure-ftpd/pure-ftpd-9999.ebuild |
21 |
@@ -0,0 +1,143 @@ |
22 |
+# Copyright 1999-2019 Gentoo Authors |
23 |
+# Distributed under the terms of the GNU General Public License v2 |
24 |
+ |
25 |
+EAPI=7 |
26 |
+ |
27 |
+inherit flag-o-matic |
28 |
+ |
29 |
+DESCRIPTION="Fast, production-quality, standard-conformant FTP server" |
30 |
+HOMEPAGE="http://www.pureftpd.org/" |
31 |
+if [[ "${PV}" == 9999 ]] ; then |
32 |
+ inherit autotools git-r3 |
33 |
+ EGIT_REPO_URI="https://github.com/jedisct1/pure-ftpd.git" |
34 |
+else |
35 |
+ SRC_URI="ftp://ftp.pureftpd.org/pub/${PN}/releases/${P}.tar.bz2 |
36 |
+ http://download.pureftpd.org/pub/${PN}/releases/${P}.tar.bz2" |
37 |
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86" |
38 |
+fi |
39 |
+ |
40 |
+LICENSE="BSD" |
41 |
+SLOT="0" |
42 |
+ |
43 |
+IUSE="anondel anonperm anonren anonres caps implicittls ldap libressl mysql noiplog pam paranoidmsg postgres resolveids selinux ssl sysquota vchroot xinetd" |
44 |
+ |
45 |
+REQUIRED_USE="implicittls? ( ssl )" |
46 |
+ |
47 |
+DEPEND="caps? ( sys-libs/libcap ) |
48 |
+ ldap? ( >=net-nds/openldap-2.0.25 ) |
49 |
+ mysql? ( || ( |
50 |
+ dev-db/mariadb-connector-c |
51 |
+ dev-db/mysql-connector-c |
52 |
+ ) ) |
53 |
+ pam? ( virtual/pam ) |
54 |
+ postgres? ( dev-db/postgresql:= ) |
55 |
+ ssl? ( |
56 |
+ !libressl? ( >=dev-libs/openssl-0.9.6g:0=[-bindist] ) |
57 |
+ libressl? ( dev-libs/libressl:= ) |
58 |
+ ) |
59 |
+ sysquota? ( sys-fs/quota[-rpc] ) |
60 |
+ xinetd? ( virtual/inetd )" |
61 |
+ |
62 |
+RDEPEND="${DEPEND} |
63 |
+ dev-libs/libsodium:= |
64 |
+ net-ftp/ftpbase |
65 |
+ selinux? ( sec-policy/selinux-ftp )" |
66 |
+ |
67 |
+PATCHES=( |
68 |
+ "${FILESDIR}/${PN}-1.0.28-pam.patch" |
69 |
+) |
70 |
+ |
71 |
+src_prepare() { |
72 |
+ default |
73 |
+ [[ "${PV}" == 9999 ]] && eautoreconf |
74 |
+} |
75 |
+ |
76 |
+src_configure() { |
77 |
+ # adjust max user length to something more appropriate |
78 |
+ # for virtual hosts. See bug #62472 for details. |
79 |
+ sed -e "s:# define MAX_USER_LENGTH 32U:# define MAX_USER_LENGTH 127U:" \ |
80 |
+ -i "${S}/src/ftpd.h" || die "sed failed" |
81 |
+ |
82 |
+ # Those features are only configurable like this, see bug #179375. |
83 |
+ use anondel && append-cppflags -DANON_CAN_DELETE |
84 |
+ use anonperm && append-cppflags -DANON_CAN_CHANGE_PERMS |
85 |
+ use anonren && append-cppflags -DANON_CAN_RENAME |
86 |
+ use anonres && append-cppflags -DANON_CAN_RESUME |
87 |
+ use resolveids && append-cppflags -DALWAYS_RESOLVE_IDS |
88 |
+ |
89 |
+ # Do not auto-use SSP -- let the user select this. |
90 |
+ export ax_cv_check_cflags___fstack_protector_all=no |
91 |
+ |
92 |
+ local myeconfargs=( |
93 |
+ --enable-largefile |
94 |
+ --with-altlog |
95 |
+ --with-cookie |
96 |
+ --with-diraliases |
97 |
+ --with-extauth |
98 |
+ --with-ftpwho |
99 |
+ --with-language=${PUREFTPD_LANG:=english} |
100 |
+ --with-peruserlimits |
101 |
+ --with-privsep |
102 |
+ --with-puredb |
103 |
+ --with-quotas |
104 |
+ --with-ratios |
105 |
+ --with-throttling |
106 |
+ --with-uploadscript |
107 |
+ --with-virtualhosts |
108 |
+ $(use_with ldap) |
109 |
+ $(use_with mysql) |
110 |
+ $(use_with pam) |
111 |
+ $(use_with paranoidmsg) |
112 |
+ $(use_with postgres pgsql) |
113 |
+ $(use_with ssl tls) |
114 |
+ $(use_with implicittls) |
115 |
+ $(use_with vchroot virtualchroot) |
116 |
+ $(use_with sysquota sysquotas) |
117 |
+ $(usex caps '' '--without-capabilities') |
118 |
+ $(usex noiplog '--without-iplogging' '') |
119 |
+ $(usex xinetd '' '--without-inetd') |
120 |
+ ) |
121 |
+ econf "${myeconfargs[@]}" |
122 |
+} |
123 |
+ |
124 |
+src_install() { |
125 |
+ local DOCS=( AUTHORS ChangeLog FAQ HISTORY README* NEWS ) |
126 |
+ |
127 |
+ default |
128 |
+ |
129 |
+ newinitd "${FILESDIR}/pure-ftpd.rc11" ${PN} |
130 |
+ newconfd "${FILESDIR}/pure-ftpd.conf_d-3" ${PN} |
131 |
+ |
132 |
+ if use implicittls ; then |
133 |
+ sed -i '/^SERVER/s@21@990@' "${ED}"/etc/conf.d/${PN} \ |
134 |
+ || die "Adjusting default server port for implicittls usage failed!" |
135 |
+ fi |
136 |
+ |
137 |
+ keepdir /var/lib/run/${PN} |
138 |
+ |
139 |
+ if use xinetd ; then |
140 |
+ insinto /etc/xinetd.d |
141 |
+ newins "${FILESDIR}/pure-ftpd.xinetd" ${PN} |
142 |
+ fi |
143 |
+ |
144 |
+ if use ldap ; then |
145 |
+ insinto /etc/openldap/schema |
146 |
+ doins pureftpd.schema |
147 |
+ insinto /etc/openldap |
148 |
+ insopts -m 0600 |
149 |
+ doins pureftpd-ldap.conf |
150 |
+ fi |
151 |
+} |
152 |
+ |
153 |
+pkg_postinst() { |
154 |
+ if [[ -z "${REPLACING_VERSIONS}" ]]; then |
155 |
+ # This is a new installation |
156 |
+ elog |
157 |
+ elog "Before starting Pure-FTPd, you have to edit the /etc/conf.d/pure-ftpd file!" |
158 |
+ elog |
159 |
+ ewarn "It's *really* important to read the README provided with Pure-FTPd!" |
160 |
+ ewarn "Check out http://download.pureftpd.org/pub/pure-ftpd/doc/README for general info" |
161 |
+ ewarn "and http://download.pureftpd.org/pub/pure-ftpd/doc/README.TLS for SSL/TLS info." |
162 |
+ ewarn |
163 |
+ fi |
164 |
+} |