Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 1 | DESCRIPTION = "netkit-telnet includes the telnet daemon and client." |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 2 | HOMEPAGE = "http://www.hcs.harvard.edu/~dholland/computers/netkit.html" |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 3 | SECTION = "net" |
| 4 | DEPENDS = "ncurses" |
| 5 | LICENSE = "BSD" |
| 6 | LIC_FILES_CHKSUM = "file://telnet/telnet.cc;beginline=2;endline=3;md5=780868e7b566313e70cb701560ca95ef" |
| 7 | |
| 8 | SRC_URI = "ftp://ftp.uk.linux.org/pub/linux/Networking/netkit/${BP}.tar.gz \ |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 9 | 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 \ |
| 14 | " |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 15 | |
| 16 | EXTRA_OEMAKE = "INSTALLROOT=${D} SBINDIR=${sbindir} DAEMONMODE=755 \ |
| 17 | MANMODE=644 MANDIR=${mandir}" |
| 18 | |
| 19 | do_configure () { |
| 20 | ./configure --prefix=${prefix} |
| 21 | sed -e 's#^CFLAGS=\(.*\)$#CFLAGS= -D_GNU_SOURCE \1#' \ |
| 22 | -e 's#^CXXFLAGS=\(.*\)$#CXXFLAGS= -D_GNU_SOURCE \1#' \ |
| 23 | -e 's#^LDFLAGS=.*$#LDFLAGS= ${LDFLAGS}#' \ |
| 24 | -i MCONFIG |
| 25 | } |
| 26 | |
| 27 | do_compile () { |
| 28 | oe_runmake 'CC=${CC}' 'LD=${LD}' 'LDFLAGS=${LDFLAGS}' SUB=telnet |
| 29 | oe_runmake 'CC=${CC}' 'LD=${LD}' 'LDFLAGS=${LDFLAGS}' LIBS=-lutil SUB=telnetd |
| 30 | oe_runmake 'CC=${CC}' 'LD=${LD}' 'LDFLAGS=${LDFLAGS}' SUB=telnetlogin |
| 31 | } |
| 32 | |
| 33 | do_install () { |
| 34 | install -d ${D}${bindir} |
| 35 | install -m 0755 telnet/telnet ${D}${bindir}/telnet.${PN} |
| 36 | install -d ${D}${sbindir} |
| 37 | install -d ${D}${mandir}/man1 |
| 38 | install -d ${D}${mandir}/man5 |
| 39 | install -d ${D}${mandir}/man8 |
| 40 | oe_runmake SUB=telnetd install |
| 41 | rm -rf ${D}${mandir}/man1 |
| 42 | install -D -m 4750 ${B}/telnetlogin/telnetlogin ${D}/${libdir}/telnetlogin |
| 43 | # fix up hardcoded paths |
| 44 | sed -i -e 's,/usr/sbin/,${sbindir}/,' ${WORKDIR}/telnet-xinetd |
| 45 | install -d ${D}/etc/xinetd.d/ |
| 46 | install -p -m644 ${WORKDIR}/telnet-xinetd ${D}/etc/xinetd.d/telnet |
| 47 | } |
| 48 | |
| 49 | pkg_postinst_${PN} () { |
| 50 | #!/bin/sh |
| 51 | update-alternatives --install ${bindir}/telnet telnet telnet.${PN} 100 |
| 52 | } |
| 53 | |
| 54 | pkg_prerm_${PN} () { |
| 55 | #!/bin/sh |
| 56 | update-alternatives --remove telnet telnet.${PN} 100 |
| 57 | } |
| 58 | |
| 59 | SRC_URI[md5sum] = "d6beabaaf53fe6e382c42ce3faa05a36" |
| 60 | SRC_URI[sha256sum] = "9c80d5c7838361a328fb6b60016d503def9ce53ad3c589f3b08ff71a2bb88e00" |
| 61 | FILES_${PN} += "${sbindir}/in.* ${libdir}/* ${sysconfdir}/xinetd.d/*" |