Gentoo Archives: gentoo-commits

From: Joonas Niilola <juippis@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-ftp/uftpd/files/, net-ftp/uftpd/
Date: Wed, 02 Nov 2022 14:24:37
Message-Id: 1667399064.bf9338021c252b37eb9b58ab6964bad4a69efb3e.juippis@gentoo
1 commit: bf9338021c252b37eb9b58ab6964bad4a69efb3e
2 Author: Oz N Tiram <oz.tiram <AT> gmail <DOT> com>
3 AuthorDate: Mon Oct 10 09:39:18 2022 +0000
4 Commit: Joonas Niilola <juippis <AT> gentoo <DOT> org>
5 CommitDate: Wed Nov 2 14:24:24 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bf933802
7
8 net-ftp/uftpd: add init files
9
10 (Only openrc at this point).
11
12 Signed-off-by: Oz N Tiram <oz.tiram <AT> gmail.com>
13 Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org>
14
15 net-ftp/uftpd/files/uftpd.confd | 5 +++++
16 net-ftp/uftpd/files/uftpd.init | 27 +++++++++++++++++++++++++
17 net-ftp/uftpd/uftpd-2.15-r1.ebuild | 41 ++++++++++++++++++++++++++++++++++++++
18 3 files changed, 73 insertions(+)
19
20 diff --git a/net-ftp/uftpd/files/uftpd.confd b/net-ftp/uftpd/files/uftpd.confd
21 new file mode 100644
22 index 000000000000..356ad42f59aa
23 --- /dev/null
24 +++ b/net-ftp/uftpd/files/uftpd.confd
25 @@ -0,0 +1,5 @@
26 +# Config file for uftpd server
27 +
28 +# make sure you create the root directory
29 +UFTPD_ROOT="/uftpdroot"
30 +UFTDP_OPTS=""
31
32 diff --git a/net-ftp/uftpd/files/uftpd.init b/net-ftp/uftpd/files/uftpd.init
33 new file mode 100644
34 index 000000000000..8a2c7c659a49
35 --- /dev/null
36 +++ b/net-ftp/uftpd/files/uftpd.init
37 @@ -0,0 +1,27 @@
38 +#!/sbin/openrc-run
39 +
40 +depend() {
41 + use logger
42 + need net
43 +}
44 +
45 +checkconfig() {
46 + if [ ! -d ${UFTPD_ROOT} ]
47 + then
48 + eerror "You need a UFTPD root directory"
49 + return 1
50 + fi
51 +}
52 +
53 +start() {
54 + checkconfig || return 1
55 + ebegin "Starting uftpd"
56 + start-stop-daemon --start --exec /usr/sbin/uftpd ${UFTPD_ROOT} ${UFTPD_OPTS}
57 + eend $?
58 +}
59 +
60 +stop() {
61 + ebegin "Stopping uftpd"
62 + start-stop-daemon --stop --quiet --exec /usr/sbin/uftpd
63 + eend $?
64 +}
65
66 diff --git a/net-ftp/uftpd/uftpd-2.15-r1.ebuild b/net-ftp/uftpd/uftpd-2.15-r1.ebuild
67 new file mode 100644
68 index 000000000000..c191fbf59145
69 --- /dev/null
70 +++ b/net-ftp/uftpd/uftpd-2.15-r1.ebuild
71 @@ -0,0 +1,41 @@
72 +# Copyright 1999-2022 Gentoo Authors
73 +# Distributed under the terms of the GNU General Public License v2
74 +
75 +EAPI=7
76 +
77 +DESCRIPTION="The no nonsense TFTP/FTP server"
78 +HOMEPAGE="https://github.com/troglobit/uftpd"
79 +SRC_URI="https://github.com/troglobit/${PN}/releases/download/v${PV}/${P}.tar.xz"
80 +
81 +LICENSE="MIT"
82 +SLOT="0"
83 +KEYWORDS="~amd64 ~arm64"
84 +IUSE="test"
85 +RESTRICT="!test? ( test )"
86 +
87 +RDEPEND="
88 + >=dev-libs/libite-1.5
89 + >=dev-libs/libuev-2.2"
90 +
91 +DEPEND="
92 + ${RDEPEND}
93 + !net-misc/uftp
94 + !net-ftp/atftp
95 + !net-ftp/tftp-hpa[server(+)]
96 + test? (
97 + net-ftp/ftp
98 + net-ftp/tnftp
99 + >=net-ftp/tftp-hpa-5.2-r2[client]
100 + )"
101 +
102 +src_test() {
103 + # can't run the tests in parallel since the order matters
104 + emake -j 1 check
105 +}
106 +
107 +
108 +src_install() {
109 + default
110 + newinitd "${FILESDIR}"/uftpd.init uftpd
111 + newconfd "${FILESDIR}"/uftpd.confd uftpd
112 +}