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