memcached-vl.spec 4.9 KB

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