Guest User

fixed-memcached

a guest
Aug 19th, 2014
656
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 10.17 KB | None | 0 0
  1. # Authority: dag
  2. # Upstream: Brad Fitzpatrick <brad$danga,com>
  3.  
  4. ### perl-AnyEvent is rfx on EL5, and so memcached must be as well
  5. %{?el5:# Tag: rfx}
  6. ### EL6 ships with memcached-1.4.4-3.el6
  7. %{?el6:# Tag: rfx}
  8.  
  9. %ifarch %{ix86}
  10. %define build_64bit --disable-64bit
  11. %else
  12. %define build_64bit --enable-64bit
  13. %endif
  14.  
  15. Summary: Distributed memory object caching system
  16. Name: memcached
  17. Version: 1.4.20
  18. Release: 1%{?dist}
  19. License: BSD
  20. Group: System Environment/Daemons
  21. URL: http://memcached.org/
  22.  
  23. Source: http://memcached.googlecode.com/files/memcached-%{version}.tar.gz
  24. BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
  25.  
  26. BuildRequires: cyrus-sasl-devel
  27. BuildRequires: libevent-devel
  28. Requires(post): /sbin/chkconfig
  29. Requires(preun): /sbin/chkconfig, /sbin/service
  30. Requires(postun): /sbin/service
  31.  
  32. %description
  33. memcached is a high-performance, distributed memory object caching system,
  34. generic in nature, but intended for use in speeding up dynamic web
  35. applications by alleviating database load.
  36.  
  37. %package devel
  38. Group: Development/Tools
  39. Summary: Header files for memcached
  40.  
  41. %description devel
  42. Install this package if you want to develop programs that link against
  43. memcached.
  44.  
  45. %prep
  46. %setup
  47.  
  48. %{__cat} <<EOF >memcached.sysconfig
  49. PORT="11211"
  50. USER="nobody"
  51. MAXCONN="1024"
  52. CACHESIZE="64"
  53. OPTIONS=""
  54. EOF
  55.  
  56. %build
  57. CFLAGS="${CFLAGS:-%optflags}" ; export CFLAGS ;
  58. %configure \
  59. --program-prefix="%{?_program_prefix}" \
  60. --disable-dependency-tracking \
  61. --enable-sasl \
  62. %{build_64bit}
  63. %{__make} CFLAGS='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=0 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic'
  64.  
  65.  
  66. %install
  67. %{__rm} -rf %{buildroot}
  68. %{__make} install DESTDIR="%{buildroot}"
  69.  
  70. %{__install} -Dp -m0755 scripts/memcached.sysv \
  71. %{buildroot}%{_sysconfdir}/rc.d/init.d/memcached
  72. %{__install} -Dp -m0644 memcached.sysconfig \
  73. %{buildroot}%{_sysconfdir}/sysconfig/memcached
  74.  
  75. %{__install} -Dp -m0755 scripts/memcached-tool %{buildroot}%{_bindir}
  76. %{__install} -Dp -m0755 scripts/mc_slab_mover %{buildroot}%{_bindir}
  77.  
  78. %{__install} -Dp -m0755 scripts/damemtop %{buildroot}%{_bindir}
  79. %{__install} -Dp -m0644 scripts/damemtop.yaml %{buildroot}%{_sysconfdir}
  80.  
  81. %post
  82. /sbin/chkconfig --add memcached
  83.  
  84. %preun
  85. if [ $1 -eq 0 ]; then
  86. /sbin/service memcached stop &> /dev/null || :
  87. /sbin/chkconfig --del memcached
  88. fi
  89.  
  90. %postun
  91. /sbin/service memcached condrestart &>/dev/null || :
  92.  
  93. %clean
  94. %{__rm} -rf %{buildroot}
  95.  
  96. %files
  97. %defattr(-, root, root, 0755)
  98. %doc AUTHORS COPYING ChangeLog doc/*.txt NEWS scripts/README.damemtop
  99. %doc %{_mandir}/man?/*
  100. %config(noreplace) %{_sysconfdir}/sysconfig/memcached
  101. %config(noreplace) %{_sysconfdir}/damemtop.yaml
  102. %config %{_initrddir}/memcached
  103. %{_bindir}/damemtop
  104. %{_bindir}/memcached
  105. %{_bindir}/memcached-tool
  106. %{_bindir}/mc_slab_mover
  107.  
  108. %files devel
  109. %{_includedir}/memcached
  110.  
  111. %changelog
  112. * Wed Aug 22 2012 Steve Huff <[email protected]> - 1.4.14-1
  113. - Updated to 1.4.14.
  114. - Replace custom SysV init script with stock.
  115. - Install mc_slab_mover utility.
  116.  
  117. * Thu Aug 25 2011 Steve Huff <[email protected]> - 1.4.7-1
  118. - Updated to 1.4.7.
  119. - Install damemtop in a sensible place.
  120.  
  121. * Fri Aug 05 2011 Steve Huff <[email protected]> - 1.4.6-1
  122. - Updated to 1.4.6.
  123. - Tagged as RFX in el5 as well (due to perl-AnyEvent dependency).
  124.  
  125. * Fri Apr 16 2010 Steve Huff <[email protected]> - 1.4.5-1
  126. - Updated to 1.4.5.
  127.  
  128. * Wed Mar 31 2010 Steve Huff <[email protected]> - 1.4.4-2
  129. - Rebuild against libevent-1.4.13 on EL5.
  130.  
  131. * Mon Feb 08 2010 Steve Huff <[email protected]> - 1.4.4-1
  132. - Updated to 1.4.4.
  133. - Split off include files into memcached-devel.
  134. - Install memcached-tool in %{_bindir}, install damemtop in %{_docdir}.
  135.  
  136. * Wed Aug 20 2008 Michael Best <[email protected]> 1.2.6
  137. - Update to 1.2.6.
  138.  
  139. * Tue May 29 2007 Matthias Saou <http://freshrpms.net/> 1.2.2-1
  140. - Update to 1.2.2.
  141. - Enable new threads feature.
  142.  
  143. * Sun Mar 25 2007 Dag Wieers <[email protected]> - 1.2.1-4
  144. - Rebuild against libevent-1.1a on EL5.
  145.  
  146. * Wed Mar 07 2007 Dag Wieers <[email protected]> - 1.2.1-3
  147. - Rebuild against libevent-1.3b.
  148.  
  149. * Tue Feb 20 2007 Dag Wieers <[email protected]> - 1.2.1-2
  150. - Rebuild against libevent-1.3a.
  151.  
  152. * Mon Feb 19 2007 Dag Wieers <[email protected]> - 1.2.1-1
  153. - Updated to release 1.2.1.
  154.  
  155. * Wed Nov 01 2006 Dag Wieers <[email protected]> - 1.1.13-1
  156. - Updated to release 1.1.13.
  157.  
  158. * Sat Aug 19 2006 Dag Wieers <[email protected]> - 1.1.12-3
  159. - Rebuild against libevent-1.1b.
  160.  
  161. * Mon Apr 03 2006 Dag Wieers <[email protected]> - 1.1.12-2
  162. - Rebuild against libevent-1.1a.
  163.  
  164. * Wed Jan 11 2006 Matthias Saou <http://freshrpms.net/> 1.1.12-1
  165. - Update to 1.1.12.
  166. - Remove no longer needed segfault patch.
  167. - Add Requires(foo):...
  168. - Remove INSTALL from %%doc.
  169. - Don't have the init script be tagged as config, the config part is all in
  170. the sysconfig file.
  171. - make install now works again.
  172. - Fix non working reload in the init script.
  173.  
  174. * Mon Mar 07 2005 Dag Wieers <[email protected]> - 1.1.11-1
  175. - Cosmetic changes.
  176.  
  177. * Thu Feb 24 2005 Rob Starkey <[email protected]> - 1.1.11-1
  178. - Initial package.
  179. [root@localhost SPECS]#
  180. [root@localhost SPECS]# cat memcached.spec
  181. # Authority: dag
  182. # Upstream: Brad Fitzpatrick <brad$danga,com>
  183.  
  184. ### perl-AnyEvent is rfx on EL5, and so memcached must be as well
  185. %{?el5:# Tag: rfx}
  186. ### EL6 ships with memcached-1.4.4-3.el6
  187. %{?el6:# Tag: rfx}
  188.  
  189. %ifarch %{ix86}
  190. %define build_64bit --disable-64bit
  191. %else
  192. %define build_64bit --enable-64bit
  193. %endif
  194.  
  195. Summary: Distributed memory object caching system
  196. Name: memcached
  197. Version: 1.4.20
  198. Release: 1%{?dist}
  199. License: BSD
  200. Group: System Environment/Daemons
  201. URL: http://memcached.org/
  202.  
  203. Source: http://memcached.googlecode.com/files/memcached-%{version}.tar.gz
  204. BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
  205.  
  206. BuildRequires: cyrus-sasl-devel
  207. BuildRequires: libevent-devel
  208. Requires(post): /sbin/chkconfig
  209. Requires(preun): /sbin/chkconfig, /sbin/service
  210. Requires(postun): /sbin/service
  211.  
  212. %description
  213. memcached is a high-performance, distributed memory object caching system,
  214. generic in nature, but intended for use in speeding up dynamic web
  215. applications by alleviating database load.
  216.  
  217. %package devel
  218. Group: Development/Tools
  219. Summary: Header files for memcached
  220.  
  221. %description devel
  222. Install this package if you want to develop programs that link against
  223. memcached.
  224.  
  225. %prep
  226. %setup
  227.  
  228. %{__cat} <<EOF >memcached.sysconfig
  229. PORT="11211"
  230. USER="nobody"
  231. MAXCONN="1024"
  232. CACHESIZE="64"
  233. OPTIONS=""
  234. EOF
  235.  
  236. %build
  237. CFLAGS="${CFLAGS:-%optflags}" ; export CFLAGS ;
  238. %configure \
  239. --program-prefix="%{?_program_prefix}" \
  240. --disable-dependency-tracking \
  241. --enable-sasl \
  242. %{build_64bit}
  243. %{__make} CFLAGS='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=0 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic'
  244.  
  245.  
  246. %install
  247. %{__rm} -rf %{buildroot}
  248. %{__make} install DESTDIR="%{buildroot}"
  249.  
  250. %{__install} -Dp -m0755 scripts/memcached.sysv \
  251. %{buildroot}%{_sysconfdir}/rc.d/init.d/memcached
  252. %{__install} -Dp -m0644 memcached.sysconfig \
  253. %{buildroot}%{_sysconfdir}/sysconfig/memcached
  254.  
  255. %{__install} -Dp -m0755 scripts/memcached-tool %{buildroot}%{_bindir}
  256. %{__install} -Dp -m0755 scripts/mc_slab_mover %{buildroot}%{_bindir}
  257.  
  258. %{__install} -Dp -m0755 scripts/damemtop %{buildroot}%{_bindir}
  259. %{__install} -Dp -m0644 scripts/damemtop.yaml %{buildroot}%{_sysconfdir}
  260.  
  261. %post
  262. /sbin/chkconfig --add memcached
  263.  
  264. %preun
  265. if [ $1 -eq 0 ]; then
  266. /sbin/service memcached stop &> /dev/null || :
  267. /sbin/chkconfig --del memcached
  268. fi
  269.  
  270. %postun
  271. /sbin/service memcached condrestart &>/dev/null || :
  272.  
  273. %clean
  274. %{__rm} -rf %{buildroot}
  275.  
  276. %files
  277. %defattr(-, root, root, 0755)
  278. %doc AUTHORS COPYING ChangeLog doc/*.txt NEWS scripts/README.damemtop
  279. %doc %{_mandir}/man?/*
  280. %config(noreplace) %{_sysconfdir}/sysconfig/memcached
  281. %config(noreplace) %{_sysconfdir}/damemtop.yaml
  282. %config %{_initrddir}/memcached
  283. %{_bindir}/damemtop
  284. %{_bindir}/memcached
  285. %{_bindir}/memcached-tool
  286. %{_bindir}/mc_slab_mover
  287.  
  288. %files devel
  289. %{_includedir}/memcached
  290.  
  291. %changelog
  292. * Wed Aug 22 2012 Steve Huff <[email protected]> - 1.4.14-1
  293. - Updated to 1.4.14.
  294. - Replace custom SysV init script with stock.
  295. - Install mc_slab_mover utility.
  296.  
  297. * Thu Aug 25 2011 Steve Huff <[email protected]> - 1.4.7-1
  298. - Updated to 1.4.7.
  299. - Install damemtop in a sensible place.
  300.  
  301. * Fri Aug 05 2011 Steve Huff <[email protected]> - 1.4.6-1
  302. - Updated to 1.4.6.
  303. - Tagged as RFX in el5 as well (due to perl-AnyEvent dependency).
  304.  
  305. * Fri Apr 16 2010 Steve Huff <[email protected]> - 1.4.5-1
  306. - Updated to 1.4.5.
  307.  
  308. * Wed Mar 31 2010 Steve Huff <[email protected]> - 1.4.4-2
  309. - Rebuild against libevent-1.4.13 on EL5.
  310.  
  311. * Mon Feb 08 2010 Steve Huff <[email protected]> - 1.4.4-1
  312. - Updated to 1.4.4.
  313. - Split off include files into memcached-devel.
  314. - Install memcached-tool in %{_bindir}, install damemtop in %{_docdir}.
  315.  
  316. * Wed Aug 20 2008 Michael Best <[email protected]> 1.2.6
  317. - Update to 1.2.6.
  318.  
  319. * Tue May 29 2007 Matthias Saou <http://freshrpms.net/> 1.2.2-1
  320. - Update to 1.2.2.
  321. - Enable new threads feature.
  322.  
  323. * Sun Mar 25 2007 Dag Wieers <[email protected]> - 1.2.1-4
  324. - Rebuild against libevent-1.1a on EL5.
  325.  
  326. * Wed Mar 07 2007 Dag Wieers <[email protected]> - 1.2.1-3
  327. - Rebuild against libevent-1.3b.
  328.  
  329. * Tue Feb 20 2007 Dag Wieers <[email protected]> - 1.2.1-2
  330. - Rebuild against libevent-1.3a.
  331.  
  332. * Mon Feb 19 2007 Dag Wieers <[email protected]> - 1.2.1-1
  333. - Updated to release 1.2.1.
  334.  
  335. * Wed Nov 01 2006 Dag Wieers <[email protected]> - 1.1.13-1
  336. - Updated to release 1.1.13.
  337.  
  338. * Sat Aug 19 2006 Dag Wieers <[email protected]> - 1.1.12-3
  339. - Rebuild against libevent-1.1b.
  340.  
  341. * Mon Apr 03 2006 Dag Wieers <[email protected]> - 1.1.12-2
  342. - Rebuild against libevent-1.1a.
  343.  
  344. * Wed Jan 11 2006 Matthias Saou <http://freshrpms.net/> 1.1.12-1
  345. - Update to 1.1.12.
  346. - Remove no longer needed segfault patch.
  347. - Add Requires(foo):...
  348. - Remove INSTALL from %%doc.
  349. - Don't have the init script be tagged as config, the config part is all in
  350. the sysconfig file.
  351. - make install now works again.
  352. - Fix non working reload in the init script.
  353.  
  354. * Mon Mar 07 2005 Dag Wieers <[email protected]> - 1.1.11-1
  355. - Cosmetic changes.
  356.  
  357. * Thu Feb 24 2005 Rob Starkey <[email protected]> - 1.1.11-1
  358. - Initial package.
Advertisement
Add Comment
Please, Sign In to add comment