netkit-ftpd-0.17-r9.ebuild 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. # Copyright 1999-2016 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=6
  4. inherit eutils ssl-cert toolchain-funcs
  5. MY_P="linux-ftpd-${PV}"
  6. DESCRIPTION="The netkit FTP server with optional SSL support"
  7. HOMEPAGE="http://www.hcs.harvard.edu/~dholland/computers/netkit.html"
  8. SRC_URI="ftp://ftp.uk.linux.org/pub/linux/Networking/netkit/${MY_P}.tar.gz
  9. mirror://gentoo/${MY_P}-ssl.patch"
  10. LICENSE="BSD"
  11. SLOT="0"
  12. KEYWORDS="alpha amd64 arm ia64 ppc ~ppc64 s390 sh sparc x86"
  13. IUSE="libressl ssl"
  14. DEPEND="ssl? (
  15. !libressl? ( dev-libs/openssl:0= )
  16. libressl? ( dev-libs/libressl:0= ) )
  17. "
  18. RDEPEND="${DEPEND}
  19. virtual/inetd
  20. !www-servers/publicfile"
  21. S=${WORKDIR}/${MY_P}
  22. src_prepare() {
  23. default
  24. cd "${S}" || die
  25. if use ssl; then
  26. epatch "${DISTDIR}"/${MY_P}-ssl.patch
  27. epatch "${FILESDIR}"/${P}-cleanup-ssl.patch
  28. epatch "${FILESDIR}"/${P}-fclose-CVE-2007-6263.patch #199206
  29. fi
  30. epatch "${FILESDIR}"/${P}-cleanup.patch
  31. epatch "${FILESDIR}"/${P}-build.patch
  32. epatch "${FILESDIR}"/${P}-shadowfix.patch
  33. epatch "${FILESDIR}"/${P}-gcc41.patch
  34. epatch "${FILESDIR}"/${P}-setguid.patch
  35. epatch "${FILESDIR}"/${P}-cross.patch
  36. epatch "${FILESDIR}"/${P}-CVE-2008-4247.patch #239047
  37. }
  38. src_configure() {
  39. tc-export CC
  40. ./configure --prefix=/usr || die
  41. }
  42. src_compile() {
  43. emake
  44. }
  45. src_install() {
  46. dobin ftpd/ftpd
  47. doman ftpd/ftpd.8
  48. dodoc README ChangeLog
  49. insinto /etc/xinetd.d
  50. newins "${FILESDIR}"/ftp.xinetd ftp
  51. }
  52. pkg_postinst() {
  53. if use ssl; then
  54. install_cert /etc/ssl/certs/ftpd
  55. elog "In order to start the server with SSL support"
  56. elog "You need a certificate /etc/ssl/certs/ftpd.pem."
  57. elog "A temporary certificiate has been created."
  58. fi
  59. }