[Lunar-commits] <moonbase> memcached: Adding a patch to fix a make failure on sasl.defs. Adapted from;

Dennis `stumbles` Veatch stumbles at lunar-linux.org
Fri Dec 30 17:56:08 CET 2011


commit 1d0ada7f4ed6d65906761192b7b1f7450356ae79
Author: Dennis `stumbles` Veatch <stumbles at lunar-linux.org>
Date:   Fri Dec 30 11:56:08 2011 -0500

    memcached: Adding a patch to fix a make failure on sasl.defs. Adapted from;
    
    http://groups.google.com/group/memcached/tree/browse_frm/month/2011-10?_done=%2Fgroup%2Fmemcached%2Fbrowse_frm%2Fmonth%2F2011-10%3F&
    
    Also adding systemd abilities and adapted from the above link.
---
 libs/memcached/BUILD                       |   11 +++++++++++
 libs/memcached/DEPENDS                     |    1 +
 libs/memcached/DETAILS                     |    3 +++
 libs/memcached/POST_INSTALL                |   12 ++++++++++++
 libs/memcached/systemd.d/memcached.service |   10 ++++++++++
 5 files changed, 37 insertions(+), 0 deletions(-)

diff --git a/libs/memcached/BUILD b/libs/memcached/BUILD
new file mode 100644
index 0000000..47fd9b1
--- /dev/null
+++ b/libs/memcached/BUILD
@@ -0,0 +1,11 @@
+(
+
+  patch_it $SOURCE2 0 &&
+
+  if [ `arch` == "x86_64" ] ; then
+    OPTS+=" --enable-64bit"
+  fi &&
+
+  default_build
+
+) > $C_FIFO 2>&1
diff --git a/libs/memcached/DEPENDS b/libs/memcached/DEPENDS
index 3ea2133..3e1f972 100644
--- a/libs/memcached/DEPENDS
+++ b/libs/memcached/DEPENDS
@@ -1,3 +1,4 @@
 optional_depends "libevent"   "--with-libevent" "--without-libevent" "for event notification support"
 optional_depends "cyrus-sasl" "--enable-sasl"   "--disable-sasl"     "for Simple Authentication and Security Layer support"
 optional_depends "libxslt"    "--enable-docs"   "--disable-docs"     "for document generation"
+optional_depends "systemd"    ""                ""                   "for systemd style boot"
diff --git a/libs/memcached/DETAILS b/libs/memcached/DETAILS
index 6ad057c..d51db6f 100644
--- a/libs/memcached/DETAILS
+++ b/libs/memcached/DETAILS
@@ -1,9 +1,12 @@
           MODULE=memcached
          VERSION=1.4.10
           SOURCE=$MODULE-$VERSION.tar.gz
+         SOURCE2=memcached-1.4.10-sasl_defs.patch
    SOURCE_URL[0]=http://memcached.googlecode.com/files
    SOURCE_URL[1]=http://www.danga.com/memcached/dist
+     SOURCE2_URL=$PATCH_URL
       SOURCE_VFY=sha1:0ae300f858b767abf812009d53ed58647ceb498a
+     SOURCE2_VFY=sha1:8ca57bd66093646ccd276e543b46b83f761fd7c8
         WEB_SITE=http://memcached.org/
          ENTERED=20060904
          UPDATED=20111116
diff --git a/libs/memcached/POST_INSTALL b/libs/memcached/POST_INSTALL
new file mode 100644
index 0000000..9195d6e
--- /dev/null
+++ b/libs/memcached/POST_INSTALL
@@ -0,0 +1,12 @@
+ if [ ! -f /etc/memcached/memcached ] ; then
+   mkdir -p /etc/memcached
+   cd /etc/memcached 
+   cat > memcached << EOF 
+PORT="11211"
+USER="nobody"
+MAXCONN="1024"
+CACHESIZE="64"
+OPTIONS=""
+EOF
+ fi
+
diff --git a/libs/memcached/systemd.d/memcached.service b/libs/memcached/systemd.d/memcached.service
new file mode 100644
index 0000000..b494260
--- /dev/null
+++ b/libs/memcached/systemd.d/memcached.service
@@ -0,0 +1,10 @@
+[Unit]
+Description=memcached daemon
+After=network.target
+
+[Service]
+EnvironmentFile=/etc/memcached/memcached
+ExecStart=/usr/bin/memcached -p ${PORT} -u ${USER} -m ${CACHESIZE} -c ${MAXCONN} $OPTIONS
+
+[Install]
+WantedBy=multi-user.target


More information about the Lunar-commits mailing list