blob: d034cd8eda99811055a026b5de43918fd009ea98 [file] [log] [blame]
Patrick Williamsb48b7b42016-08-17 15:04:38 -05001DESCRIPTION = "netkit-rsh includes the rsh daemon and client."
2SECTION = "net"
3HOMEPAGE="ftp://ftp.uk.linux.org/pub/linux/Networking/netkit"
4LICENSE = "BSD-4-Clause"
Brad Bishop1a4b7ee2018-12-16 17:11:34 -08005DEPENDS = "xinetd libgcrypt virtual/crypt"
Patrick Williamsb48b7b42016-08-17 15:04:38 -05006
7LIC_FILES_CHKSUM = "file://rsh/rsh.c;endline=32;md5=487b3c637bdc181d32b2a8543d41b606"
8
9SRC_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 Williamsddad1a12017-02-23 20:36:32 -060018 file://fixup_wait3_api_change.patch \
Patrick Williamsb48b7b42016-08-17 15:04:38 -050019"
20
21SRC_URI[archive.md5sum] = "65f5f28e2fe22d9ad8b17bb9a10df096"
22SRC_URI[archive.sha256sum] = "edcac7fa18015f0bc04e573f3f54ae3b638d71335df1ad7dae692779914ad669"
23SRC_URI[patch15.md5sum] = "655efc0d541b03ca5de0ae506c805ea3"
24SRC_URI[patch15.sha256sum] = "2bc071c438e8b0ed42a0bd2db2d8b681b27a1e9b1798694d9874733293bc2aa9"
25
26# Other support files
27PAM_SRC_URI = "file://rexec.pam \
Patrick Williamsddad1a12017-02-23 20:36:32 -060028 file://rlogin.pam \
29 file://rsh.pam \
30"
31SRC_URI += "${@bb.utils.contains('DISTRO_FEATURES', 'pam', '${PAM_SRC_URI}', '', d)}"
Patrick Williamsb48b7b42016-08-17 15:04:38 -050032
33inherit pkgconfig
34
35CFLAGS += " -D_GNU_SOURCE -Wno-deprecated-declarations"
36LDFLAGS += " -L${STAGING_LIBDIR} -lutil -lcrypt"
37
38PACKAGECONFIG ??= ""
Brad Bishop6e60e8b2018-02-01 10:27:11 -050039PACKAGECONFIG += "${@bb.utils.filter('DISTRO_FEATURES', 'pam', d)}"
Patrick Williamsb48b7b42016-08-17 15:04:38 -050040PACKAGECONFIG[pam] = " , --without-pam, libpam, libpam"
41
Brad Bishop19323692019-04-05 15:28:33 -040042COMPATIBLE_HOST_libc-musl = 'null'
43
Patrick Williamsb48b7b42016-08-17 15:04:38 -050044do_configure () {
45 ./configure --prefix=${prefix} --exec-prefix=${exec_prefix}
46 echo "INSTALLROOT=${D}" > MCONFIG
47
Brad Bishop6e60e8b2018-02-01 10:27:11 -050048 if [ "${@bb.utils.filter('PACKAGECONFIG', 'pam', d)}" ]; then
Patrick Williamsb48b7b42016-08-17 15:04:38 -050049 echo "USE_PAM=1" >> MCONFIG
50 fi
51
52 # didn't want to patch these next changes
53 sed -i 's/netkit-//' ${S}/rsh/pathnames.h
54 sed -i 's/netkit-//' ${S}/rcp/pathnames.h
55}
56
57do_install () {
58 install -d ${D}${bindir}
59 install -d ${D}${sbindir}
60 install -d ${D}${mandir}/man1
61 install -d ${D}${mandir}/man8
62 install -d ${D}${sysconfdir}/xinetd.d
63
64 oe_runmake 'INSTALLROOT=${D}' 'BINMODE=0755' \
65 'DAEMONMODE=0755' 'MANMODE=0644' \
66 'SUIDMODE=4755' \
67 'BINDIR=${bindir}' 'SBINDIR=${sbindir}' \
68 'MANDIR=${mandir}' install
69
Brad Bishop6e60e8b2018-02-01 10:27:11 -050070 if [ "${@bb.utils.filter('PACKAGECONFIG', 'pam', d)}" ]; then
Patrick Williamsb48b7b42016-08-17 15:04:38 -050071 install -d ${D}${sysconfdir}/pam.d
72 install -m 0644 debian/hosts.equiv ${D}/${sysconfdir}
73 install -m 0644 ${WORKDIR}/rexec.pam ${D}/${sysconfdir}/pam.d/rexec
74 install -m 0644 ${WORKDIR}/rlogin.pam ${D}/${sysconfdir}/pam.d/rlogin
Brad Bishopd7bf8c12018-02-25 22:55:05 -050075 install -m 0644 ${WORKDIR}/rsh.pam ${D}/${sysconfdir}/pam.d/rsh
Patrick Williamsb48b7b42016-08-17 15:04:38 -050076 fi
77 cp ${WORKDIR}/rexec.xinetd.netkit ${D}/${sysconfdir}/xinetd.d/rexec
78 cp ${WORKDIR}/rlogin.xinetd.netkit ${D}/${sysconfdir}/xinetd.d/rlogin
79 cp ${WORKDIR}/rsh.xinetd.netkit ${D}/${sysconfdir}/xinetd.d/rsh
80}
81
82PACKAGES = "${PN}-client ${PN}-server ${PN}-doc ${BPN}-dbg"
83
84FILES_${PN}-client = "${bindir}/*"
85FILES_${PN}-server = "${sbindir}/* ${sysconfdir}"
86FILES_${PN}-doc = "${mandir}"
87FILES_${PN}-dbg = "${prefix}/src/debug \
88 ${sbindir}/.debug ${bindir}/.debug"
89
90ALTERNATIVE_PRIORITY = "80"
91ALTERNATIVE_${PN}-client = "rcp rexec rlogin rsh"
92ALTERNATIVE_${PN}-server = "rshd rexecd rlogind"
93ALTERNATIVE_LINK_NAME[server] = "${bindir}/rshd"
94ALTERNATIVE_TARGET[rshd] = "${sbindir}/in.rshd"
95ALTERNATIVE_LINK_NAME[rexecd] = "${bindir}/rexecd"
96ALTERNATIVE_TARGET[rexecd] = "${sbindir}/in.rexecd"
97ALTERNATIVE_LINK_NAME[rlogind] = "${bindir}/rlogind"
98ALTERNATIVE_TARGET[rlogind] = "${sbindir}/in.rlogind"
99
100RCONFLICTS_${PN}-server += "inetutils-rshd"
101RPROVIDES_${PN}-server = "rshd"
102
103RDEPENDS_${PN}-server = "xinetd"
104RDEPENDS_${PN}-server += "tcp-wrappers"
Brad Bishop1a4b7ee2018-12-16 17:11:34 -0800105
106# http://errors.yoctoproject.org/Errors/Details/186963/
107EXCLUDE_FROM_WORLD_libc-musl = "1"