You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
145 lines
4.0 KiB
145 lines
4.0 KiB
6 years ago
|
# Copyright 1999-2019 Gentoo Authors
|
||
13 years ago
|
# Distributed under the terms of the GNU General Public License v2
|
||
|
|
||
6 years ago
|
EAPI=7
|
||
|
|
||
7 years ago
|
inherit flag-o-matic
|
||
13 years ago
|
|
||
6 years ago
|
KEYWORDS="alpha amd64 arm ~arm64 ~hppa ia64 ppc ppc64 sparc x86"
|
||
13 years ago
|
|
||
10 years ago
|
DESCRIPTION="Fast, production-quality, standard-conformant FTP server"
|
||
13 years ago
|
HOMEPAGE="http://www.pureftpd.org/"
|
||
|
SRC_URI="ftp://ftp.pureftpd.org/pub/${PN}/releases/${P}.tar.bz2
|
||
|
http://download.pureftpd.org/pub/${PN}/releases/${P}.tar.bz2"
|
||
|
|
||
|
LICENSE="BSD"
|
||
|
SLOT="0"
|
||
|
|
||
8 years ago
|
IUSE="anondel anonperm anonren anonres caps charconv implicittls ldap libressl mysql noiplog pam paranoidmsg postgres resolveids selinux ssl sysquota vchroot xinetd"
|
||
9 years ago
|
|
||
|
REQUIRED_USE="implicittls? ( ssl )"
|
||
13 years ago
|
|
||
|
DEPEND="caps? ( sys-libs/libcap )
|
||
13 years ago
|
charconv? ( virtual/libiconv )
|
||
|
ldap? ( >=net-nds/openldap-2.0.25 )
|
||
6 years ago
|
mysql? ( || (
|
||
|
dev-db/mariadb-connector-c
|
||
|
dev-db/mysql-connector-c
|
||
|
) )
|
||
13 years ago
|
pam? ( virtual/pam )
|
||
10 years ago
|
postgres? ( dev-db/postgresql:= )
|
||
8 years ago
|
ssl? (
|
||
|
!libressl? ( >=dev-libs/openssl-0.9.6g:0=[-bindist] )
|
||
|
libressl? ( dev-libs/libressl:= )
|
||
|
)
|
||
13 years ago
|
sysquota? ( sys-fs/quota[-rpc] )
|
||
|
xinetd? ( virtual/inetd )"
|
||
13 years ago
|
|
||
|
RDEPEND="${DEPEND}
|
||
9 years ago
|
dev-libs/libsodium:=
|
||
13 years ago
|
net-ftp/ftpbase
|
||
13 years ago
|
selinux? ( sec-policy/selinux-ftp )"
|
||
13 years ago
|
|
||
8 years ago
|
PATCHES=(
|
||
7 years ago
|
"${FILESDIR}/${PN}-1.0.28-pam.patch"
|
||
|
"${FILESDIR}/${PN}-1.0.47-MAX_DATA_SIZE.patch"
|
||
6 years ago
|
"${FILESDIR}/${PN}-1.0.47-TLSv1.3.patch"
|
||
6 years ago
|
"${FILESDIR}/${PN}-1.0.47-disable-TLSv1.3.patch"
|
||
|
"${FILESDIR}/${PN}-1.0.47-disable-TLSv1.1.patch"
|
||
8 years ago
|
)
|
||
13 years ago
|
|
||
|
src_configure() {
|
||
|
# adjust max user length to something more appropriate
|
||
|
# for virtual hosts. See bug #62472 for details.
|
||
9 years ago
|
sed -e "s:# define MAX_USER_LENGTH 32U:# define MAX_USER_LENGTH 127U:" \
|
||
|
-i "${S}/src/ftpd.h" || die "sed failed"
|
||
13 years ago
|
|
||
|
# Those features are only configurable like this, see bug #179375.
|
||
|
use anondel && append-cppflags -DANON_CAN_DELETE
|
||
|
use anonperm && append-cppflags -DANON_CAN_CHANGE_PERMS
|
||
|
use anonren && append-cppflags -DANON_CAN_RENAME
|
||
|
use anonres && append-cppflags -DANON_CAN_RESUME
|
||
|
use resolveids && append-cppflags -DALWAYS_RESOLVE_IDS
|
||
|
|
||
13 years ago
|
# Do not auto-use SSP -- let the user select this.
|
||
|
export ax_cv_check_cflags___fstack_protector_all=no
|
||
|
|
||
8 years ago
|
local myeconfargs=(
|
||
8 years ago
|
--enable-largefile
|
||
8 years ago
|
--with-altlog
|
||
|
--with-cookie
|
||
|
--with-diraliases
|
||
|
--with-extauth
|
||
|
--with-ftpwho
|
||
|
--with-language=${PUREFTPD_LANG:=english}
|
||
|
--with-peruserlimits
|
||
|
--with-privsep
|
||
|
--with-puredb
|
||
|
--with-quotas
|
||
|
--with-ratios
|
||
|
--with-throttling
|
||
|
--with-uploadscript
|
||
|
--with-virtualhosts
|
||
8 years ago
|
$(use_with charconv rfc2640)
|
||
|
$(use_with ldap)
|
||
|
$(use_with mysql)
|
||
|
$(use_with pam)
|
||
|
$(use_with paranoidmsg)
|
||
|
$(use_with postgres pgsql)
|
||
|
$(use_with ssl tls)
|
||
|
$(use_with implicittls)
|
||
|
$(use_with vchroot virtualchroot)
|
||
|
$(use_with sysquota sysquotas)
|
||
|
$(usex caps '' '--without-capabilities')
|
||
|
$(usex noiplog '--without-iplogging' '')
|
||
|
$(usex xinetd '' '--without-inetd')
|
||
8 years ago
|
)
|
||
8 years ago
|
econf "${myeconfargs[@]}"
|
||
13 years ago
|
}
|
||
|
|
||
|
src_install() {
|
||
8 years ago
|
local DOCS=( AUTHORS CONTACT ChangeLog FAQ HISTORY INSTALL README* NEWS )
|
||
13 years ago
|
|
||
8 years ago
|
default
|
||
13 years ago
|
|
||
8 years ago
|
newinitd "${FILESDIR}/pure-ftpd.rc11" ${PN}
|
||
9 years ago
|
newconfd "${FILESDIR}/pure-ftpd.conf_d-3" ${PN}
|
||
|
|
||
|
if use implicittls ; then
|
||
|
sed -i '/^SERVER/s@21@990@' "${ED}"/etc/conf.d/${PN} \
|
||
|
|| die "Adjusting default server port for implicittls usage failed!"
|
||
|
fi
|
||
13 years ago
|
|
||
8 years ago
|
keepdir /var/lib/run/${PN}
|
||
13 years ago
|
|
||
|
if use xinetd ; then
|
||
|
insinto /etc/xinetd.d
|
||
8 years ago
|
newins "${FILESDIR}/pure-ftpd.xinetd" ${PN}
|
||
13 years ago
|
fi
|
||
|
|
||
|
if use ldap ; then
|
||
|
insinto /etc/openldap/schema
|
||
|
doins pureftpd.schema
|
||
|
insinto /etc/openldap
|
||
|
insopts -m 0600
|
||
|
doins pureftpd-ldap.conf
|
||
|
fi
|
||
|
}
|
||
|
|
||
|
pkg_postinst() {
|
||
9 years ago
|
if [[ -z "${REPLACING_VERSIONS}" ]]; then
|
||
|
# This is a new installation
|
||
|
elog
|
||
|
elog "Before starting Pure-FTPd, you have to edit the /etc/conf.d/pure-ftpd file!"
|
||
|
elog
|
||
|
ewarn "It's *really* important to read the README provided with Pure-FTPd!"
|
||
|
ewarn "Check out http://download.pureftpd.org/pub/pure-ftpd/doc/README for general info"
|
||
|
ewarn "and http://download.pureftpd.org/pub/pure-ftpd/doc/README.TLS for SSL/TLS info."
|
||
|
ewarn
|
||
|
if use charconv ; then
|
||
|
ewarn "Charset conversion is an *experimental* feature!"
|
||
|
ewarn "Remember to set a valid charset for your filesystem in the configuration!"
|
||
|
fi
|
||
13 years ago
|
fi
|
||
|
}
|