summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2007-11-27 01:22:16 +0000
committerRobin H. Johnson <robbat2@gentoo.org>2007-11-27 01:22:16 +0000
commit5eaf4f57b4dfc6349673b8a736ec5d37223653b4 (patch)
treed5da8f5db779b7fe137c4d686cbf9c6cb2b1aef3 /net-misc/memcached
parentVersion bump (diff)
downloadgentoo-2-5eaf4f57b4dfc6349673b8a736ec5d37223653b4.tar.gz
gentoo-2-5eaf4f57b4dfc6349673b8a736ec5d37223653b4.tar.bz2
gentoo-2-5eaf4f57b4dfc6349673b8a736ec5d37223653b4.zip
Version bump to upstream release candidate. Also include the updated scripts with multiconf support per bug #194868. Multiconf was possible before, but the PIDFILE was not always handled correctly.
(Portage version: 2.1.3.19)
Diffstat (limited to 'net-misc/memcached')
-rw-r--r--net-misc/memcached/ChangeLog10
-rw-r--r--net-misc/memcached/files/1.2.4/conf32
-rw-r--r--net-misc/memcached/files/1.2.4/init77
-rw-r--r--net-misc/memcached/files/digest-memcached-1.2.4_rc13
-rw-r--r--net-misc/memcached/memcached-1.2.4_rc1.ebuild61
5 files changed, 182 insertions, 1 deletions
diff --git a/net-misc/memcached/ChangeLog b/net-misc/memcached/ChangeLog
index 9fee5ef9d774..dbb9a74cde3a 100644
--- a/net-misc/memcached/ChangeLog
+++ b/net-misc/memcached/ChangeLog
@@ -1,6 +1,14 @@
# ChangeLog for net-misc/memcached
# Copyright 2002-2007 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-misc/memcached/ChangeLog,v 1.53 2007/11/26 23:49:05 robbat2 Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-misc/memcached/ChangeLog,v 1.54 2007/11/27 01:22:15 robbat2 Exp $
+
+*memcached-1.2.4_rc1 (27 Nov 2007)
+
+ 27 Nov 2007; Robin H. Johnson <robbat2@gentoo.org> +files/1.2.4/conf,
+ +files/1.2.4/init, +memcached-1.2.4_rc1.ebuild:
+ Version bump to upstream release candidate. Also include the updated scripts
+ with multiconf support per bug #194868. Multiconf was possible before, but
+ the PIDFILE was not always handled correctly.
26 Nov 2007; Robin H. Johnson <robbat2@gentoo.org> metadata.xml:
Update metadata to reflect new ownership, as lisa is retiring.
diff --git a/net-misc/memcached/files/1.2.4/conf b/net-misc/memcached/files/1.2.4/conf
new file mode 100644
index 000000000000..a517497a50d5
--- /dev/null
+++ b/net-misc/memcached/files/1.2.4/conf
@@ -0,0 +1,32 @@
+# Copyright 2003 Gentoo Technologies, Inc
+# $Header: /var/cvsroot/gentoo-x86/net-misc/memcached/files/1.2.4/conf,v 1.1 2007/11/27 01:22:16 robbat2 Exp $
+# memcached config file
+
+MEMCACHED_BINARY="/usr/bin/memcached"
+
+#Specify memory usage in megabytes (do not use letters)
+#64MB is default
+MEMUSAGE="64"
+
+#User to run as
+MEMCACHED_RUNAS="memcached"
+
+#Specify maximum number of concurrent connections
+#1024 is default
+MAXCONN="1024"
+
+#Listen for connections on what address?
+# If this is empty, memcached will listen on 0.0.0.0
+# be sure you have a firewall in place!
+LISTENON=""
+
+#Listen for connections on what port?
+PORT="11211"
+
+#PID file location
+# '-${PORT}.${CONF}.pid' will be appended to this!
+# You do not normally need to change this.
+PIDBASE="/var/run/memcached/memcached"
+
+#Other Options
+MISC_OPTS=""
diff --git a/net-misc/memcached/files/1.2.4/init b/net-misc/memcached/files/1.2.4/init
new file mode 100644
index 000000000000..f5e3f1231679
--- /dev/null
+++ b/net-misc/memcached/files/1.2.4/init
@@ -0,0 +1,77 @@
+#!/sbin/runscript
+# $Header: /var/cvsroot/gentoo-x86/net-misc/memcached/files/1.2.4/init,v 1.1 2007/11/27 01:22:16 robbat2 Exp $
+
+CONF="${SVCNAME#*.}"
+CONFBASE="/etc/conf.d/memcached"
+
+[ -z "${PIDBASE}" ] && PIDBASE="/var/run/memcached/memcached"
+[ "${CONF}" == "memcached" ] && CONF=''
+
+if [ -n "${CONF}" ]; then
+ PIDFILE="${PIDBASE}-${PORT}.${CONF}.pid"
+ CONFSRC="${CONFBASE}.${CONF}"
+ if [ -f "${CONFSRC}" ]; then
+ source "${CONFSRC}"
+ else
+ eerror "The configuration file $CONFSRC was not found!"
+ fi
+else
+ PIDFILE="${PIDBASE}-${PORT}.pid"
+ CONFSRC="${CONFBASE}"
+fi
+
+depend() {
+ need net
+}
+
+checkconfig() {
+ if [ -z "${LISTENON}" ]; then
+ ewarn "You should edit $CONFSRC and specify an address to listen on."
+ ewarn "Listening on any address (check your firewall!)"
+ fi
+
+}
+
+start() {
+ if [ -n "${CONF}" ]; then
+ ebegin "Starting memcached (${CONF})"
+ else
+ ebegin "Starting memcached"
+ fi
+ checkconfig
+ local dir="$(dirname ${PIDFILE})"
+ if [ ! -d "${dir}" ]; then
+ einfo " Creating ${dir}"
+ mkdir -p "${dir}"
+ fi
+ chown ${MEMCACHED_RUNAS} "${dir}"
+ if [ -f "${PIDFILE}" ]; then
+ einfo " Removing stale pidfile ${PIDFILE}"
+ rm -f "${PIDFILE}" 1>/dev/null
+ fi
+
+ if [ -z "${LISTENON}" ]; then
+ c_LISTENON=""
+ else
+ c_LISTENON="-l ${LISTENON}"
+ fi
+
+ /sbin/start-stop-daemon --start --pidfile "${PIDFILE}" \
+ --exec "${MEMCACHED_BINARY}" \
+ --startas "${MEMCACHED_BINARY}" -- \
+ -d -p ${PORT} ${c_LISTENON} -m ${MEMUSAGE} \
+ -c ${MAXCONN} -u ${MEMCACHED_RUNAS} -P "${PIDFILE}" \
+ ${MISC_OPTS}
+ eend $?
+}
+
+stop() {
+ if [ -n "${CONF}" ]; then
+ ebegin "Stopping memcached (${CONF})"
+ else
+ ebegin "Stopping memcached"
+ fi
+ start-stop-daemon --stop --quiet --pidfile "${PIDFILE}"
+ rm -f "${PIDFILE}"
+ eend $?
+}
diff --git a/net-misc/memcached/files/digest-memcached-1.2.4_rc1 b/net-misc/memcached/files/digest-memcached-1.2.4_rc1
new file mode 100644
index 000000000000..3a33aaf6c3bf
--- /dev/null
+++ b/net-misc/memcached/files/digest-memcached-1.2.4_rc1
@@ -0,0 +1,3 @@
+MD5 0b2874087ffac3eb3dec6ea834fe16fc memcached-1.2.4-rc1.tar.gz 362644
+RMD160 f4c78bea6aa4112575eab466c4255651f9af33de memcached-1.2.4-rc1.tar.gz 362644
+SHA256 ecef3d5c912864a4c9ef209665cbb2546fca54e9cc79d833afba909f0c6cc988 memcached-1.2.4-rc1.tar.gz 362644
diff --git a/net-misc/memcached/memcached-1.2.4_rc1.ebuild b/net-misc/memcached/memcached-1.2.4_rc1.ebuild
new file mode 100644
index 000000000000..621e03b1e9d0
--- /dev/null
+++ b/net-misc/memcached/memcached-1.2.4_rc1.ebuild
@@ -0,0 +1,61 @@
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-misc/memcached/memcached-1.2.4_rc1.ebuild,v 1.1 2007/11/27 01:22:15 robbat2 Exp $
+
+inherit eutils
+
+MY_PV="${PV/_rc/-rc}"
+MY_P="${PN}-${MY_PV}"
+
+DESCRIPTION="High-performance, distributed memory object caching system"
+HOMEPAGE="http://www.danga.com/memcached/"
+SRC_URI="http://www.danga.com/memcached/dist/${MY_P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sh ~sparc ~sparc-fbsd ~x86 ~x86-fbsd"
+IUSE="nptl test"
+
+RDEPEND=">=dev-libs/libevent-0.6
+ >=dev-perl/Cache-Memcached-1.24"
+DEPEND="${RDEPEND}
+ test? ( perl-core/Test-Harness )"
+
+S="${WORKDIR}/${MY_P}"
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+
+ epatch "${FILESDIR}/${PN}-1.2.2-fbsd.patch"
+ # Merged in upstream r604
+ #epatch "${FILESDIR}/${PN}-1.2.2-p-threads.patch"
+}
+
+src_compile() {
+ econf $(use_enable nptl threads)
+ emake || die "emake failed."
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die "emake install failed."
+ dobin scripts/memcached-tool
+
+ dodoc AUTHORS ChangeLog NEWS README TODO doc/{CONTRIBUTORS,*.txt}
+
+ newconfd "${FILESDIR}"/1.2.4/conf memcached
+ newinitd "${FILESDIR}"/1.2.4/init memcached
+}
+
+pkg_postinst() {
+ enewuser memcached -1 -1 /dev/null daemon
+
+ elog "With this version of Memcached Gentoo now supports multiple instances."
+ elog "To enable this you must create a symlink in /etc/init.d/ for each instance"
+ elog "to /etc/init.d/memcached and create the matching conf files in /etc/conf.d/"
+ elog "Please see Gentoo bug #122246 for more info"
+}
+
+src_test() {
+ emake -j1 test || die "Failed testing"
+}