memcached-vl.spec 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170
  1. %define memcached_version 1.4.17
  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. # Patches
  9. # repcached patch
  10. Patch0: repcached-%{memcached_version}.patch
  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. %configure
  40. %__make %{?_smp_mflags}
  41. pushd memcached-%{memcached_version}
  42. aclocal
  43. autoheader
  44. automake --foreign --add-missing || automake --gnu --add-missing
  45. autoconf
  46. %configure --enable-replication
  47. %__make %{?_smp_mflags}
  48. popd
  49. %install
  50. rm -rf %{buildroot}
  51. mkdir -p %{buildroot}%{_initdir}
  52. mkdir -p %{buildroot}%{_sysconfdir}/sysconfig
  53. mkdir -p %{buildroot}%{_localstatedir}/run/memcached
  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. pushd memcached-%{memcached_version}
  59. cp -f *.repcached ../
  60. popd
  61. mv -f %{buildroot}%{_bindir}/memcached %{buildroot}%{_bindir}/memcached.memcached
  62. install -m755 memcached-%{memcached_version}/memcached %{buildroot}%{_bindir}/memcached.repcached
  63. cat <<EOF > %{buildroot}%{_sysconfdir}/sysconfig/memcached
  64. PORT=11211
  65. USER=nobody
  66. MAXCONN=1024
  67. CACHESIZE=64
  68. OPTIONS=""
  69. #OPTIONS="-x peer_to_replicate"
  70. EOF
  71. %clean
  72. rm -rf %{buildroot}
  73. %post
  74. /sbin/update-alternatives --install %{_bindir}/memcached \
  75. memcached %{_bindir}/memcached.memcached 20
  76. /sbin/update-alternatives --install %{_bindir}/memcached \
  77. memcached %{_bindir}/memcached.repcached 10
  78. %preun
  79. if [ "$1" = 0 ]; then
  80. /sbin/update-alternatives --remove memcached %{_bindir}/memcached.memcached
  81. /sbin/update-alternatives --remove memcached %{_bindir}/memcached.repcached
  82. /sbin/update-alternatives --auto memcached ||:
  83. fi
  84. %triggerpostun -- memcached < 1.4.13
  85. /sbin/update-alternatives --auto memcached ||:
  86. %files
  87. %defattr(-,root,root)
  88. %doc AUTHORS* COPYING ChangeLog ChangeLog* NEWS README*
  89. %doc doc/CONTRIBUTORS doc/*.txt
  90. %config(noreplace) %{_sysconfdir}/sysconfig/memcached
  91. %{_initdir}/memcached
  92. %{_bindir}/memcached.memcached
  93. %{_bindir}/memcached.repcached
  94. %{_bindir}/memcached-tool
  95. %{_mandir}/man1/memcached.1*
  96. %dir %{_localstatedir}/run/memcached
  97. %files devel
  98. %defattr(-,root,root,0755)
  99. %{_includedir}/memcached/*
  100. %changelog
  101. * Fri Jan 10 2014 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.4.17-1
  102. - new upstream release.
  103. * Fri May 11 2012 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.4.13-2
  104. - fixed missing symlink.
  105. * Sat Apr 28 2012 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.4.13-1
  106. - new upstream release.
  107. - made be able to choose between memcached and repcached by alternatives.
  108. * Sat Aug 20 2011 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.4.7.repcached2.3.1-1
  109. - new upstream release.
  110. - updated repcached patch.
  111. - removed %%Patch0. (fixed in upstream)
  112. * Tue Feb 15 2011 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.4.5.repcached2.3.1-1
  113. - updated repcached patch.
  114. * Mon Feb 14 2011 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.4.5.repcached2.
  115. 3-1
  116. - applied the repcached patch.
  117. * Thu Feb 10 2011 Toshiharu Kudoh <toshi.kd2@gmail.com> 1.4.5-1
  118. - new upstream release
  119. - added Patch0 from Fedora
  120. - rebuilt with libevent-2.0.10
  121. - fixed &&files
  122. - splitted -devel package
  123. * Mon Jun 22 2009 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.2.8-1
  124. - new upstream release.
  125. - wrote spec in UTF-8.
  126. * Mon May 19 2008 Tomohiro 'Tomo-p' KATO <tomop@teamgedoh.net> 1.2.5-1
  127. - new upstream release.
  128. - added some scripts.
  129. * Mon Jul 16 2007 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 1.1.12-0vl2
  130. - rebuilt with libevent-1.3b
  131. * Sun Aug 13 2006 IWAI, Masaharu <iwai@alib.jp> 1.1.12-0vl1
  132. - new package