memcached/memcached.spec

changeset 379
5974eb964eec
parent 378
16cc9d2eceb2
child 576
b3a1e74cc78b
equal deleted inserted replaced
0:333b26683870 1:1482adcd0c65
35 Distribution: OpenPKG Community 35 Distribution: OpenPKG Community
36 Class: EVAL 36 Class: EVAL
37 Group: System 37 Group: System
38 License: GPL 38 License: GPL
39 Version: %{V_memcached} 39 Version: %{V_memcached}
40 Release: 20110716 40 Release: 20110914
41 41
42 # list of sources 42 # list of sources
43 Source0: http://memcached.googlecode.com/files/memcached-%{V_memcached}.tar.gz 43 Source0: http://memcached.googlecode.com/files/memcached-%{V_memcached}.tar.gz
44 Source1: http://download.tangent.org/libmemcached-%{V_libmemcached}.tar.gz 44 Source1: http://download.tangent.org/libmemcached-%{V_libmemcached}.tar.gz
45 Source2: http://www.cpan.org/authors/id/B/BR/BRADFITZ/Cache-Memcached-%{V_cache_memcached}.tar.gz 45 Source2: http://www.cpan.org/authors/id/B/BR/BRADFITZ/Cache-Memcached-%{V_cache_memcached}.tar.gz
46 Source3: rc.memcached 46 Source3: rc.memcached
47 Patch0: memcached.patch 47 Patch0: memcached.patch
48 48
49 # build information 49 # build information
50 BuildPreReq: OpenPKG, openpkg >= 20100101, gcc, make, perl, perl-openpkg 50 Prefix: %{l_prefix}
51 PreReq: OpenPKG, openpkg >= 20100101 51 BuildRoot: %{l_buildroot}
52 BuildPreReq: OpenPKG, openpkg >= 20060823, gcc, make, perl, perl-openpkg
53 PreReq: OpenPKG, openpkg >= 20060823
52 BuildPreReq: libevent, sasl 54 BuildPreReq: libevent, sasl
53 PreReq: libevent, sasl 55 PreReq: libevent, sasl
56 AutoReq: no
57 AutoReqProv: no
54 58
55 %description 59 %description
56 Memcached is a high-performance, distributed memory object caching 60 Memcached is a high-performance, distributed memory object caching
57 system, generic in nature, but intended for use in speeding up 61 system, generic in nature, but intended for use in speeding up
58 dynamic web applications by alleviating database load. Additionally, 62 dynamic web applications by alleviating database load. Additionally,
78 %prep 82 %prep
79 %setup -q -c 83 %setup -q -c
80 %setup -q -T -D -a 1 84 %setup -q -T -D -a 1
81 %setup -q -T -D -a 2 85 %setup -q -T -D -a 2
82 %patch -p0 86 %patch -p0
87 %{l_shtool} subst \
88 -e 's; *-Werror;;g' \
89 memcached-%{V_memcached}/configure
90 %{l_shtool} subst \
91 -e 's;\(libdir="\${libdir}\)/\${isainfo_k};\1;g' \
92 libmemcached-%{V_libmemcached}/configure
83 93
84 %build 94 %build
85 # build daemon 95 # build daemon
86 ( cd memcached-%{V_memcached} 96 ( cd memcached-%{V_memcached}
87 libs="" 97 libs=""
88 case "%{l_platform -t}" in 98 case "%{l_platform -t}" in
89 *-linux* ) libs="$libs -lrt" ;; 99 *-linux* ) libs="$libs -lrt" ;;
100 *-sunos* ) libs="$libs -lsocket -lnsl" ;;
90 esac 101 esac
91 CC="%{l_cc}" \ 102 CC="%{l_cc}" \
92 CFLAGS="%{l_cflags -O}" \ 103 CFLAGS="%{l_cflags -O}" \
93 CPPFLAGS="%{l_cppflags}" \ 104 CPPFLAGS="%{l_cppflags}" \
94 LDFLAGS="%{l_ldflags}" \ 105 LDFLAGS="%{l_ldflags}" \
123 # build Perl client API 134 # build Perl client API
124 %{l_prefix}/bin/perl-openpkg prepare 135 %{l_prefix}/bin/perl-openpkg prepare
125 %{l_prefix}/bin/perl-openpkg -d Cache-Memcached-%{V_cache_memcached} configure build 136 %{l_prefix}/bin/perl-openpkg -d Cache-Memcached-%{V_cache_memcached} configure build
126 137
127 %install 138 %install
139 # remove build cruft
140 rm -rf $RPM_BUILD_ROOT
128 141
129 # install daemon 142 # install daemon
130 ( cd memcached-%{V_memcached} 143 ( cd memcached-%{V_memcached}
131 %{l_shtool} mkdir -f -p -m 775 \ 144 %{l_shtool} mkdir -f -p -m 775 \
132 $RPM_BUILD_ROOT%{l_prefix}/bin \ 145 $RPM_BUILD_ROOT%{l_prefix}/bin \
162 '%attr(-,%{l_nusr},%{l_ngrp}) %{l_prefix}/var/memcached' 175 '%attr(-,%{l_nusr},%{l_ngrp}) %{l_prefix}/var/memcached'
163 176
164 %files -f files 177 %files -f files
165 178
166 %clean 179 %clean
180 rm -rf $RPM_BUILD_ROOT
167 181
168 %post 182 %post
169 # after upgrade, restart service 183 # after upgrade, restart service
170 [ $1 -eq 2 ] || exit 0 184 [ $1 -eq 2 ] || exit 0
171 eval `%{l_rc} memcached status 2>/dev/null` 185 eval `%{l_rc} memcached status 2>/dev/null`

mercurial