-
Notifications
You must be signed in to change notification settings - Fork 2.1k
/
template
255 lines (248 loc) · 7.07 KB
/
template
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
# Template file for 'inetutils'
pkgname=inetutils
version=2.4
revision=2
build_style=gnu-configure
configure_args="--without-wrap --with-pam"
makedepends="pam-devel readline-devel"
checkdepends="iana-etc net-tools"
short_desc="GNU network utilities"
maintainer="Orphaned <orphan@voidlinux.org>"
license="GPL-3.0-or-later"
homepage="https://www.gnu.org/software/inetutils/"
distfiles="${GNU_SITE}/inetutils/inetutils-${version}.tar.xz"
checksum=1789d6b1b1a57dfe2a7ab7b533ee9f5dfd9cbf5b59bb1bb3c2612ed08d0f68b2
subpackages="inetutils-dnsdomainname inetutils-ftp inetutils-hostname
inetutils-ifconfig inetutils-inetd inetutils-ping inetutils-rexec
inetutils-syslog inetutils-telnet inetutils-tftp inetutils-traceroute
inetutils-uucpd inetutils-whois"
CFLAGS="-fcommon"
# hostname test can't run in CI
make_check=ci-skip
if [ "$XBPS_TARGET_LIBC" = "glibc" ]; then
makedepends+=" libxcrypt-devel"
fi
case "$XBPS_TARGET_MACHINE" in
*-musl)
# Some packages don't build on musl, so explicitly disable them
configure_args+=" --disable-rcp --disable-rlogin --disable-rlogind --disable-rsh --disable-rshd --disable-talk --disable-talkd"
;;
*)
subpackages+=" inetutils-rcp inetutils-rlogin inetutils-rsh inetutils-talk"
;;
esac
depends="${subpackages}"
pre_configure() {
vsed -i 's|_GL_WARN_ON_USE (gets|//_GL_WARN_ON_USE (gets|' lib/stdio.in.h
# Create a definition to allow the ifconfig program to build properly
echo '#define PATH_PROCNET_DEV "/proc/net/dev"' >> ifconfig/system/linux.h
# Use the standard name ("nicname") for the "whois" service.
vsed -i 's|port : "whois"|port : "nicname"|' whois/whois.c
# Changing the whois/whois.c triggers help2man invocation. This is not
# necessary because no option has changed. Moreover, launching help2man
# fails for the cross compilations. Let's make sure the build process
# is not triggered to run it then.
touch man/whois.1
}
post_install() {
# Keep just usr/share/info/inetutils.info.gz
rm -r ${DESTDIR}/usr/bin
rm -r ${DESTDIR}/usr/share/man
rm -r ${DESTDIR}/usr/libexec
}
inetutils-dnsdomainname_package() {
short_desc+=" - dnsdomainname tool"
pkg_install() {
vbin src/dnsdomainname
vman man/dnsdomainname.1
}
}
inetutils-hostname_package() {
short_desc+=" - hostname tool"
alternatives="
hostname:hostname:/usr/bin/${pkgname}
hostname:hostname.1:/usr/share/man/man1/${pkgname}.1
"
pkg_install() {
vbin src/hostname ${pkgname}
vman man/hostname.1 ${pkgname}.1
}
}
inetutils-ifconfig_package() {
short_desc+=" - ifconfig tool"
alternatives="
ifconfig:ifconfig:/usr/bin/${pkgname}
ifconfig:ifconfig.1:/usr/share/man/man1/${pkgname}.1
"
pkg_install() {
vbin ifconfig/ifconfig ${pkgname}
vman man/ifconfig.1 ${pkgname}.1
}
}
inetutils-ftp_package() {
short_desc+=" - ftp client and server (file transfer protocol)"
alternatives="
ftp:ftp:/usr/bin/${pkgname}
ftp:ftp.1:/usr/share/man/man1/${pkgname}.1
"
pkg_install() {
vbin ftp/ftp ${pkgname}
vman man/ftp.1 ${pkgname}.1
vbin ftpd/ftpd
vman man/ftpd.8
# TODO: write etc/inet.d/ftp.conf or add an etc/inetd.conf line
}
}
inetutils-ping_package() {
short_desc+=" - ping tool (IPv4 and IPv6)"
alternatives="
ping:ping:/usr/bin/${pkgname}
ping:ping.1:/usr/share/man/man1/${pkgname}.1
ping6:ping6:/usr/bin/${pkgname}6
ping6:ping6.1:/usr/share/man/man1/${pkgname}6.1
"
pkg_install() {
vbin ping/ping ${pkgname}
vman man/ping.1 ${pkgname}.1
vbin ping/ping6 ${pkgname}6
vman man/ping6.1 ${pkgname}6.1
}
}
inetutils-rcp_package() {
short_desc+=" - rcp client (remote copy)"
pkg_install() {
vbin src/rcp
vman man/rcp.1
}
}
inetutils-rexec_package() {
short_desc+=" - rexec client and server (remote exec)"
conf_files="/etc/xinetd.d/rexec"
pkg_install() {
vbin src/rexec
vman man/rexec.1
vbin src/rexecd
vman man/rexecd.8
vinstall ${FILESDIR}/rexec.xinetd 644 etc/xinetd.d rexec
# TODO: write etc/inet.d/rexec.conf or add an etc/inetd.conf line
}
}
inetutils-rlogin_package() {
short_desc+=" - rlogin client and server (remote login)"
conf_files="/etc/xinetd.d/rlogin"
pkg_install() {
vbin src/rlogin
vman man/rlogin.1
vbin src/rlogind
vman man/rlogind.8
vinstall ${FILESDIR}/rlogin.xinetd 644 etc/xinetd.d rlogin
# TODO: write etc/inet.d/rlogin.conf or add an etc/inetd.conf line
}
}
inetutils-rsh_package() {
short_desc+=" - rsh client and server (remote shell)"
conf_files="/etc/xinetd.d/rsh"
pkg_install() {
vbin src/rsh
vman man/rsh.1
vbin src/rshd
vman man/rshd.8
vinstall ${FILESDIR}/rsh.xinetd 644 etc/xinetd.d rsh
# TODO: write etc/inet.d/rsh.conf or add an etc/inetd.conf line
}
}
inetutils-talk_package() {
short_desc+=" - talk client and server"
conf_files="/etc/xinetd.d/talk"
pkg_install() {
vbin talk/talk
vman man/talk.1
vbin talkd/talkd
vman man/talkd.8
vinstall ${FILESDIR}/talk.xinetd 644 etc/xinetd.d talk
# TODO: write etc/inet.d/talk.conf or add an etc/inetd.conf line
}
}
inetutils-telnet_package() {
short_desc+=" - telnet client and server"
conf_files="/etc/xinetd.d/telnet"
pkg_install() {
vbin telnet/telnet
vman man/telnet.1
vbin telnetd/telnetd
vman man/telnetd.8
vinstall ${FILESDIR}/telnet.xinetd 644 etc/xinetd.d telnet
# TODO: write etc/inet.d/telnet.conf or add an etc/inetd.conf line
}
}
inetutils-tftp_package() {
short_desc+=" - tftp client and server (trivial file transfer protocol)"
conf_files="/etc/xinetd.d/tftp"
alternatives="
tftp:tftp:/usr/bin/${pkgname}
tftp:tftp.1:/usr/share/man/man1/${pkgname}.1
tftp:tftpd.8:/usr/share/man/man8/inetutils-tftpd.8
"
pkg_install() {
vbin src/tftp ${pkgname}
vman man/tftp.1 ${pkgname}.1
vbin src/tftpd
vman man/tftpd.8 inetutils-tftpd.8
vinstall ${FILESDIR}/tftp.xinetd 644 etc/xinetd.d tftp
# TODO: write etc/inet.d/tftp.conf or add an etc/inetd.conf line
}
}
inetutils-traceroute_package() {
short_desc+=" - traceroute tool"
alternatives="
traceroute:traceroute:/usr/bin/${pkgname}
traceroute:traceroute.1:/usr/share/man/man1/${pkgname}.1
"
pkg_install() {
vbin src/traceroute ${pkgname}
vman man/traceroute.1 ${pkgname}.1
}
}
inetutils-whois_package() {
short_desc+=" - whois tool"
alternatives="
whois:whois:/usr/bin/${pkgname}
whois:whois.1:/usr/share/man/man1/${pkgname}.1
"
pkg_install() {
vbin whois/whois ${pkgname}
vman man/whois.1 ${pkgname}.1
}
}
inetutils-inetd_package() {
short_desc+=" - inet daemon"
pkg_install() {
vbin src/inetd
vman man/inetd.8
# TODO: Install default config files with all services disabled?
# Add config_files="/etc/inetd.conf /etc/hosts.deny /etc/hosts.allow"
}
}
inetutils-syslog_package() {
short_desc+=" - logger tool and syslog daemon"
alternatives="
logger:logger:/usr/bin/inetutils-logger
logger:logger.1:/usr/share/man/man1/inetutils-logger.1
"
pkg_install() {
vbin src/logger inetutils-logger
vman man/logger.1 inetutils-logger.1
vbin src/syslogd
vman man/syslogd.8
}
}
inetutils-uucpd_package() {
short_desc+=" - uucpd daemon (unix to unix copy)"
conf_files="/etc/xinetd.d/uucp"
pkg_install() {
vbin src/uucpd
vman man/uucpd.8
vinstall ${FILESDIR}/uucp.xinetd 644 etc/xinetd.d uucp
# TODO: write etc/inet.d/uucp.conf or add an etc/inetd.conf line
}
}