eggdrop-1.6.21-r1.ebuild 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  1. # Copyright 1999-2016 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=6
  4. inherit eutils
  5. MY_P="eggdrop${PV}"
  6. PATCHSET_V="1.0"
  7. DESCRIPTION="An IRC bot extensible with C or TCL"
  8. HOMEPAGE="http://www.eggheads.org/"
  9. SRC_URI="
  10. ftp://ftp.eggheads.org/pub/eggdrop/source/1.6/${MY_P}.tar.bz2
  11. https://dev.gentoo.org/~binki/distfiles/${CATEGORY}/${PN}/${P}-patches-${PATCHSET_V}.tar.bz2"
  12. KEYWORDS="alpha amd64 ia64 ~mips ppc sparc x86"
  13. LICENSE="GPL-2"
  14. SLOT="0"
  15. IUSE="debug mysql postgres ssl static vanilla"
  16. REQUIRED_USE="vanilla? ( !mysql !postgres !ssl )"
  17. DEPEND="
  18. dev-lang/tcl:0
  19. sys-apps/gentoo-functions
  20. !vanilla? (
  21. mysql? ( virtual/mysql )
  22. postgres? ( dev-db/postgresql:*[server] )
  23. ssl? ( dev-libs/openssl:0= )
  24. )"
  25. RDEPEND="${DEPEND}"
  26. S=${WORKDIR}/${MY_P}
  27. src_prepare() {
  28. # fix bug 571004 and a QA warning
  29. epatch "${FILESDIR}/${P}-fix-gcc5-remove-inline.patch" \
  30. "${FILESDIR}/${P}-fix-memset.patch"
  31. if use vanilla; then
  32. rm -f "${WORKDIR}"/patch/[1-6]*.patch || die
  33. fi
  34. EPATCH_SUFFIX="patch" epatch
  35. # fix bug #335230
  36. sed -i \
  37. -e '/\$(LD)/s/-o/$(CFLAGS) $(LDFLAGS) &/' \
  38. src/mod/*.mod/Makefile* src/Makefile.in || die
  39. default
  40. }
  41. src_configure() {
  42. use mysql || ( echo mysql ; echo mystats ) >>disabled_modules
  43. use postgres || echo pgstats >>disabled_modules
  44. use static && ( echo rijndael ; echo twofish ) >>disabled_modules
  45. econf $(use_with ssl)
  46. emake config
  47. }
  48. src_compile() {
  49. local target=""
  50. if use static && use debug; then
  51. target="sdebug"
  52. elif use static; then
  53. target="static"
  54. elif use debug; then
  55. target="debug"
  56. fi
  57. emake -j1 ${target} # fixes #533490
  58. }
  59. src_install() {
  60. local a b
  61. emake DEST="${D}"/opt/eggdrop install
  62. for a in doc/*; do
  63. [ -f ${a} ] && dodoc ${a}
  64. done
  65. for a in src/mod/*.mod; do
  66. for b in README UPDATES INSTALL TODO CONTENTS; do
  67. [[ -f ${a}/${b} ]] && newdoc ${a}/${b} ${b}.${a##*/}
  68. done
  69. done
  70. dodoc text/motd.*
  71. use vanilla || dodoc \
  72. src/mod/botnetop.mod/botnetop.conf \
  73. src/mod/gseen.mod/gseen.conf \
  74. src/mod/mc_greet.mod/mc_greet.conf \
  75. src/mod/stats.mod/stats.conf \
  76. src/mod/away.mod/away.doc \
  77. src/mod/rcon.mod/matchbot.tcl \
  78. src/mod/mystats.mod/tools/mystats.{conf,sql} \
  79. src/mod/pgstats.mod/tools/{pgstats.conf,setup.sql}
  80. dodoc -r doc/html
  81. dobin "${FILESDIR}"/eggdrop-installer
  82. doman doc/man1/eggdrop.1
  83. }
  84. pkg_postinst() {
  85. elog "Please run /usr/bin/eggdrop-installer to install your eggdrop bot."
  86. }