summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOz N Tiram <oz.tiram@gmail.com>2020-08-05 22:45:38 +0200
committerMike Gilbert <floppym@gentoo.org>2020-08-26 13:49:54 -0400
commitfe9f358f88c12896b1dd4203aeb14f280282c014 (patch)
tree0ae17be5c8aa6a34e60301e3ee0c50b73e29c7ed /net-ftp/tftp-hpa
parentdev-libs/gobject-introspection: mark 1.64.1-r1 sparc, bug #736727 (diff)
downloadgentoo-fe9f358f88c12896b1dd4203aeb14f280282c014.tar.gz
gentoo-fe9f358f88c12896b1dd4203aeb14f280282c014.tar.bz2
gentoo-fe9f358f88c12896b1dd4203aeb14f280282c014.zip
net-ftp/tftp-hpa: bump EAPI and split the package
Now a user can install either the tftp client or the tftp server or both. This is controlled by use flags. By default both are installed, so this keeps backwards compatibility. Closes: https://github.com/gentoo/gentoo/pull/17023 Package-Manager: Portage-2.3.103, Repoman-2.3.23 Signed-off-by: Oz Tiram <oz.tiram@gmail.com> Signed-off-by: Mike Gilbert <floppym@gentoo.org>
Diffstat (limited to 'net-ftp/tftp-hpa')
-rw-r--r--net-ftp/tftp-hpa/metadata.xml4
-rw-r--r--net-ftp/tftp-hpa/tftp-hpa-5.2-r2.ebuild78
2 files changed, 82 insertions, 0 deletions
diff --git a/net-ftp/tftp-hpa/metadata.xml b/net-ftp/tftp-hpa/metadata.xml
index 56c124413057..e56bfe22863a 100644
--- a/net-ftp/tftp-hpa/metadata.xml
+++ b/net-ftp/tftp-hpa/metadata.xml
@@ -5,4 +5,8 @@
<email>base-system@gentoo.org</email>
<name>Gentoo Base System</name>
</maintainer>
+<use>
+ <flag name="client">Compile and install the tftp client</flag>
+ <flag name="server">Compile and install the tftp server</flag>
+</use>
</pkgmetadata>
diff --git a/net-ftp/tftp-hpa/tftp-hpa-5.2-r2.ebuild b/net-ftp/tftp-hpa/tftp-hpa-5.2-r2.ebuild
new file mode 100644
index 000000000000..239a1184ef6b
--- /dev/null
+++ b/net-ftp/tftp-hpa/tftp-hpa-5.2-r2.ebuild
@@ -0,0 +1,78 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="7"
+
+inherit systemd toolchain-funcs
+
+DESCRIPTION="port of the OpenBSD TFTP server"
+HOMEPAGE="https://www.kernel.org/pub/software/network/tftp/"
+SRC_URI="https://www.kernel.org/pub/software/network/tftp/${PN}/${P}.tar.xz"
+
+LICENSE="BSD-4"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~ppc-macos"
+IUSE="ipv6 readline selinux tcpd +client +server"
+
+CDEPEND="
+ readline? ( sys-libs/readline:0= )
+ tcpd? ( sys-apps/tcp-wrappers )
+ "
+
+DEPEND="${CDEPEND}
+ app-arch/xz-utils
+ !net-ftp/atftp
+ !net-ftp/uftpd"
+
+RDEPEND="${CDEPEND}
+ selinux? ( sec-policy/selinux-tftp )"
+
+PATCHES=(
+ "${FILESDIR}"/tftp-hpa-5.2-gcc-10.patch
+)
+
+src_prepare() {
+ eapply_user
+ sed -i "/^AR/s:ar:$(tc-getAR):" MCONFIG.in || die
+}
+
+src_configure() {
+ econf \
+ $(use_with ipv6) \
+ $(use_with tcpd tcpwrappers) \
+ $(use_with readline)
+}
+
+src_compile() {
+ emake version.h
+ emake -C lib
+ emake -C common
+ if use client; then
+ emake -C tftp
+ fi
+ if use server; then
+ emake -C tftpd
+ fi
+}
+
+src_install() {
+ dodoc README* CHANGES tftpd/sample.rules
+
+ if use client; then
+ emake INSTALLROOT="${D}" -C tftp install
+ fi
+ if use server; then
+ emake INSTALLROOT="${D}" -C tftpd install
+
+ rm "${ED}"/usr/share/man/man8/tftpd.8 || die
+
+ newconfd "${FILESDIR}"/in.tftpd.confd-0.44 in.tftpd
+ newinitd "${FILESDIR}"/in.tftpd.rc6 in.tftpd
+
+ systemd_dounit "${FILESDIR}"/tftp.service
+ systemd_dounit "${FILESDIR}"/tftp.socket
+
+ insinto /etc/xinetd.d
+ newins "${FILESDIR}"/tftp.xinetd tftp
+ fi
+}