blob: db4b1c98cc7887289e6391ae6ec94d14c56d55e9 [file] [log] [blame]
Patrick Williamsb48b7b42016-08-17 15:04:38 -05001DESCRIPTION = "netkit-telnet includes the telnet daemon and client."
Brad Bishopd7bf8c12018-02-25 22:55:05 -05002HOMEPAGE = "http://www.hcs.harvard.edu/~dholland/computers/netkit.html"
Patrick Williamsb48b7b42016-08-17 15:04:38 -05003SECTION = "net"
4DEPENDS = "ncurses"
5LICENSE = "BSD"
6LIC_FILES_CHKSUM = "file://telnet/telnet.cc;beginline=2;endline=3;md5=780868e7b566313e70cb701560ca95ef"
7
Brad Bishop1a4b7ee2018-12-16 17:11:34 -08008SRC_URI = "http://ftp.linux.org.uk/pub/linux/Networking/netkit/${BP}.tar.gz \
Brad Bishop6e60e8b2018-02-01 10:27:11 -05009 file://To-aviod-buffer-overflow-in-telnet.patch \
10 file://Warning-fix-in-the-step-of-install.patch \
11 file://telnet-xinetd \
12 file://cross-compile.patch \
13 file://0001-telnet-telnetd-Fix-print-format-strings.patch \
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080014 file://0001-telnet-telnetd-Fix-deadlock-on-cleanup.patch \
Brad Bishop6e60e8b2018-02-01 10:27:11 -050015 "
Patrick Williamsb48b7b42016-08-17 15:04:38 -050016
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080017UPSTREAM_CHECK_URI = "${DEBIAN_MIRROR}/main/n/netkit-telnet/"
18UPSTREAM_CHECK_REGEX = "(?P<pver>\d+(\.\d+)+)\.orig\.tar"
19
Patrick Williamsb48b7b42016-08-17 15:04:38 -050020EXTRA_OEMAKE = "INSTALLROOT=${D} SBINDIR=${sbindir} DAEMONMODE=755 \
21 MANMODE=644 MANDIR=${mandir}"
22
23do_configure () {
24 ./configure --prefix=${prefix}
25 sed -e 's#^CFLAGS=\(.*\)$#CFLAGS= -D_GNU_SOURCE \1#' \
26 -e 's#^CXXFLAGS=\(.*\)$#CXXFLAGS= -D_GNU_SOURCE \1#' \
27 -e 's#^LDFLAGS=.*$#LDFLAGS= ${LDFLAGS}#' \
28 -i MCONFIG
29}
30
31do_compile () {
32 oe_runmake 'CC=${CC}' 'LD=${LD}' 'LDFLAGS=${LDFLAGS}' SUB=telnet
33 oe_runmake 'CC=${CC}' 'LD=${LD}' 'LDFLAGS=${LDFLAGS}' LIBS=-lutil SUB=telnetd
34 oe_runmake 'CC=${CC}' 'LD=${LD}' 'LDFLAGS=${LDFLAGS}' SUB=telnetlogin
35}
36
37do_install () {
38 install -d ${D}${bindir}
39 install -m 0755 telnet/telnet ${D}${bindir}/telnet.${PN}
40 install -d ${D}${sbindir}
41 install -d ${D}${mandir}/man1
42 install -d ${D}${mandir}/man5
43 install -d ${D}${mandir}/man8
44 oe_runmake SUB=telnetd install
45 rm -rf ${D}${mandir}/man1
46 install -D -m 4750 ${B}/telnetlogin/telnetlogin ${D}/${libdir}/telnetlogin
47 # fix up hardcoded paths
48 sed -i -e 's,/usr/sbin/,${sbindir}/,' ${WORKDIR}/telnet-xinetd
49 install -d ${D}/etc/xinetd.d/
50 install -p -m644 ${WORKDIR}/telnet-xinetd ${D}/etc/xinetd.d/telnet
51}
52
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080053inherit update-alternatives
Patrick Williamsb48b7b42016-08-17 15:04:38 -050054
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080055ALTERNATIVE_PRIORITY = "100"
56ALTERNATIVE_${PN} = "telnet"
57ALTERNATIVE_LINK_NAME[telnet] = "${bindir}/telnet"
58ALTERNATIVE_TARGET[telnet] = "${bindir}/telnet.${PN}"
Patrick Williamsb48b7b42016-08-17 15:04:38 -050059
60SRC_URI[md5sum] = "d6beabaaf53fe6e382c42ce3faa05a36"
61SRC_URI[sha256sum] = "9c80d5c7838361a328fb6b60016d503def9ce53ad3c589f3b08ff71a2bb88e00"
62FILES_${PN} += "${sbindir}/in.* ${libdir}/* ${sysconfdir}/xinetd.d/*"
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080063
64# http://errors.yoctoproject.org/Errors/Details/186954/
65EXCLUDE_FROM_WORLD_libc-musl = "1"