netkit-telnetd-0.17-r10.ebuild 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. # Copyright 1999-2013 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI="5"
  4. inherit eutils toolchain-funcs
  5. PATCHLEVEL=36
  6. DESCRIPTION="Standard Linux telnet client and server"
  7. #old HOMEPAGE="ftp://ftp.uk.linux.org/pub/linux/Networking/netkit/"
  8. # This might be the best HOMEPAGE now?
  9. HOMEPAGE="https://launchpad.net/netkit-telnet"
  10. # http://packages.debian.org/stablesource/netkit-telnet
  11. # http://packages.debian.org/testing/source/netkit-telnet
  12. # No upstream mirror exists anymore?
  13. # old ftp://ftp.uk.linux.org/pub/linux/Networking/netkit/netkit-telnet-${PV}.tar.gz
  14. SRC_URI="mirror://gentoo/netkit-telnet-${PV}.tar.gz
  15. mirror://debian/pool/main/n/netkit-telnet/netkit-telnet_0.17-${PATCHLEVEL}.diff.gz"
  16. LICENSE="BSD"
  17. SLOT="0"
  18. KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 s390 sh sparc x86"
  19. IUSE=""
  20. DEPEND=">=sys-libs/ncurses-5.2:=
  21. !net-misc/telnet-bsd"
  22. RDEPEND="${DEPEND}"
  23. S=${WORKDIR}/netkit-telnet-${PV}
  24. src_prepare() {
  25. # Patch: [0]
  26. # Gentoo lacks a maintainer for this package right now. And a
  27. # security problem arose. While reviewing our options for how
  28. # should we proceed with the security bug we decided it would be
  29. # better to just stay in sync with debian's own netkit-telnet
  30. # package. Lots of bug fixes by them over time which were not in
  31. # our telnetd.
  32. epatch "${WORKDIR}"/netkit-telnet_0.17-${PATCHLEVEL}.diff
  33. # Patch: [1]
  34. # after the deb patch we need to add a small patch that defines
  35. # gnu source. This is needed for gcc-3.4.x (needs to be pushed
  36. # back to the deb folk?)
  37. epatch "${FILESDIR}"/netkit-telnetd-0.17-cflags-gnu_source.patch
  38. # Fix portability issues.
  39. sed -i \
  40. -e 's:echo -n:printf %s:' \
  41. configure || die
  42. }
  43. src_configure() {
  44. tc-export CC CXX
  45. # Not a real autoconf script.
  46. ./configure --prefix=/usr || die
  47. sed -i \
  48. -e "s:-pipe -O2:${CFLAGS}:" \
  49. -e "s:^\(LDFLAGS=\).*:\1${LDFLAGS}:" \
  50. -e "s:-Wpointer-arith::" \
  51. MCONFIG || die
  52. }
  53. src_compile() {
  54. emake
  55. emake -C telnetlogin
  56. }
  57. src_install() {
  58. dobin telnet/telnet
  59. dosbin telnetd/telnetd
  60. dosym telnetd /usr/sbin/in.telnetd
  61. dosbin telnetlogin/telnetlogin
  62. doman telnet/telnet.1
  63. doman telnetd/*.8
  64. doman telnetd/issue.net.5
  65. dosym telnetd.8 /usr/share/man/man8/in.telnetd.8
  66. doman telnetlogin/telnetlogin.8
  67. dodoc BUGS ChangeLog README
  68. dodoc "${FILESDIR}"/net.issue.sample
  69. newdoc telnet/README README.telnet
  70. newdoc telnet/TODO TODO.telnet
  71. insinto /etc/xinetd.d
  72. newins "${FILESDIR}"/telnetd.xinetd telnetd
  73. }