From fe9f358f88c12896b1dd4203aeb14f280282c014 Mon Sep 17 00:00:00 2001 From: Oz N Tiram Date: Wed, 5 Aug 2020 22:45:38 +0200 Subject: 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 Signed-off-by: Mike Gilbert --- net-ftp/tftp-hpa/metadata.xml | 4 ++ net-ftp/tftp-hpa/tftp-hpa-5.2-r2.ebuild | 78 +++++++++++++++++++++++++++++++++ 2 files changed, 82 insertions(+) create mode 100644 net-ftp/tftp-hpa/tftp-hpa-5.2-r2.ebuild (limited to 'net-ftp') 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 @@ base-system@gentoo.org Gentoo Base System + + Compile and install the tftp client + Compile and install the tftp server + 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 +} -- cgit v1.2.3-65-gdbad