[packages_10.03.2] memcached: merge r29061, r29269, r29784
authorJo-Philipp Wich <jow@openwrt.org>
Sun, 5 Feb 2012 15:26:34 +0000 (15:26 +0000)
committerJo-Philipp Wich <jow@openwrt.org>
Sun, 5 Feb 2012 15:26:34 +0000 (15:26 +0000)
SVN-Revision: 30219

net/memcached/Makefile
net/memcached/files/memcached.init
net/memcached/patches/100-fix_iov_max.patch

index 617ede5a6d585651271c10fbf863b75928549d4c..93f111d94df65ff505eccf6c081ec777762d4f74 100644 (file)
@@ -1,25 +1,29 @@
 #
-# Copyright (C) 2009-2010 Thomas Heil <heil@terminal-consulting.de>
+# Copyright (C) 2009-2012 OpenWrt.org
+# Copyright (C) 2009-2012 Thomas Heil <heil@terminal-consulting.de>
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
+#
 
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=memcached
-PKG_VERSION:=1.2.6
+PKG_VERSION:=1.4.11
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=http://memcached.googlecode.com/files
-PKG_MD5SUM:=200d22f7ac2d114f74a6904552e9eb70
+PKG_MD5SUM:=50ee313639531d4d2f8eb9c688f58948
+
+PKG_INSTALL:=1
 
 include $(INCLUDE_DIR)/package.mk
 
 define Package/memcached
   SECTION:=net
   CATEGORY:=Network
-  DEPENDS:=+libevent
+  DEPENDS:=+libevent +libpthread
   TITLE:=The high-performance, distributed memory object caching system
   MAINTAINER:=Thomas Heil <heil@terminal-consulting.de>
   URL:=http://memcached.org/
@@ -42,11 +46,15 @@ endif
 CONFIGURE_ARGS += \
        --disable-docs \
        --disable-dtrace \
+       --disable-coverage \
        --disable-sasl
 
+TARGET_CFLAGS += \
+       -std=gnu99
+
 define Package/memcached/install
        $(INSTALL_DIR) $(1)/usr/bin
-       $(INSTALL_BIN) $(PKG_BUILD_DIR)/memcached $(1)/usr/bin/
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/memcached $(1)/usr/bin/
        $(INSTALL_DIR) $(1)/etc/config
        $(INSTALL_CONF) ./files/memcached.config $(1)/etc/config/memcached
        $(INSTALL_DIR) $(1)/etc/init.d
index 1ba27d60d54e42cd2fc4313c09d6f6d850ea6356..063bf64725ac9dad91f1cf250e76e82a1072fb13 100644 (file)
@@ -1,24 +1,27 @@
 #!/bin/sh /etc/rc.common
-# Copyright (C) 2010 OpenWrt.org
+# Copyright (C) 2010-2011 OpenWrt.org
+
 START=80
 
-start_service () {
-    local section="$1"
-        config_get user "$section" user
-        config_get maxconn "$section" maxconn
-        config_get listen "$section" listen
-        config_get port "$section" port
-        config_get memory "$section" memory
+start_instance () {
+       local section="$1"
+
+       config_get user "$section" user
+       config_get maxconn "$section" maxconn
+       config_get listen "$section" listen
+       config_get port "$section" port
+       config_get memory "$section" memory
 
-        memcached_args="-d -u ${user:-nobody} -c ${maxconn:-1024} -l ${listen:-0.0.0.0} -p ${port:-11211} -U ${port:-11211} -m ${memory:-64}"
-        memcached $memcached_args >/dev/null 2>&1
+       service_start /usr/bin/memcached -d -u ${user:-nobody} \
+               -c ${maxconn:-1024} -l ${listen:-0.0.0.0} \
+               -p ${port:-11211} -U ${port:-11211} -m ${memory:-64}
 }
 
 start() {
-    config_load "memcached"
-        config_foreach start_service memcached
+       config_load 'memcached'
+       config_foreach start_instance 'memcached'
 }
 
 stop() {
-    killall memcached
+       service_stop /usr/bin/memcached
 }
index 086096e2c86f4f28a7d21602927e0953f67080db..1a5da94b05086d29edd4c1c892c33d85b07d9d99 100644 (file)
@@ -1,8 +1,8 @@
 --- a/memcached.c
 +++ b/memcached.c
-@@ -15,6 +15,10 @@
- std *
-  *  $Id$
+@@ -13,6 +13,10 @@
+  *      Anatoly Vorobey <mellon@pobox.com>
+  *      Brad Fitzpatrick <brad@danga.com>
   */
 +#ifndef __need_IOV_MAX
 +#define __need_IOV_MAX