Backport RPM boilerplate logic required by legacy OpenPKG scripts,

Wed, 21 Sep 2011 14:13:05 +0200

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 21 Sep 2011 14:13:05 +0200
changeset 379
5974eb964eec
parent 378
16cc9d2eceb2
child 380
4f3b1ee715dd

Backport RPM boilerplate logic required by legacy OpenPKG scripts,
and port build configuration to build correctly on SVR5.

memcached/memcached.patch file | annotate | diff | comparison | revisions
memcached/memcached.spec file | annotate | diff | comparison | revisions
     1.1 --- a/memcached/memcached.patch	Wed Sep 21 14:10:37 2011 +0200
     1.2 +++ b/memcached/memcached.patch	Wed Sep 21 14:13:05 2011 +0200
     1.3 @@ -75,3 +75,14 @@
     1.4   
     1.5       dispatcher_thread.base = main_base;
     1.6       dispatcher_thread.thread_id = pthread_self();
     1.7 +Index: libmemcache-1.4.0.rc2/src/buffer.c
     1.8 +--- libmemcache-1.4.0.rc2/src/buffer.c.orig	2009-11-25 18:36:18.468286813 +0100
     1.9 ++++ libmemcache-1.4.0.rc2/src/buffer.c	2009-11-25 18:36:20.700402681 +0100
    1.10 +@@ -36,6 +36,7 @@
    1.11 + #include <sys/uio.h>
    1.12 + #include <unistd.h>
    1.13 + #include <sys/errno.h>
    1.14 ++#include <errno.h>
    1.15 + 
    1.16 + #include "memcache/buffer.h"
    1.17 + 
     2.1 --- a/memcached/memcached.spec	Wed Sep 21 14:10:37 2011 +0200
     2.2 +++ b/memcached/memcached.spec	Wed Sep 21 14:13:05 2011 +0200
     2.3 @@ -37,7 +37,7 @@
     2.4  Group:        System
     2.5  License:      GPL
     2.6  Version:      %{V_memcached}
     2.7 -Release:      20110716
     2.8 +Release:      20110914
     2.9  
    2.10  #   list of sources
    2.11  Source0:      http://memcached.googlecode.com/files/memcached-%{V_memcached}.tar.gz
    2.12 @@ -47,10 +47,14 @@
    2.13  Patch0:       memcached.patch
    2.14  
    2.15  #   build information
    2.16 -BuildPreReq:  OpenPKG, openpkg >= 20100101, gcc, make, perl, perl-openpkg
    2.17 -PreReq:       OpenPKG, openpkg >= 20100101
    2.18 +Prefix:       %{l_prefix}
    2.19 +BuildRoot:    %{l_buildroot}
    2.20 +BuildPreReq:  OpenPKG, openpkg >= 20060823, gcc, make, perl, perl-openpkg
    2.21 +PreReq:       OpenPKG, openpkg >= 20060823
    2.22  BuildPreReq:  libevent, sasl
    2.23  PreReq:       libevent, sasl
    2.24 +AutoReq:      no
    2.25 +AutoReqProv:  no
    2.26  
    2.27  %description
    2.28      Memcached is a high-performance, distributed memory object caching
    2.29 @@ -80,6 +84,12 @@
    2.30      %setup -q -T -D -a 1
    2.31      %setup -q -T -D -a 2
    2.32      %patch -p0
    2.33 +    %{l_shtool} subst \
    2.34 +        -e 's; *-Werror;;g' \
    2.35 +        memcached-%{V_memcached}/configure
    2.36 +    %{l_shtool} subst \
    2.37 +        -e 's;\(libdir="\${libdir}\)/\${isainfo_k};\1;g' \
    2.38 +        libmemcached-%{V_libmemcached}/configure
    2.39  
    2.40  %build
    2.41      #   build daemon
    2.42 @@ -87,6 +97,7 @@
    2.43        libs=""
    2.44        case "%{l_platform -t}" in
    2.45            *-linux* ) libs="$libs -lrt" ;;
    2.46 +          *-sunos* ) libs="$libs -lsocket -lnsl" ;;
    2.47        esac
    2.48        CC="%{l_cc}" \
    2.49        CFLAGS="%{l_cflags -O}" \
    2.50 @@ -125,6 +136,8 @@
    2.51      %{l_prefix}/bin/perl-openpkg -d Cache-Memcached-%{V_cache_memcached} configure build
    2.52  
    2.53  %install
    2.54 +    #   remove build cruft
    2.55 +    rm -rf $RPM_BUILD_ROOT
    2.56  
    2.57      #   install daemon
    2.58      ( cd memcached-%{V_memcached}
    2.59 @@ -164,6 +177,7 @@
    2.60  %files -f files
    2.61  
    2.62  %clean
    2.63 +    rm -rf $RPM_BUILD_ROOT
    2.64  
    2.65  %post
    2.66      #   after upgrade, restart service

mercurial