groonga-5.0.9.ebuild 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. # Copyright 1999-2015 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=5
  4. inherit eutils libtool user
  5. DESCRIPTION="An Embeddable Fulltext Search Engine"
  6. HOMEPAGE="http://groonga.org/"
  7. SRC_URI="http://packages.groonga.org/source/${PN}/${P}.tar.gz"
  8. LICENSE="LGPL-2.1"
  9. SLOT="0"
  10. KEYWORDS="~amd64 ~x86"
  11. IUSE="abort benchmark debug doc dynamic-malloc-change +exact-alloc-count examples fmalloc futex libedit libevent lzo mecab msgpack +nfkc sphinx static-libs uyield zeromq zlib"
  12. RDEPEND="benchmark? ( >=dev-libs/glib-2.8 )
  13. libedit? ( >=dev-libs/libedit-3 )
  14. libevent? ( dev-libs/libevent )
  15. lzo? ( dev-libs/lzo )
  16. mecab? ( >=app-text/mecab-0.80 )
  17. msgpack? ( dev-libs/msgpack )
  18. sphinx? ( >=dev-python/sphinx-1.0.1 )
  19. zeromq? ( net-libs/zeromq )
  20. zlib? ( sys-libs/zlib )"
  21. DEPEND="${RDEPEND}
  22. virtual/pkgconfig
  23. sphinx? ( dev-python/sphinx )"
  24. REQUIRED_USE=" abort? ( dynamic-malloc-change ) fmalloc? ( dynamic-malloc-change ) sphinx? ( doc )"
  25. pkg_setup() {
  26. enewgroup groonga
  27. enewuser groonga -1 -1 -1 groonga
  28. }
  29. src_prepare() {
  30. elibtoolize
  31. }
  32. src_configure() {
  33. # httpd is a bundled copy of nginx; disabled for security reasons
  34. # prce only is used with httpd
  35. # kytea and libstemmer are not available in portage
  36. # ruby is only used for an http test
  37. econf \
  38. --disable-groonga-httpd \
  39. --without-pcre \
  40. --without-kytea \
  41. --without-libstemmer \
  42. --with-log-path="${EROOT}var/log/${PN}.log" \
  43. --docdir="${EROOT}usr/share/doc/${P}" \
  44. --without-ruby \
  45. $(use_enable abort) \
  46. $(use_enable benchmark) \
  47. $(use_enable debug memory-debug) \
  48. $(use_enable doc document) \
  49. $(use_enable dynamic-malloc-change) \
  50. $(use_enable exact-alloc-count) \
  51. $(use_enable fmalloc) \
  52. $(use_enable futex) \
  53. $(use_enable libedit) \
  54. $(use_with libevent) \
  55. $(use_with lzo) \
  56. $(use_with mecab) \
  57. $(use_with msgpack message-pack "${EROOT}usr") \
  58. $(use_enable nfkc) \
  59. $(use_with sphinx sphinx-build) \
  60. $(use_enable static-libs static) \
  61. $(use_enable uyield) \
  62. $(use_enable zeromq) \
  63. $(use_with zlib)
  64. }
  65. src_install() {
  66. default
  67. prune_libtool_files
  68. newinitd "${FILESDIR}/${PN}.initd" ${PN}
  69. newconfd "${FILESDIR}/${PN}.confd" ${PN}
  70. keepdir /var/{log,lib}/${PN}
  71. fowners groonga:groonga /var/{log,lib}/${PN}
  72. dodoc README.md
  73. use examples || rm -r "${D}usr/share/${PN}" || die
  74. # Extra init script
  75. rm -r "${D}usr/sbin/groonga-httpd-restart" || die
  76. }