[arch-commits] Commit in (6 files)

Dan McGee dan at archlinux.org
Wed Dec 10 01:13:44 UTC 2008


    Date: Tuesday, December 9, 2008 @ 20:13:44
  Author: dan
Revision: 21115

add memcached to repos in preparation for putting it in extra

Added:
  memcached/
  memcached/repos/
  memcached/trunk/
  memcached/trunk/PKGBUILD
  memcached/trunk/memcached.conf
  memcached/trunk/memcached.sh

----------------+
 PKGBUILD       |   29 +++++++++++++++++++++++++++++
 memcached.conf |    2 ++
 memcached.sh   |   36 ++++++++++++++++++++++++++++++++++++
 3 files changed, 67 insertions(+)

Added: memcached/trunk/PKGBUILD
===================================================================
--- memcached/trunk/PKGBUILD	                        (rev 0)
+++ memcached/trunk/PKGBUILD	2008-12-10 01:13:44 UTC (rev 21115)
@@ -0,0 +1,29 @@
+# Maintainer: Dan McGee <dan at archlinux.org>
+# Contributor: Michael Irwin <6d6469 at gmail.com>
+
+pkgname=memcached
+pkgver=1.2.6
+pkgrel=2
+pkgdesc="A distributed memory object caching system"
+arch=(i686 x86_64)
+url="http://www.danga.com/memcached/"
+license=('GPL')
+depends=('libevent')
+source=(http://www.danga.com/memcached/dist/$pkgname-$pkgver.tar.gz
+        memcached.conf
+        memcached.sh)
+md5sums=('200d22f7ac2d114f74a6904552e9eb70'
+         '4758f0fd7faa00c90de47f7fbc7537de'
+         '001c5d6dc5d106f5a8aa2fc64525f5ba')
+
+build() {
+  cd $startdir/src/$pkgname-$pkgver
+  # enable threads needs to be explicit
+  ./configure --prefix=/usr --enable-threads
+  make || return 1
+  make DESTDIR=$startdir/pkg install || return 1
+  install -D -m 644 $startdir/src/$pkgname.conf \
+  	$startdir/pkg/etc/conf.d/$pkgname
+  install -D -m 755 $startdir/src/$pkgname.sh \
+  	$startdir/pkg/etc/rc.d/$pkgname
+}

Added: memcached/trunk/memcached.conf
===================================================================
--- memcached/trunk/memcached.conf	                        (rev 0)
+++ memcached/trunk/memcached.conf	2008-12-10 01:13:44 UTC (rev 21115)
@@ -0,0 +1,2 @@
+# see 'memcached -h' for available options
+MEMCACHED_ARGS="-u nobody -l -t 1"

Added: memcached/trunk/memcached.sh
===================================================================
--- memcached/trunk/memcached.sh	                        (rev 0)
+++ memcached/trunk/memcached.sh	2008-12-10 01:13:44 UTC (rev 21115)
@@ -0,0 +1,36 @@
+#!/bin/bash
+
+. /etc/rc.conf
+. /etc/rc.d/functions
+. /etc/conf.d/memcached
+
+PID=`pidof -o %PPID /usr/bin/memcached`
+case "$1" in
+  start)
+    stat_busy "Starting memcached"
+    [ -z "$PID" ] && /usr/bin/memcached -d $MEMCACHED_ARGS
+    if [ ! -z "$PID" -o $? -gt 0 ]; then
+      stat_fail
+    else
+      add_daemon memcached
+      stat_done
+    fi
+    ;;
+  stop)
+    stat_busy "Stopping memcached"
+    [ ! -z "$PID" ] && kill $PID &> /dev/null
+    if [ $? -gt 0 ]; then
+      stat_fail
+    else
+      rm_daemon memcached
+      stat_done
+    fi
+    ;;
+  restart)
+    $0 stop
+    sleep 1
+    $0 start
+    ;;
+  *)
+    echo "usage: $0 {start|stop|restart}"
+esac




More information about the arch-commits mailing list