Skip to content

Commit

Permalink
Bumped elasticsearch
Browse files Browse the repository at this point in the history
  • Loading branch information
ercpe committed Aug 19, 2014
1 parent 8f8e97f commit 681d7d6
Show file tree
Hide file tree
Showing 3 changed files with 92 additions and 0 deletions.
5 changes: 5 additions & 0 deletions app-misc/elasticsearch/ChangeLog
Expand Up @@ -2,6 +2,11 @@
# Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2
# $Header: $

*elasticsearch-1.3.2 (19 Aug 2014)

19 Aug 2014; <johann@gentoo.org> +elasticsearch-1.3.2.ebuild:
Bumped elasticsearch

*elasticsearch-1.2.1 (16 Jun 2014)

16 Jun 2014; <johann@gentoo.org> +elasticsearch-1.2.1.ebuild,
Expand Down
1 change: 1 addition & 0 deletions app-misc/elasticsearch/Manifest
@@ -1,2 +1,3 @@
DIST elasticsearch-1.1.1.tar.gz 19872305 SHA256 564cd91bb55cc9d922e59679b0f666e0b4f0bd8c2b9cafd5fce4c55f3f50a835 SHA512 ab4d62b4a87d39e493441ff0b6f7a7dd5db4da742dcc5553c8977eafc7b24a999de5bccc6313ad8ca0e4b36c9d848a13730236e98e7651261c9cbc669901ac44 WHIRLPOOL 8460e43ad8218c2dc734b1d47f1024dd9d380b2d2331089b57f9807596d39e8dcfe817c172cb2c67f96944300ed1ddc6d7c5b36231e5a668e95ecdec0a2514b4
DIST elasticsearch-1.2.1.tar.gz 19849249 SHA256 b2b270de2b520b4a2510454c75d3a6b9a9801b7d9a31754a731d2c0868cf9186 SHA512 f0c4f719c1878722541fff95702f4bcbef6e3ca54e49c3d12caabd1e61979c8d3a4d7e5612fca1e85654859cb8f91e4277190a32072f2274b0c65ef73c8a4f12 WHIRLPOOL 2de344c026ded648b4025ad4ba30c50f96208442d4a2a8cc285e0e106e5066fcd971dabf03c56ee41727788a66591347aa037f3de8af76fdd7774ef58e805791
DIST elasticsearch-1.3.2.tar.gz 27949096 SHA256 7525d0a4db4f7eb791a1f8da97b081a5d8b44a2b232d8324877177bdee992ea4 SHA512 4a67531cf9927db466f70b4c572c472913533352de586f7e2c5f84ec9c7337002a0de0ee2bdb809e99b954bb8bd7d207baf723f1b53b2949702f838c85d6380a WHIRLPOOL 3b3edfefa6e49b2271ed107ecc8d2a84ab3db6834f85eb90c33fc8f9dfff4a815cbd2f3d7af2e6f6a9edfd2186508f6308bdee3846405cebf4ab89e8d13f0ffd
86 changes: 86 additions & 0 deletions app-misc/elasticsearch/elasticsearch-1.3.2.ebuild
@@ -0,0 +1,86 @@
# Copyright 1999-2014 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/app-misc/elasticsearch/elasticsearch-1.0.1.ebuild,v 1.1 2014/03/04 10:42:27 chainsaw Exp $

EAPI=5

inherit eutils systemd user

MY_PN="${PN%-bin}"
DESCRIPTION="Open Source, Distributed, RESTful, Search Engine"
HOMEPAGE="http://www.elasticsearch.org/"
SRC_URI="http://download.${MY_PN}.org/${MY_PN}/${MY_PN}/${MY_PN}-${PV}.tar.gz"
LICENSE="Apache-2.0"
SLOT="0"
KEYWORDS="~amd64"

RESTRICT="strip"
QA_PREBUILT="usr/share/elasticsearch/lib/sigar/libsigar-*.so"

RDEPEND="virtual/jre"

pkg_setup() {
enewgroup ${MY_PN}
enewuser ${MY_PN} -1 /bin/bash /var/lib/${MY_PN} ${MY_PN}
}

src_prepare() {
rm -rf lib/sigar/*{solaris,winnt,freebsd,macosx}*
rm lib/sigar/libsigar-ia64-linux.so
rm LICENSE.txt

mv bin/${MY_PN}.in.sh bin/${MY_PN}.in.sh.sample
for file in config/* ; do
mv ${file} ${file}.sample
done

use amd64 && {
rm lib/sigar/libsigar-x86-linux.so
}

use x86 && {
rm lib/sigar/libsigar-amd64-linux.so
}
}

src_install() {
dodir /etc/${MY_PN}
insinto /etc/${MY_PN}
doins bin/${MY_PN}.in.sh.sample
doins config/*
rm bin/${MY_PN}.in.sh.sample
rm -rf config

insinto /usr/share/${MY_PN}
doins -r ./*
chmod +x "${D}"/usr/share/${MY_PN}/bin/*

keepdir /var/{lib,log}/${MY_PN}

local rcscript=elasticsearch.init2
local eshome="/usr/share/${MY_PN}"
local jarfile="${MY_PN}-${PV}.jar"
local esclasspath="${eshome}/lib/${jarfile}:${eshome}/lib/*:${eshome}/lib/sigar/*"

cp "${FILESDIR}/${rcscript}" "${T}" || die
sed -i \
-e "s|@ES_CLASS_PATH@|${esclasspath}|" \
"${T}/${rcscript}" \
|| die "failed to filter ${rcscript}"

newinitd "${T}/${rcscript}" "${MY_PN}"
newconfd "${FILESDIR}/${MY_PN}.conf" "${MY_PN}"
systemd_dounit "${FILESDIR}"/${PN}.service
}

pkg_postinst() {
elog
elog "You may create multiple instances of ${MY_PN} by"
elog "symlinking the init script ln -sf /etc/init.d/${MY_PN} /etc/init.d/${MY_PN}.instance"
elog
elog "Each of the *.sample files in /etc/${MY_PN} should be copied"
elog "to the proper configuration directory:"
elog "/etc/${MY_PN} (for standard init)"
elog "/etc/${MY_PN}/instance (for symlinked init)"
elog
}

0 comments on commit 681d7d6

Please sign in to comment.