ptlink-ircd-6.19.6-r3.ebuild 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  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 user
  5. MY_P="PTlink${PV}"
  6. DESCRIPTION="Secure IRC daemon with many advanced features"
  7. HOMEPAGE="http://www.ptlink.net/"
  8. SRC_URI="ftp://ftp.sunsite.dk/projects/ptlink/ircd/${MY_P}.tar.gz"
  9. LICENSE="GPL-2"
  10. SLOT="0"
  11. KEYWORDS="~ppc ~sparc ~x86"
  12. IUSE="ssl"
  13. DEPEND="
  14. sys-libs/zlib
  15. ssl? ( dev-libs/openssl:0= )"
  16. S=${WORKDIR}/${MY_P}
  17. src_prepare() {
  18. ecvs_clean
  19. default
  20. }
  21. src_configure() {
  22. econf \
  23. --disable-ipv6 \
  24. $(use_with ssl ssl openssl)
  25. }
  26. src_compile() {
  27. emake CFLAGS="${CFLAGS}"
  28. }
  29. src_install() {
  30. newbin src/ircd ptlink-ircd
  31. newbin tools/fixklines ptlink-ircd-fixklines
  32. newbin tools/mkpasswd ptlink-ircd-mkpasswd
  33. insinto /etc/ptlink-ircd
  34. fperms 700 /etc/ptlink-ircd
  35. doins samples/{kline.conf,{opers,ptlink}.motd,help.{admin,oper,user}}
  36. newins samples/example.conf.short ircd.conf
  37. newins samples/example.conf.trillian ircd.conf.trillian
  38. newins samples/main.dconf.sample main.dconf
  39. newins samples/network.dconf.sample network.dconf
  40. insinto /usr/share/ptlink-ircd/codepage
  41. doins src/codepage/*.enc
  42. dosym /usr/share/ptlink-ircd/codepage /etc/ptlink-ircd/codepage
  43. rm -rf doc/old
  44. dodoc doc/* doc_hybrid6/* ircdcron/* CHANGES README
  45. keepdir /var/log/ptlink-ircd /var/lib/ptlink-ircd
  46. dosym /var/log/ptlink-ircd /var/lib/ptlink-ircd/log
  47. newinitd "${FILESDIR}/ptlink-ircd.initd" ptlink-ircd
  48. newconfd "${FILESDIR}/ptlink-ircd.confd" ptlink-ircd
  49. }
  50. pkg_postinst() {
  51. # Move docert from src_install() to install_cert for bug #201678
  52. use ssl && (
  53. if [[ ! -f "${ROOT}"/etc/ptlink-ircd/server.key.pem ]]; then
  54. install_cert /etc/ptlink-ircd/server || die "install_cert failed"
  55. mv "${ROOT}"/etc/ptlink-ircd/server.{crt,cert.pem}
  56. mv "${ROOT}"/etc/ptlink-ircd/server.{csr,req.pem}
  57. mv "${ROOT}"/etc/ptlink-ircd/server.key{,.pem}
  58. fi
  59. )
  60. enewuser ptlink-ircd
  61. chown ptlink-ircd \
  62. "${ROOT}"/{etc,var/{log,lib}}/ptlink-ircd \
  63. "${ROOT}"/etc/ptlink-ircd/server.key.pem
  64. echo
  65. elog "PTlink IRCd will run without configuration, although this is strongly"
  66. elog "advised against."
  67. echo
  68. elog "You can find example cron script ircd.cron here:"
  69. elog " /usr/share/doc/${PF}"
  70. echo
  71. elog "You can also use /etc/init.d/ptlink-ircd to start at boot"
  72. echo
  73. }