memcached-vl.spec 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165
  1. %define memcached_version 1.4.13
  2. %define repcached_version 2.3.1
  3. Summary: a high-performance, distributed memory object caching system
  4. Summary(ja): ハイパフォーマンスな分散メモリオブジェクトキャッシングシステム
  5. Name: memcached
  6. Version: %{memcached_version}
  7. Release: 1%{?_dist_release}
  8. Source0: http://www.danga.com/memcached/dist/%{name}-%{memcached_version}.tar.gz
  9. Source1: repcached-%{repcached_version}-%{memcached_version}.tar.gz
  10. # Patches
  11. # repcached patch
  12. Patch1: repcached-%{repcached_version}-%{memcached_version}.patch
  13. License: modified BSD style License
  14. Url: http://www.danga.com/memcached/
  15. Group: Applications/Databases
  16. BuildRoot: %{_tmppath}/%{name}-%{version}-root
  17. BuildRequires: libevent-devel
  18. %description
  19. memcached is a high-performance, distributed memory object caching system,
  20. generic in nature, but intended for use in speeding up dynamic web
  21. applications by alleviating database load.
  22. %package devel
  23. Summary: Files needed for development using memcached protocol
  24. Summary(ja): memcached プロトコルを使用した開発に必要なファイル
  25. Group: Development/Libraries
  26. Requires: %{name} = %{version}-%{release}
  27. %description devel
  28. Install memcached-devel if you are developing C/C++ applications that require access to the
  29. memcached binary include files.
  30. %prep
  31. %setup -q -T -a 0 -c -n memcached-%{memcached_version}
  32. pushd memcached-%{memcached_version}
  33. popd
  34. %setup -q -D -T -a 1 -n memcached-%{memcached_version}
  35. pushd repcached-%{repcached_version}-%{memcached_version}
  36. popd
  37. %build
  38. pushd memcached-%{memcached_version}
  39. #sh ./autogen.sh
  40. %configure
  41. %__make %{?_smp_mflags}
  42. popd
  43. pushd repcached-%{repcached_version}-%{memcached_version}
  44. sh ./autogen.sh
  45. %configure --enable-replication
  46. %__make %{?_smp_mflags}
  47. popd
  48. %install
  49. rm -rf %{buildroot}
  50. mkdir -p %{buildroot}%{_initdir}
  51. mkdir -p %{buildroot}%{_sysconfdir}/sysconfig
  52. mkdir -p %{buildroot}%{_localstatedir}/run/memcached
  53. pushd memcached-%{memcached_version}
  54. %makeinstall
  55. rm -f %{buildroot}%{_bindir}/memcached-debug
  56. install -m755 scripts/memcached.sysv %{buildroot}%{_initdir}/memcached
  57. install -m755 scripts/memcached-tool %{buildroot}%{_bindir}/
  58. popd
  59. pushd repcached-%{repcached_version}-%{memcached_version}
  60. cp -af AUTHORS COPYING ChangeLog ChangeLog.repcached NEWS README doc ../
  61. popd
  62. mv -f %{buildroot}%{_bindir}/memcached %{buildroot}%{_bindir}/memcached.memcached
  63. install -m755 repcached-%{repcached_version}-%{memcached_version}/memcached %{buildroot}%{_bindir}/memcached.repcached
  64. cat <<EOF > %{buildroot}%{_sysconfdir}/sysconfig/memcached
  65. PORT=11211
  66. USER=nobody
  67. MAXCONN=1024
  68. CACHESIZE=64
  69. OPTIONS=""
  70. #OPTIONS="-x peer.to.replicate"
  71. EOF
  72. %clean
  73. rm -rf %{buildroot}
  74. %post
  75. /sbin/update-alternatives --install %{_bindir}/memcached \
  76. memcached %{_bindir}/memcached.memcached 20
  77. /sbin/update-alternatives --install %{_bindir}/memcached \
  78. memcached %{_bindir}/memcached.repcached 10
  79. %preun
  80. if [ "$1" = 0 ]; then
  81. /sbin/update-alternatives --remove memcached %{_bindir}/memcached.memcached
  82. /sbin/update-alternatives --remove memcached %{_bindir}/memcached.repcached
  83. /sbin/update-alternatives --auto memcached ||:
  84. fi
  85. %files
  86. %defattr(-,root,root)
  87. %doc AUTHORS COPYING ChangeLog ChangeLog.repcached NEWS README
  88. %doc doc/CONTRIBUTORS doc/*.txt
  89. %config(noreplace) %{_sysconfdir}/sysconfig/memcached
  90. %{_initdir}/memcached
  91. %{_bindir}/memcached.memcached
  92. %{_bindir}/memcached.repcached
  93. %{_bindir}/memcached-tool
  94. %{_mandir}/man1/memcached.1*
  95. %dir %{_localstatedir}/run/memcached
  96. %files devel
  97. %defattr(-,root,root,0755)
  98. %{_includedir}/memcached/*
  99. %changelog
  100. * Sat Apr 28 2012 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.4.13-1
  101. - new upstream release.
  102. - made be able to choose between memcached and repcached by alternatives.
  103. * Sat Aug 20 2011 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.4.7.repcached2.3.1-1
  104. - new upstream release.
  105. - updated repcached patch.
  106. - removed %%Patch0. (fixed in upstream)
  107. * Tue Feb 15 2011 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.4.5.repcached2.3.1-1
  108. - updated repcached patch.
  109. * Mon Feb 14 2011 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.4.5.repcached2.
  110. 3-1
  111. - applied the repcached patch.
  112. * Thu Feb 10 2011 Toshiharu Kudoh <toshi.kd2@gmail.com> 1.4.5-1
  113. - new upstream release
  114. - added Patch0 from Fedora
  115. - rebuilt with libevent-2.0.10
  116. - fixed &&files
  117. - splitted -devel package
  118. * Mon Jun 22 2009 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.2.8-1
  119. - new upstream release.
  120. - wrote spec in UTF-8.
  121. * Mon May 19 2008 Tomohiro 'Tomo-p' KATO <tomop@teamgedoh.net> 1.2.5-1
  122. - new upstream release.
  123. - added some scripts.
  124. * Mon Jul 16 2007 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 1.1.12-0vl2
  125. - rebuilt with libevent-1.3b
  126. * Sun Aug 13 2006 IWAI, Masaharu <iwai@alib.jp> 1.1.12-0vl1
  127. - new package