couchdb-1.6.1.ebuild 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. # Copyright 1999-2017 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=5
  4. inherit eutils multilib pax-utils user
  5. DESCRIPTION="Distributed, fault-tolerant and schema-free document-oriented database"
  6. HOMEPAGE="http://couchdb.apache.org/"
  7. SRC_URI="mirror://apache/couchdb/source/${PV}/apache-${P}.tar.gz"
  8. LICENSE="Apache-2.0"
  9. SLOT="0"
  10. KEYWORDS="amd64 ppc x86"
  11. IUSE="selinux test"
  12. RDEPEND=">=dev-libs/icu-4.3.1:=
  13. <dev-lang/erlang-18.0[ssl]
  14. >=dev-libs/openssl-0.9.8j:0
  15. >=net-misc/curl-7.18.2
  16. <dev-lang/spidermonkey-1.8.7
  17. selinux? ( sec-policy/selinux-couchdb )"
  18. DEPEND="${RDEPEND}"
  19. RESTRICT=test
  20. S="${WORKDIR}/apache-${P}"
  21. pkg_setup() {
  22. enewgroup couchdb
  23. enewuser couchdb -1 -1 /var/lib/couchdb couchdb
  24. }
  25. src_prepare() {
  26. sed -i ./src/couchdb/priv/Makefile.* -e 's|-Werror||g'
  27. }
  28. src_configure() {
  29. econf \
  30. --with-erlang="${EPREFIX}"/usr/$(get_libdir)/erlang/usr/include \
  31. --localstatedir="${EPREFIX}"/var \
  32. --with-js-lib="${EPREFIX}"/usr/$(get_libdir)
  33. # bug 296609, upstream bug #COUCHDB-621
  34. sed -e "s#localdocdir = /usr/share/doc/couchdb#localdocdir = "${EPREFIX}"/usr/share/doc/${PF}#" -i Makefile || die "sed failed"
  35. }
  36. src_compile() {
  37. emake
  38. # bug 442616
  39. pax-mark mr src/couchdb/priv/couchjs
  40. }
  41. src_test() {
  42. emake distcheck
  43. }
  44. src_install() {
  45. emake DESTDIR="${D}" install
  46. fowners couchdb:couchdb \
  47. /var/lib/couchdb \
  48. /var/log/couchdb
  49. for f in "${ED}"/etc/couchdb/*.ini ; do
  50. fowners root:couchdb "${f#${ED}}"
  51. fperms 660 "${f#${ED}}"
  52. done
  53. fperms 664 /etc/couchdb/default.ini
  54. newinitd "${FILESDIR}/couchdb.init-4" couchdb
  55. newconfd "${FILESDIR}/couchdb.conf-2" couchdb
  56. sed -i -e "s:LIBDIR:$(get_libdir):" "${ED}/etc/conf.d/couchdb"
  57. }