diff options
author | Diego Elio Pettenò <flameeyes@gentoo.org> | 2012-06-04 06:56:29 +0000 |
---|---|---|
committer | Diego Elio Pettenò <flameeyes@gentoo.org> | 2012-06-04 06:56:29 +0000 |
commit | 8cbf0df21750e3f3a27a192311e2067bc84c6431 (patch) | |
tree | e3e16f18a678fc0e5d4330dbf97fbe5c76464dcd /sys-cluster | |
parent | add missing depend on sys-power/pm-utils and remove no long necessary net-mis... (diff) | |
download | gentoo-2-8cbf0df21750e3f3a27a192311e2067bc84c6431.tar.gz gentoo-2-8cbf0df21750e3f3a27a192311e2067bc84c6431.tar.bz2 gentoo-2-8cbf0df21750e3f3a27a192311e2067bc84c6431.zip |
Version bump by Pavel; also update to EAPI=4. Init script update to use default stop() function and checkpath.
(Portage version: 2.2.0_alpha108/cvs/Linux x86_64)
Diffstat (limited to 'sys-cluster')
-rw-r--r-- | sys-cluster/gearmand/ChangeLog | 9 | ||||
-rw-r--r-- | sys-cluster/gearmand/files/gearmand.init.d.2 | 78 | ||||
-rw-r--r-- | sys-cluster/gearmand/gearmand-0.33.ebuild | 89 |
3 files changed, 175 insertions, 1 deletions
diff --git a/sys-cluster/gearmand/ChangeLog b/sys-cluster/gearmand/ChangeLog index b82f2a38a893..56620a2c5d88 100644 --- a/sys-cluster/gearmand/ChangeLog +++ b/sys-cluster/gearmand/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for sys-cluster/gearmand # Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sys-cluster/gearmand/ChangeLog,v 1.12 2012/01/14 17:27:31 xarthisius Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-cluster/gearmand/ChangeLog,v 1.13 2012/06/04 06:56:29 flameeyes Exp $ + +*gearmand-0.33 (04 Jun 2012) + + 04 Jun 2012; Diego E. Pettenò <flameeyes@gentoo.org> +files/gearmand.init.d.2, + +gearmand-0.33.ebuild: + Version bump by Pavel; also update to EAPI=4. Init script update to use + default stop() function and checkpath. 14 Jan 2012; Kacper Kowalik <xarthisius@gentoo.org> metadata.xml: tcmalloc is now global diff --git a/sys-cluster/gearmand/files/gearmand.init.d.2 b/sys-cluster/gearmand/files/gearmand.init.d.2 new file mode 100644 index 000000000000..a3d3b3375824 --- /dev/null +++ b/sys-cluster/gearmand/files/gearmand.init.d.2 @@ -0,0 +1,78 @@ +#!/sbin/runscript +# Copyright 2009-2012 Pavel Stratil, senbonzakura.eu +# Distributed under the terms of the GNU General Public License v2 + +pidfile=/var/run/gearmand/gearmand.pid +command=/usr/sbin/gearmand + +depend() { + use localmount + + case $PERSISTENT in + drizzle) + use drizzle + ;; + memcache) + use memcache + ;; + mysql) + use mysql + ;; + postgre) + use postgresql + ;; + *) + ;; + esac +} + +start() { + case ${PERSISTENT:-none} in + drizzle|mysql) + GEARMAND_PARAMS="${GEARMAND_PARAMS} -q libdrizzle" + [ ${PERSISTENT_HOST} ] && GEARMAND_PARAMS="${GEARMAND_PARAMS} --libdrizzle-host=${PERSISTENT_HOST}" + [ ${PERSISTENT_USER} ] && GEARMAND_PARAMS="${GEARMAND_PARAMS} --libdrizzle-user=${PERSISTENT_USER}" + [ ${PERSISTENT_PASS} ] && GEARMAND_PARAMS="${GEARMAND_PARAMS} --libdrizzle-password=${PERSISTENT_PASS}" + [ ${PERSISTENT_DB} ] && GEARMAND_PARAMS="${GEARMAND_PARAMS} --libdrizzle-db=${PERSISTENT_DB}" + [ ${PERSISTENT_TABLE} ] && GEARMAND_PARAMS="${GEARMAND_PARAMS} --libdrizzle-table=${PERSISTENT_TABLE}" + [ ${PERSISTENT_PORT} ] && GEARMAND_PARAMS="${GEARMAND_PARAMS} --libdrizzle-port=${PERSISTENT_PORT}" + [ ${PERSISTENT_SOCKET} ] && GEARMAND_PARAMS="${GEARMAND_PARAMS} --libdrizzle-uds=${PERSISTENT_SOCKET}" + [ ${PERSISTENT} == "mysql" ] && GEARMAND_PARAMS="${GEARMAND_PARAMS} --libdrizzle-mysql" + ;; + memcache) + [ ${PERSISTENT_SERVERLIST} ] && GEARMAND_PARAMS="${GEARMAND_PARAMS} -q libmemcached --libmemcached-servers=${PERSISTENT_SERVERLIST}" + ;; + postgre) + GEARMAND_PARAMS="${GEARMAND_PARAMS} -q libpq" + [ ${PERSISTENT_HOST} ] && GEARMAND_PARAMS="${GEARMAND_PARAMS} --libpq-host=${PERSISTENT_HOST}" + [ ${PERSISTENT_USER} ] && GEARMAND_PARAMS="${GEARMAND_PARAMS} --libpq-user=${PERSISTENT_USER}" + [ ${PERSISTENT_PASS} ] && GEARMAND_PARAMS="${GEARMAND_PARAMS} --libpq-password=${PERSISTENT_PASS}" + [ ${PERSISTENT_DB} ] && GEARMAND_PARAMS="${GEARMAND_PARAMS} --libpq-dbname=${PERSISTENT_DB}" + [ ${PERSISTENT_PORT} ] && GEARMAND_PARAMS="${GEARMAND_PARAMS} --libpq-port=${PERSISTENT_PORT}" + [ ${PERSISTENT_TABLE} ] && ewarn "Libpq doesn't recognise 'table' parameter." + [ ${PERSISTENT_SOCKET} ] && ewarn "Libpq doesn't recognise 'socket' parameter. If no host is set, it automatically falls back to a socket." + ;; + tokyocabinet) + GEARMAND_PARAMS="${GEARMAND_PARAMS} -q libtokyocabinet --libtokyocabinet-file=${PERSISTENT_FILE}" + ;; + sqlite) + GEARMAND_PARAMS="${GEARMAND_PARAMS} -q libsqlite3 --libsqlite3-db=${PERSISTENT_FILE}" + ;; + none) + ;; + *) + eerror "Wrong persistent queue store setting in /etc/conf.d/gearmand." + return 1 + ;; + esac + + + checkpath -d -m 0755 -o gearmand:nogroup /var/run/gearmand /var/log/gearmand + + ebegin "Starting ${SVCNAME}" + start-stop-daemon --pidfile /var/run/gearmand/gearmand.pid --start \ + --exec /usr/sbin/gearmand -- --pid-file=/var/run/gearmand/gearmand.pid \ + --user=gearmand --daemon \ + --log-file=/var/log/gearmand/gearmand.log ${GEARMAND_PARAMS} + eend $? +} diff --git a/sys-cluster/gearmand/gearmand-0.33.ebuild b/sys-cluster/gearmand/gearmand-0.33.ebuild new file mode 100644 index 000000000000..28360de4e481 --- /dev/null +++ b/sys-cluster/gearmand/gearmand-0.33.ebuild @@ -0,0 +1,89 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-cluster/gearmand/gearmand-0.33.ebuild,v 1.1 2012/06/04 06:56:29 flameeyes Exp $ + +EAPI=4 + +inherit flag-o-matic libtool + +DESCRIPTION="Generic framework to farm out work to other machines" +HOMEPAGE="http://www.gearman.org/" +SRC_URI="http://launchpad.net/gearmand/trunk/${PV}/+download/${P}.tar.gz" + +LICENSE="MIT" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="debug tcmalloc +memcache drizzle sqlite tokyocabinet postgres" + +RDEPEND="dev-libs/libevent + || ( >=sys-apps/util-linux-2.16 <sys-libs/e2fsprogs-libs-1.41.8 ) + tcmalloc? ( dev-util/google-perftools ) + memcache? ( >=dev-libs/libmemcached-0.47 ) + drizzle? ( dev-db/drizzle ) + sqlite? ( dev-db/sqlite:3 ) + tokyocabinet? ( dev-db/tokyocabinet ) + postgres? ( >=dev-db/postgresql-base-9.0 )" +DEPEND="${RDEPEND}" + +pkg_setup() { + enewuser gearmand -1 -1 /dev/null nogroup +} + +src_prepare() { + elibtoolize +} + +src_configure() { + # Don't ever use --enable-assert since configure.ac is broken, and + # only does --disable-assert correctly. + if use debug; then + # Since --with-debug would turn off optimisations as well as + # enabling debug, we just enable debug through the + # preprocessor then. + append-flags -DDEBUG + else + myconf="${myconf} --disable-assert" + fi + + econf \ + --disable-static \ + --disable-dependency-tracking \ + --disable-mtmalloc \ + $(use_enable tcmalloc) \ + $(use_enable memcache libmemcached) \ + $(use_enable drizzle libdrizzle) \ + $(use_enable sqlite libsqlite3) \ + $(use_enable tokyocabinet libtokyocabinet) \ + $(use_enable postgres libpq) +} + +src_test() { + # Since libtool is stupid and doesn't discard /usr/lib64 from the + # load path, we'd end up testing against the installed copy of + # gearmand (bad). + # + # We thus cheat and "fix" the scripts by hand. + sed -i -e '/LD_LIBRARY_PATH=/s|/usr/lib64:||' "${S}"/tests/*_test \ + || die "test fixing failed" + + emake check +} + +src_install() { + emake DESTDIR="${D}" install + + dodoc README AUTHORS ChangeLog + + newinitd "${FILESDIR}"/gearmand.init.d.2 gearmand + newconfd "${FILESDIR}"/gearmand.conf.d gearmand + + find "${D}" -name '*.la' -delete || die +} + +pkg_postinst() { + elog "" + elog "Unless you set the PERSISTENT_TABLE option in" + elog "/etc/conf.d/gearmand, Gearmand will use table 'queue'." + elog "If such table doesn't exist, Gearmand will create it for you" + elog "" +} |