diff options
author | Jesus Rivero <neurogeek@gentoo.org> | 2013-10-31 20:04:54 +0000 |
---|---|---|
committer | Jesus Rivero <neurogeek@gentoo.org> | 2013-10-31 20:04:54 +0000 |
commit | bad7ffb839eb4e038db395b20cc7533ffae320d6 (patch) | |
tree | f70360320c1a66c6d3fc65a564211669d0cf879d /net-proxy | |
parent | Revbump to fix helpers and drivers installation. Fix PATH in init scripts and... (diff) | |
download | gentoo-2-bad7ffb839eb4e038db395b20cc7533ffae320d6.tar.gz gentoo-2-bad7ffb839eb4e038db395b20cc7533ffae320d6.tar.bz2 gentoo-2-bad7ffb839eb4e038db395b20cc7533ffae320d6.zip |
Initial commit
(Portage version: 2.2.7/cvs/Linux x86_64, unsigned Manifest commit)
Diffstat (limited to 'net-proxy')
-rw-r--r-- | net-proxy/nutcracker/ChangeLog | 11 | ||||
-rw-r--r-- | net-proxy/nutcracker/files/nutcracker-0.2.4-use-system-libyaml.patch | 64 | ||||
-rw-r--r-- | net-proxy/nutcracker/files/nutcracker.confd | 10 | ||||
-rw-r--r-- | net-proxy/nutcracker/files/nutcracker.initd | 40 | ||||
-rw-r--r-- | net-proxy/nutcracker/metadata.xml | 9 | ||||
-rw-r--r-- | net-proxy/nutcracker/nutcracker-0.2.4.ebuild | 44 |
6 files changed, 178 insertions, 0 deletions
diff --git a/net-proxy/nutcracker/ChangeLog b/net-proxy/nutcracker/ChangeLog new file mode 100644 index 000000000000..d7c3e9e9f596 --- /dev/null +++ b/net-proxy/nutcracker/ChangeLog @@ -0,0 +1,11 @@ +# ChangeLog for net-proxy/nutcracker +# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/net-proxy/nutcracker/ChangeLog,v 1.1 2013/10/31 20:04:54 neurogeek Exp $ + +*nutcracker-0.2.4 (31 Oct 2013) + + 31 Oct 2013; Jesus Rivero <neurogeek@gentoo.org> +nutcracker-0.2.4.ebuild, + +files/nutcracker-0.2.4-use-system-libyaml.patch, +files/nutcracker.confd, + +files/nutcracker.initd: + Initial commit + diff --git a/net-proxy/nutcracker/files/nutcracker-0.2.4-use-system-libyaml.patch b/net-proxy/nutcracker/files/nutcracker-0.2.4-use-system-libyaml.patch new file mode 100644 index 000000000000..5cf7b3660bdf --- /dev/null +++ b/net-proxy/nutcracker/files/nutcracker-0.2.4-use-system-libyaml.patch @@ -0,0 +1,64 @@ +diff -uNr nutcracker-0.2.4.orig/Makefile.am nutcracker-0.2.4/Makefile.am +--- nutcracker-0.2.4.orig/Makefile.am 2013-09-11 10:11:19.869975912 -0400 ++++ nutcracker-0.2.4/Makefile.am 2013-09-11 10:11:36.709975757 -0400 +@@ -2,6 +2,6 @@ + + ACLOCAL_AMFLAGS = -I m4 + +-SUBDIRS = contrib src ++SUBDIRS = src + + EXTRA_DIST = README.md NOTICE LICENSE ChangeLog conf scripts notes +diff -uNr nutcracker-0.2.4.orig/src/Makefile.am nutcracker-0.2.4/src/Makefile.am +--- nutcracker-0.2.4.orig/src/Makefile.am 2013-09-11 10:16:16.449973187 -0400 ++++ nutcracker-0.2.4/src/Makefile.am 2013-09-11 10:16:44.019972934 -0400 +@@ -3,7 +3,6 @@ + AM_CPPFLAGS = -D_GNU_SOURCE -D_XOPEN_SOURCE + AM_CPPFLAGS += -I $(top_srcdir)/src/hashkit + AM_CPPFLAGS += -I $(top_srcdir)/src/proto +-AM_CPPFLAGS += -I $(top_srcdir)/contrib/yaml-0.1.4/include + + AM_CFLAGS = -Wall -Wshadow + AM_CFLAGS += -Wpointer-arith +@@ -43,4 +42,3 @@ + + nutcracker_LDADD = $(top_builddir)/src/hashkit/libhashkit.a + nutcracker_LDADD += $(top_builddir)/src/proto/libproto.a +-nutcracker_LDADD += $(top_builddir)/contrib/yaml-0.1.4/src/.libs/libyaml.a +diff -uNr nutcracker-0.2.4.orig/configure.ac nutcracker-0.2.4/configure.ac +--- nutcracker-0.2.4.orig/configure.ac 2013-09-11 10:23:27.879969223 -0400 ++++ nutcracker-0.2.4/configure.ac 2013-09-11 10:24:28.729968664 -0400 +@@ -138,11 +138,7 @@ + [AC_DEFINE([HAVE_STATS], [1], [Define to 1 if stats is not disabled])]) + AC_MSG_RESULT($disable_stats) + +-# Untar the yaml-0.1.4 in contrib/ before config.status is rerun +-AC_CONFIG_COMMANDS_PRE([tar xvfz contrib/yaml-0.1.4.tar.gz -C contrib]) +- +-# Call yaml-0.1.4 ./configure recursively +-AC_CONFIG_SUBDIRS([contrib/yaml-0.1.4]) ++PKG_CHECK_MODULES([YAML], [yaml-0.1 >= 0.1]) + + # Define Makefiles + AC_CONFIG_FILES([Makefile +diff -uNr nutcracker-0.2.4.orig/src/Makefile.am nutcracker-0.2.4/src/Makefile.am +--- nutcracker-0.2.4.orig/src/Makefile.am 2013-09-11 10:23:27.879969223 -0400 ++++ nutcracker-0.2.4/src/Makefile.am 2013-09-11 10:26:16.549967674 -0400 +@@ -11,8 +11,9 @@ + AM_CFLAGS += -Wno-unused-parameter -Wno-unused-value + AM_CFLAGS += -Wconversion -Wsign-compare + AM_CFLAGS += -Wstrict-prototypes -Wmissing-prototypes -Wredundant-decls -Wmissing-declarations ++AM_CFLAGS += $(YAML_CFLAGS) + +-AM_LDFLAGS = -lm -lpthread -rdynamic ++AM_LDFLAGS = -lm -lpthread -rdynamic $(YAML_LIBS) + + SUBDIRS = hashkit proto + +@@ -40,5 +41,5 @@ + nc_queue.h \ + nc.c + +-nutcracker_LDADD = $(top_builddir)/src/hashkit/libhashkit.a ++nutcracker_LDADD = $(top_builddir)/src/hashkit/libhashkit.a + nutcracker_LDADD += $(top_builddir)/src/proto/libproto.a diff --git a/net-proxy/nutcracker/files/nutcracker.confd b/net-proxy/nutcracker/files/nutcracker.confd new file mode 100644 index 000000000000..8ba50a762753 --- /dev/null +++ b/net-proxy/nutcracker/files/nutcracker.confd @@ -0,0 +1,10 @@ +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-proxy/nutcracker/files/nutcracker.confd,v 1.1 2013/10/31 20:04:54 neurogeek Exp $ + +#USER="nobody" +#PIDFILE="/var/run/nutcracker.pid" +#CONF_FILE="/etc/nutcracker/nutcracker.yaml" + +NUTCRACKER_BIN="/usr/bin/nutcracker" +NUTCRACKER_OPTS="--daemonize" diff --git a/net-proxy/nutcracker/files/nutcracker.initd b/net-proxy/nutcracker/files/nutcracker.initd new file mode 100644 index 000000000000..7748a3698459 --- /dev/null +++ b/net-proxy/nutcracker/files/nutcracker.initd @@ -0,0 +1,40 @@ +#!/sbin/runscript +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-proxy/nutcracker/files/nutcracker.initd,v 1.1 2013/10/31 20:04:54 neurogeek Exp $ + +USER="${USER:-nobody}" +PIDFILE="${PIDFILE:-/var/run/nutcracker.pid}" +NUTCRACKER_BIN="${NUTCRACKER_BIN:-/usr/bin/nutcracker}" +CONF_FILE="${CONF_FILE:-/etc/nutcracker/nutcracker.yml}" + +depend() { + need net +} + +checkconf() { + ebegin "Testing configuration" + ${NUTCRACKER_BIN} --test-conf \ + --conf-file=${CONF_FILE} \ + >/dev/null 2>&1 + eend $? +} + +start() { + checkconf || exit 1 + ebegin "Starting Nutcracker" + start-stop-daemon --start -u ${USER} \ + --name ${SVCNAME} \ + --exec ${NUTCRACKER_BIN} -- \ + --conf-file="${CONF_FILE}" \ + --pid-file=${PIDFILE} \ + ${NUTCRACKER_OPTS} + eend $? +} + +stop() { + ebegin "Stopping Nutcracker" + start-stop-daemon --stop --pidfile "${PIDFILE}" + eend $? +} + diff --git a/net-proxy/nutcracker/metadata.xml b/net-proxy/nutcracker/metadata.xml new file mode 100644 index 000000000000..bb1c23652b9f --- /dev/null +++ b/net-proxy/nutcracker/metadata.xml @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<maintainer> + <email>neurogeek@gentoo.org</email> + <name>Jesus Rivero</name> + <description>Primary maintainer</description> +</maintainer> +</pkgmetadata> diff --git a/net-proxy/nutcracker/nutcracker-0.2.4.ebuild b/net-proxy/nutcracker/nutcracker-0.2.4.ebuild new file mode 100644 index 000000000000..80138b99e8a1 --- /dev/null +++ b/net-proxy/nutcracker/nutcracker-0.2.4.ebuild @@ -0,0 +1,44 @@ +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-proxy/nutcracker/nutcracker-0.2.4.ebuild,v 1.1 2013/10/31 20:04:54 neurogeek Exp $ + +EAPI=5 + +inherit autotools eutils + +DESCRIPTION="A fast, light-weight proxy for Memcached and Redis. +(Twitter's Twemproxy)" +HOMEPAGE="https://github.com/twitter/twemproxy" +SRC_URI="http://twemproxy.googlecode.com/files/${P}.tar.gz" + +LICENSE="Apache-2.0" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="debug doc" + +DEPEND=">=dev-libs/libyaml-0.1.4" +RDEPEND="${DEPEND}" + +src_prepare() { + # Lets use system libyaml + epatch "${FILESDIR}/${P}-use-system-libyaml.patch" + eautoreconf +} + +src_configure() { + econf $(use debug) || die "Econf failed" +} + +src_install() { + default_src_install + + insinto /etc/nutcracker + newins conf/nutcracker.yml nutcracker.yml.example + + newconfd "${FILESDIR}/nutcracker.confd" nutcracker + newinitd "${FILESDIR}/nutcracker.initd" nutcracker + + if use doc; then + dodoc -r notes + fi +} |