atheme-services-7.0.6-r1.ebuild 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  1. # Copyright 1999-2014 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=5
  4. inherit eutils flag-o-matic perl-module user
  5. DESCRIPTION="A portable and secure set of open-source and modular IRC services"
  6. HOMEPAGE="http://atheme.net/"
  7. SRC_URI="http://atheme.net/downloads/${P}.tar.bz2"
  8. LICENSE="BSD"
  9. SLOT="0"
  10. KEYWORDS="amd64 x86 ~x86-fbsd ~amd64-linux"
  11. IUSE="cracklib largenet ldap nls +pcre perl profile ssl"
  12. RDEPEND=">=dev-libs/libmowgli-2.0.0:2
  13. cracklib? ( sys-libs/cracklib )
  14. ldap? ( net-nds/openldap )
  15. nls? ( sys-devel/gettext )
  16. perl? ( dev-lang/perl )
  17. pcre? ( dev-libs/libpcre )
  18. ssl? ( dev-libs/openssl )"
  19. DEPEND="${RDEPEND}
  20. virtual/pkgconfig"
  21. pkg_setup() {
  22. # the dependency calculation puts all of the .c files together and
  23. # overwhelms cc1 with this flag :-(
  24. filter-flags -combine
  25. if use profile; then
  26. # bug #371119
  27. ewarn "USE=\"profile\" is incompatible with the hardened profile's -pie flag."
  28. ewarn "Disabling PIE. Please ignore any warning messages about -nopie being invalid."
  29. append-flags -nopie
  30. fi
  31. enewgroup ${PN}
  32. enewuser ${PN} -1 -1 /var/lib/atheme ${PN}
  33. }
  34. src_prepare() {
  35. # fix docdir
  36. sed -i -e 's/\(^DOCDIR.*=.\)@DOCDIR@/\1@docdir@/' extra.mk.in || die
  37. # basic logging config directive fix
  38. sed -i -e '/^logfile/s;var/\(.*\.log\);'"${EPREFIX}"'/var/log/atheme/\1;g' dist/* || die
  39. # QA against bundled libs
  40. rm -rf libmowgli-2 || die
  41. }
  42. src_configure() {
  43. # perl scriping module support is also broken in 7.0.0. Yay for QA failures.
  44. econf \
  45. atheme_cv_c_gcc_w_error_implicit_function_declaration=no \
  46. --sysconfdir="${EPREFIX}"/etc/${PN} \
  47. --docdir="${EPREFIX}"/usr/share/doc/${PF} \
  48. --localstatedir="${EPREFIX}"/var \
  49. --enable-fhs-paths \
  50. --disable-warnings \
  51. --enable-contrib \
  52. $(use_enable largenet large-net) \
  53. $(use_with cracklib) \
  54. $(use_with ldap) \
  55. $(use_with nls) \
  56. $(use_enable profile) \
  57. $(use_with pcre) \
  58. $(use_with perl) \
  59. $(use_enable ssl)
  60. }
  61. src_compile() {
  62. emake V=1
  63. }
  64. src_install() {
  65. emake DESTDIR="${D}" install
  66. insinto /etc/${PN}
  67. for conf in dist/*.example; do
  68. # The .cron file isn't meant to live in /etc/${PN}, so only
  69. # install a .example version.
  70. [[ ${conf} == *cron* ]] && continue
  71. newins ${conf} $(basename ${conf} .example)
  72. done
  73. fowners -R 0:${PN} /etc/${PN}
  74. keepdir /var/{lib,log}/atheme
  75. fowners ${PN}:${PN} /var/{lib,log,run}/atheme
  76. fperms -R go-w,o-rx /etc/${PN}
  77. fperms 750 /etc/${PN} /var/{lib,log,run}/atheme
  78. newinitd "${FILESDIR}"/${PN}.initd ${PN}
  79. mv "${ED}"/usr/bin/{,atheme-}dbverify || die
  80. # contributed scripts and such:
  81. insinto /usr/share/doc/${PF}/contrib
  82. doins contrib/*.{c,pl,php,py,rb}
  83. if use perl; then
  84. perl_set_version
  85. insinto "${VENDOR_LIB#${EPREFIX}}"
  86. doins -r contrib/Atheme{,.pm}
  87. fi
  88. }