Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 1 | DESCRIPTION = "netkit-rsh includes the rsh daemon and client." |
| 2 | SECTION = "net" |
| 3 | HOMEPAGE="ftp://ftp.uk.linux.org/pub/linux/Networking/netkit" |
| 4 | LICENSE = "BSD-4-Clause" |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 5 | DEPENDS = "xinetd libgcrypt virtual/crypt" |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 6 | |
| 7 | LIC_FILES_CHKSUM = "file://rsh/rsh.c;endline=32;md5=487b3c637bdc181d32b2a8543d41b606" |
| 8 | |
| 9 | SRC_URI = "${DEBIAN_MIRROR}/main/n/netkit-rsh/netkit-rsh_${PV}.orig.tar.gz;name=archive \ |
| 10 | ${DEBIAN_MIRROR}/main/n/netkit-rsh/netkit-rsh_${PV}-15.diff.gz;name=patch15 \ |
| 11 | file://rsh-redone_link_order_file.patch \ |
| 12 | file://no_pam_build_fix.patch \ |
| 13 | file://rexec.xinetd.netkit \ |
| 14 | file://rlogin.xinetd.netkit \ |
| 15 | file://rsh.xinetd.netkit \ |
| 16 | file://netkit-rsh-0.17-rexec-ipv6.patch \ |
| 17 | file://fix-host-variable.patch \ |
Patrick Williams | ddad1a1 | 2017-02-23 20:36:32 -0600 | [diff] [blame] | 18 | file://fixup_wait3_api_change.patch \ |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 19 | " |
| 20 | |
| 21 | SRC_URI[archive.md5sum] = "65f5f28e2fe22d9ad8b17bb9a10df096" |
| 22 | SRC_URI[archive.sha256sum] = "edcac7fa18015f0bc04e573f3f54ae3b638d71335df1ad7dae692779914ad669" |
| 23 | SRC_URI[patch15.md5sum] = "655efc0d541b03ca5de0ae506c805ea3" |
| 24 | SRC_URI[patch15.sha256sum] = "2bc071c438e8b0ed42a0bd2db2d8b681b27a1e9b1798694d9874733293bc2aa9" |
| 25 | |
| 26 | # Other support files |
| 27 | PAM_SRC_URI = "file://rexec.pam \ |
Patrick Williams | ddad1a1 | 2017-02-23 20:36:32 -0600 | [diff] [blame] | 28 | file://rlogin.pam \ |
| 29 | file://rsh.pam \ |
| 30 | " |
| 31 | SRC_URI += "${@bb.utils.contains('DISTRO_FEATURES', 'pam', '${PAM_SRC_URI}', '', d)}" |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 32 | |
| 33 | inherit pkgconfig |
| 34 | |
| 35 | CFLAGS += " -D_GNU_SOURCE -Wno-deprecated-declarations" |
| 36 | LDFLAGS += " -L${STAGING_LIBDIR} -lutil -lcrypt" |
| 37 | |
| 38 | PACKAGECONFIG ??= "" |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 39 | PACKAGECONFIG += "${@bb.utils.filter('DISTRO_FEATURES', 'pam', d)}" |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 40 | PACKAGECONFIG[pam] = " , --without-pam, libpam, libpam" |
| 41 | |
| 42 | do_configure () { |
| 43 | ./configure --prefix=${prefix} --exec-prefix=${exec_prefix} |
| 44 | echo "INSTALLROOT=${D}" > MCONFIG |
| 45 | |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 46 | if [ "${@bb.utils.filter('PACKAGECONFIG', 'pam', d)}" ]; then |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 47 | echo "USE_PAM=1" >> MCONFIG |
| 48 | fi |
| 49 | |
| 50 | # didn't want to patch these next changes |
| 51 | sed -i 's/netkit-//' ${S}/rsh/pathnames.h |
| 52 | sed -i 's/netkit-//' ${S}/rcp/pathnames.h |
| 53 | } |
| 54 | |
| 55 | do_install () { |
| 56 | install -d ${D}${bindir} |
| 57 | install -d ${D}${sbindir} |
| 58 | install -d ${D}${mandir}/man1 |
| 59 | install -d ${D}${mandir}/man8 |
| 60 | install -d ${D}${sysconfdir}/xinetd.d |
| 61 | |
| 62 | oe_runmake 'INSTALLROOT=${D}' 'BINMODE=0755' \ |
| 63 | 'DAEMONMODE=0755' 'MANMODE=0644' \ |
| 64 | 'SUIDMODE=4755' \ |
| 65 | 'BINDIR=${bindir}' 'SBINDIR=${sbindir}' \ |
| 66 | 'MANDIR=${mandir}' install |
| 67 | |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 68 | if [ "${@bb.utils.filter('PACKAGECONFIG', 'pam', d)}" ]; then |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 69 | install -d ${D}${sysconfdir}/pam.d |
| 70 | install -m 0644 debian/hosts.equiv ${D}/${sysconfdir} |
| 71 | install -m 0644 ${WORKDIR}/rexec.pam ${D}/${sysconfdir}/pam.d/rexec |
| 72 | install -m 0644 ${WORKDIR}/rlogin.pam ${D}/${sysconfdir}/pam.d/rlogin |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 73 | install -m 0644 ${WORKDIR}/rsh.pam ${D}/${sysconfdir}/pam.d/rsh |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 74 | fi |
| 75 | cp ${WORKDIR}/rexec.xinetd.netkit ${D}/${sysconfdir}/xinetd.d/rexec |
| 76 | cp ${WORKDIR}/rlogin.xinetd.netkit ${D}/${sysconfdir}/xinetd.d/rlogin |
| 77 | cp ${WORKDIR}/rsh.xinetd.netkit ${D}/${sysconfdir}/xinetd.d/rsh |
| 78 | } |
| 79 | |
| 80 | PACKAGES = "${PN}-client ${PN}-server ${PN}-doc ${BPN}-dbg" |
| 81 | |
| 82 | FILES_${PN}-client = "${bindir}/*" |
| 83 | FILES_${PN}-server = "${sbindir}/* ${sysconfdir}" |
| 84 | FILES_${PN}-doc = "${mandir}" |
| 85 | FILES_${PN}-dbg = "${prefix}/src/debug \ |
| 86 | ${sbindir}/.debug ${bindir}/.debug" |
| 87 | |
| 88 | ALTERNATIVE_PRIORITY = "80" |
| 89 | ALTERNATIVE_${PN}-client = "rcp rexec rlogin rsh" |
| 90 | ALTERNATIVE_${PN}-server = "rshd rexecd rlogind" |
| 91 | ALTERNATIVE_LINK_NAME[server] = "${bindir}/rshd" |
| 92 | ALTERNATIVE_TARGET[rshd] = "${sbindir}/in.rshd" |
| 93 | ALTERNATIVE_LINK_NAME[rexecd] = "${bindir}/rexecd" |
| 94 | ALTERNATIVE_TARGET[rexecd] = "${sbindir}/in.rexecd" |
| 95 | ALTERNATIVE_LINK_NAME[rlogind] = "${bindir}/rlogind" |
| 96 | ALTERNATIVE_TARGET[rlogind] = "${sbindir}/in.rlogind" |
| 97 | |
| 98 | RCONFLICTS_${PN}-server += "inetutils-rshd" |
| 99 | RPROVIDES_${PN}-server = "rshd" |
| 100 | |
| 101 | RDEPENDS_${PN}-server = "xinetd" |
| 102 | RDEPENDS_${PN}-server += "tcp-wrappers" |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 103 | |
| 104 | # http://errors.yoctoproject.org/Errors/Details/186963/ |
| 105 | EXCLUDE_FROM_WORLD_libc-musl = "1" |