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