# HG changeset patch # User Michael Schloh von Bennewitz # Date 1316607185 -7200 # Node ID 5974eb964eec3e91cd171fd10331f224601bbf84 # Parent 16cc9d2eceb2a22b75072f9a7dea2c81f167c334 Backport RPM boilerplate logic required by legacy OpenPKG scripts, and port build configuration to build correctly on SVR5. diff -r 16cc9d2eceb2 -r 5974eb964eec memcached/memcached.patch --- a/memcached/memcached.patch Wed Sep 21 14:10:37 2011 +0200 +++ b/memcached/memcached.patch Wed Sep 21 14:13:05 2011 +0200 @@ -75,3 +75,14 @@ dispatcher_thread.base = main_base; dispatcher_thread.thread_id = pthread_self(); +Index: libmemcache-1.4.0.rc2/src/buffer.c +--- libmemcache-1.4.0.rc2/src/buffer.c.orig 2009-11-25 18:36:18.468286813 +0100 ++++ libmemcache-1.4.0.rc2/src/buffer.c 2009-11-25 18:36:20.700402681 +0100 +@@ -36,6 +36,7 @@ + #include + #include + #include ++#include + + #include "memcache/buffer.h" + diff -r 16cc9d2eceb2 -r 5974eb964eec memcached/memcached.spec --- a/memcached/memcached.spec Wed Sep 21 14:10:37 2011 +0200 +++ b/memcached/memcached.spec Wed Sep 21 14:13:05 2011 +0200 @@ -37,7 +37,7 @@ Group: System License: GPL Version: %{V_memcached} -Release: 20110716 +Release: 20110914 # list of sources Source0: http://memcached.googlecode.com/files/memcached-%{V_memcached}.tar.gz @@ -47,10 +47,14 @@ Patch0: memcached.patch # build information -BuildPreReq: OpenPKG, openpkg >= 20100101, gcc, make, perl, perl-openpkg -PreReq: OpenPKG, openpkg >= 20100101 +Prefix: %{l_prefix} +BuildRoot: %{l_buildroot} +BuildPreReq: OpenPKG, openpkg >= 20060823, gcc, make, perl, perl-openpkg +PreReq: OpenPKG, openpkg >= 20060823 BuildPreReq: libevent, sasl PreReq: libevent, sasl +AutoReq: no +AutoReqProv: no %description Memcached is a high-performance, distributed memory object caching @@ -80,6 +84,12 @@ %setup -q -T -D -a 1 %setup -q -T -D -a 2 %patch -p0 + %{l_shtool} subst \ + -e 's; *-Werror;;g' \ + memcached-%{V_memcached}/configure + %{l_shtool} subst \ + -e 's;\(libdir="\${libdir}\)/\${isainfo_k};\1;g' \ + libmemcached-%{V_libmemcached}/configure %build # build daemon @@ -87,6 +97,7 @@ libs="" case "%{l_platform -t}" in *-linux* ) libs="$libs -lrt" ;; + *-sunos* ) libs="$libs -lsocket -lnsl" ;; esac CC="%{l_cc}" \ CFLAGS="%{l_cflags -O}" \ @@ -125,6 +136,8 @@ %{l_prefix}/bin/perl-openpkg -d Cache-Memcached-%{V_cache_memcached} configure build %install + # remove build cruft + rm -rf $RPM_BUILD_ROOT # install daemon ( cd memcached-%{V_memcached} @@ -164,6 +177,7 @@ %files -f files %clean + rm -rf $RPM_BUILD_ROOT %post # after upgrade, restart service