# Template file for 'inetutils' pkgname=inetutils version=1.9.3 revision=3 build_style=gnu-configure configure_args="--without-wrap --with-pam" makedepends="pam-devel readline-devel" depends="${pkgname}-dnsdomainname ${pkgname}-hostname ${pkgname}-ifconfig ${pkgname}-ftp ${pkgname}-ping ${pkgname}-rcp ${pkgname}-rexec ${pkgname}-rlogin ${pkgname}-rsh ${pkgname}-talk ${pkgname}-telnet ${pkgname}-tftp ${pkgname}-traceroute ${pkgname}-whois ${pkgname}-inetd ${pkgname}-syslog ${pkgname}-uucpd" short_desc="GNU network utilities" maintainer="Juan RP " license="GPL-3" homepage="http://www.gnu.org/software/inetutils" distfiles="${GNU_SITE}/$pkgname/$pkgname-$version.tar.xz" checksum=40ed8bb3d21eca5afbc9865125e9049ee524b2b0f66b388878861d436d0d773d 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" 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() { sed -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 } 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" conflicts="coreutils>=0" pkg_install() { vbin src/hostname vman man/hostname.1 } } inetutils-ifconfig_package() { short_desc+=" - ifconfig tool" conflicts="net-tools>=0" pkg_install() { vbin ifconfig/ifconfig vman man/ifconfig.1 } } inetutils-ftp_package() { short_desc+=" - ftp client and server (file transfer protocol)" pkg_install() { vbin ftp/ftp vman man/ftp.1 vbin ftpd/ftpd vman man/ftpd.8 if [ "$build_option_systemd" ]; then vinstall ${FILESDIR}/ftpd.service 644 usr/lib/systemd/system fi # TODO: write etc/inet.d/ftp.conf or add an etc/inetd.conf line } } inetutils-ping_package() { short_desc+=" - ping tool (IPv4 and IPv6)" conflicts="iputils>=0 base-system-busybox>=0" pkg_install() { vbin ping/ping vman man/ping.1 vbin ping/ping6 vman man/ping6.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)" pkg_install() { vbin src/rexec vman man/rexec.1 vbin src/rexecd vman man/rexecd.8 vinstall ${FILESDIR}/rexec.xinetd 644 etc/xninet.d # 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)" pkg_install() { vbin src/rlogin vman man/rlogin.1 vbin src/rlogind vman man/rlogind.8 vinstall ${FILESDIR}/rlogin.xinetd 644 etc/xninet.d # 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)" pkg_install() { vbin src/rsh vman man/rsh.1 vbin src/rshd vman man/rshd.8 vinstall ${FILESDIR}/rsh.xinetd 644 etc/xninet.d # TODO: write etc/inet.d/rsh.conf or add an etc/inetd.conf line } } inetutils-talk_package() { short_desc+=" - talk client and server" pkg_install() { vbin talk/talk vman man/talk.1 vbin talkd/talkd vman man/talkd.8 vinstall ${FILESDIR}/talk.xinetd 644 etc/xninet.d # TODO: write etc/inet.d/talk.conf or add an etc/inetd.conf line } } inetutils-telnet_package() { short_desc+=" - telnet client and server" pkg_install() { vbin telnet/telnet vman man/telnet.1 vbin telnetd/telnetd vman man/telnetd.8 vinstall ${FILESDIR}/telnet.xinetd 644 etc/xninet.d # 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)" conflicts="tftp-hpa>=0" pkg_install() { vbin src/tftp vman man/tftp.1 vbin src/tftpd vman man/tftpd.8 vinstall ${FILESDIR}/tftp.xinetd 644 etc/xninet.d # TODO: write etc/inet.d/tftp.conf or add an etc/inetd.conf line } } inetutils-traceroute_package() { short_desc+=" - traceroute tool" conflicts="traceroute>=0" pkg_install() { vbin src/traceroute vman man/traceroute.1 } } inetutils-whois_package() { short_desc+=" - whois tool" conflicts="whois>=0" pkg_install() { vbin whois/whois vman man/whois.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" conflicts="util-linux>=0" pkg_install() { vbin src/logger vman man/logger.1 vbin src/syslogd vman man/syslogd.8 } } inetutils-uucpd_package() { short_desc+=" - uucpd daemon (unix to unix copy)" pkg_install() { vbin src/uucpd vman man/uucpd.8 vinstall ${FILESDIR}/uucp.xinetd 644 etc/xninet.d # TODO: write etc/inet.d/uucp.conf or add an etc/inetd.conf line } }