# Maintainer: Levente Polyak # Contributor: Eric BĂ©langer pkgbase=inetutils pkgname=(inetutils ftp hostname rsh talk telnet) pkgver=2.0 pkgrel=1 pkgdesc="A collection of common network programs" arch=('x86_64') url="https://www.gnu.org/software/inetutils/" license=('GPL3') makedepends=('help2man') options=('!emptydirs') source=("https://ftp.gnu.org/gnu/inetutils/${pkgbase}-${pkgver}.tar.xz"{,.sig} 'ftpd.service' 'rlogin.pam' 'rlogin@.service' 'rlogin.socket' 'rlogin.xinetd' 'rsh.pam' 'rsh@.service' 'rsh.socket' 'rsh.xinetd' 'talk.service' 'talk.socket' 'talk.xinetd' 'telnet@.service' 'telnet.socket' 'telnet.xinetd') sha1sums=('9aee727905c1954a63152adf48feeb4ffde0e687' 'SKIP' '026181500b71f0c09ef5c262450be718651e5658' '387b371cbaa3611b95d30f806c0dd08b621a584a' '6f9a304391610a17b8ae3ad35b742c78c86aee16' '0455126fa18d2a9422469d79b9e73dd928b15652' 'd9b8f8aab094ecb779d0f16f21b4683ab327516f' '556b5372cbab8794e931e110b896fa8a61628bb1' '828da7bce49ffc4e9645288759b275a98a2fbc40' '7071da32d42a133ead039197ed891b518bb0f773' '26763ae31b8a5be256666a0ba55746941d75d6ee' '4486c966d28736897bce1280d85d139bd10a5689' 'd1813d42c5c9d2c60f03ebe33961de357a4b8b43' 'b15ab4faa9d97652e182c98c1e3a3b3cbbf6383c' '0917dc6b5a80d914bf550065b1733b7da2c776f3' 'a7ac7bbe917ff80fd8cd4357fbc62fab50595c34' '2b2dd71eb3233e5090f4c2df8abe9b4924d323f3') # GNU Keyring: https://ftp.gnu.org/gnu/gnu-keyring.gpg validpgpkeys=( '4FBD67621082C4C502448E3B180551BAD95A3C35' # Alfred M. Szmidt '9AA9BDB11BB1B99A21285A330664A76954265E8C' # Simon Josefsson ) build() { cd ${pkgbase}-${pkgver} ./configure \ --prefix=/usr \ --libexec=/usr/bin \ --localstatedir=/var \ --sysconfdir=/etc \ --without-wrap \ --with-pam \ --enable-ftp \ --enable-ftpd \ --enable-telnet \ --enable-telnetd \ --enable-talk \ --enable-talkd \ --enable-rlogin \ --enable-rlogind \ --enable-rsh \ --enable-rshd \ --enable-rcp \ --enable-hostname \ --enable-dnsdomainname \ --disable-rexec \ --disable-rexecd \ --disable-tftp \ --disable-tftpd \ --disable-ping \ --disable-ping6 \ --disable-logger \ --disable-syslogd \ --disable-inetd \ --disable-whois \ --disable-uucpd \ --disable-ifconfig \ --disable-traceroute make } check() { cd ${pkgbase}-${pkgver} make check } _install() { install -Dm $1 "${srcdir}"/fakeinstall/$2 "${pkgdir}"/$2 } package_inetutils() { depends=(ftp hostname rsh talk telnet) cd ${pkgbase}-${pkgver} make DESTDIR="${srcdir}"/fakeinstall install _install 644 usr/share/info/inetutils.info } package_ftp() { depends=('pam') cd ${pkgbase}-${pkgver} _install 755 usr/bin/ftp _install 755 usr/bin/ftpd _install 644 usr/share/man/man1/ftp.1 _install 644 usr/share/man/man8/ftpd.8 install -D -m644 "${srcdir}/ftpd.service" "${pkgdir}/usr/lib/systemd/system/ftpd.service" } package_hostname() { depends=('glibc') cd ${pkgbase}-${pkgver} _install 755 usr/bin/dnsdomainname _install 755 usr/bin/hostname _install 644 usr/share/man/man1/dnsdomainname.1 _install 644 usr/share/man/man1/hostname.1 } package_rsh() { depends=('pam' 'libcap') install=inetutils.install backup=('etc/xinetd.d/rlogin' 'etc/xinetd.d/rsh' 'etc/pam.d/rlogin' 'etc/pam.d/rsh') cd ${pkgbase}-${pkgver} _install 755 usr/bin/rcp _install 755 usr/bin/rlogin _install 755 usr/bin/rsh _install 755 usr/bin/rshd _install 644 usr/share/man/man1/rcp.1 _install 644 usr/share/man/man1/rlogin.1 _install 644 usr/share/man/man1/rsh.1 _install 644 usr/share/man/man8/rshd.8 chmod -s "${pkgdir}"/usr/bin/{rcp,rlogin,rsh} install -D -m644 "${srcdir}/rlogin.xinetd" "${pkgdir}/etc/xinetd.d/rlogin" install -D -m644 "${srcdir}/rsh.xinetd" "${pkgdir}/etc/xinetd.d/rsh" install -D -m644 "${srcdir}/rlogin.pam" "${pkgdir}/etc/pam.d/rlogin" install -D -m644 "${srcdir}/rsh.pam" "${pkgdir}/etc/pam.d/rsh" install -D -m644 "${srcdir}/rlogin@.service" "${pkgdir}/usr/lib/systemd/system/rlogin@.service" install -D -m644 "${srcdir}/rlogin.socket" "${pkgdir}/usr/lib/systemd/system/rlogin.socket" install -D -m644 "${srcdir}/rsh@.service" "${pkgdir}/usr/lib/systemd/system/rsh@.service" install -D -m644 "${srcdir}/rsh.socket" "${pkgdir}/usr/lib/systemd/system/rsh.socket" } package_talk() { depends=('ncurses') backup=('etc/xinetd.d/talk') cd ${pkgbase}-${pkgver} _install 755 usr/bin/talk _install 755 usr/bin/talkd _install 644 usr/share/man/man1/talk.1 _install 644 usr/share/man/man8/talkd.8 install -D -m644 "${srcdir}/talk.xinetd" "${pkgdir}/etc/xinetd.d/talk" install -D -m644 "${srcdir}/talk.service" "${pkgdir}/usr/lib/systemd/system/talk.service" install -D -m644 "${srcdir}/talk.socket" "${pkgdir}/usr/lib/systemd/system/talk.socket" } package_telnet() { depends=('ncurses') backup=('etc/xinetd.d/telnet') cd ${pkgbase}-${pkgver} _install 755 usr/bin/telnet _install 755 usr/bin/telnetd _install 644 usr/share/man/man1/telnet.1 _install 644 usr/share/man/man8/telnetd.8 install -D -m644 "${srcdir}/telnet.xinetd" "${pkgdir}/etc/xinetd.d/telnet" install -D -m644 "${srcdir}/telnet@.service" "${pkgdir}/usr/lib/systemd/system/telnet@.service" install -D -m644 "${srcdir}/telnet.socket" "${pkgdir}/usr/lib/systemd/system/telnet.socket" }