|
@@ -1,21 +1,20 @@
|
|
-%define memcached_version 1.4.5
|
|
|
|
|
|
+%define memcached_version 1.4.13
|
|
%define repcached_version 2.3.1
|
|
%define repcached_version 2.3.1
|
|
|
|
|
|
Summary: a high-performance, distributed memory object caching system
|
|
Summary: a high-performance, distributed memory object caching system
|
|
Summary(ja): ハイパフォーマンスな分散メモリオブジェクトキャッシングシステム
|
|
Summary(ja): ハイパフォーマンスな分散メモリオブジェクトキャッシングシステム
|
|
Name: memcached
|
|
Name: memcached
|
|
-Version: %{memcached_version}.repcached%{repcached_version}
|
|
|
|
|
|
+Version: %{memcached_version}
|
|
Release: 1%{?_dist_release}
|
|
Release: 1%{?_dist_release}
|
|
Source0: http://www.danga.com/memcached/dist/%{name}-%{memcached_version}.tar.gz
|
|
Source0: http://www.danga.com/memcached/dist/%{name}-%{memcached_version}.tar.gz
|
|
|
|
+Source1: repcached-%{repcached_version}-%{memcached_version}.tar.gz
|
|
|
|
|
|
# Patches
|
|
# Patches
|
|
-# From http://code.google.com/p/memcached/issues/detail?id=60
|
|
|
|
-Patch0: memcached-1.4.5-issue60.diff
|
|
|
|
|
|
|
|
# repcached patch
|
|
# repcached patch
|
|
Patch1: repcached-%{repcached_version}-%{memcached_version}.patch
|
|
Patch1: repcached-%{repcached_version}-%{memcached_version}.patch
|
|
|
|
|
|
-License: modified BDS style License
|
|
|
|
|
|
+License: modified BSD style License
|
|
Url: http://www.danga.com/memcached/
|
|
Url: http://www.danga.com/memcached/
|
|
Group: Applications/Databases
|
|
Group: Applications/Databases
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-root
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-root
|
|
@@ -26,8 +25,6 @@ memcached is a high-performance, distributed memory object caching system,
|
|
generic in nature, but intended for use in speeding up dynamic web
|
|
generic in nature, but intended for use in speeding up dynamic web
|
|
applications by alleviating database load.
|
|
applications by alleviating database load.
|
|
|
|
|
|
-This package was applied the repcached-patch for redundancy.
|
|
|
|
-
|
|
|
|
%package devel
|
|
%package devel
|
|
Summary: Files needed for development using memcached protocol
|
|
Summary: Files needed for development using memcached protocol
|
|
Summary(ja): memcached プロトコルを使用した開発に必要なファイル
|
|
Summary(ja): memcached プロトコルを使用した開発に必要なファイル
|
|
@@ -39,20 +36,38 @@ Install memcached-devel if you are developing C/C++ applications that require ac
|
|
memcached binary include files.
|
|
memcached binary include files.
|
|
|
|
|
|
%prep
|
|
%prep
|
|
-%setup -n memcached-%{memcached_version}
|
|
|
|
-%patch0 -p1
|
|
|
|
-%patch1 -p1 -b .rc
|
|
|
|
|
|
+%setup -q -T -a 0 -c -n memcached-%{memcached_version}
|
|
|
|
+
|
|
|
|
+pushd memcached-%{memcached_version}
|
|
|
|
+
|
|
|
|
+popd
|
|
|
|
+
|
|
|
|
+%setup -q -D -T -a 1 -n memcached-%{memcached_version}
|
|
|
|
+
|
|
|
|
+pushd repcached-%{repcached_version}-%{memcached_version}
|
|
|
|
+
|
|
|
|
+popd
|
|
|
|
|
|
%build
|
|
%build
|
|
|
|
+pushd memcached-%{memcached_version}
|
|
|
|
+#sh ./autogen.sh
|
|
|
|
+%configure
|
|
|
|
+%__make %{?_smp_mflags}
|
|
|
|
+popd
|
|
|
|
+
|
|
|
|
+pushd repcached-%{repcached_version}-%{memcached_version}
|
|
sh ./autogen.sh
|
|
sh ./autogen.sh
|
|
%configure --enable-replication
|
|
%configure --enable-replication
|
|
|
|
+%__make %{?_smp_mflags}
|
|
|
|
+popd
|
|
|
|
|
|
%install
|
|
%install
|
|
rm -rf %{buildroot}
|
|
rm -rf %{buildroot}
|
|
mkdir -p %{buildroot}%{_initdir}
|
|
mkdir -p %{buildroot}%{_initdir}
|
|
mkdir -p %{buildroot}%{_sysconfdir}/sysconfig
|
|
mkdir -p %{buildroot}%{_sysconfdir}/sysconfig
|
|
mkdir -p %{buildroot}%{_localstatedir}/run/memcached
|
|
mkdir -p %{buildroot}%{_localstatedir}/run/memcached
|
|
-%__make %{?_smp_mflags}
|
|
|
|
|
|
+
|
|
|
|
+pushd memcached-%{memcached_version}
|
|
%makeinstall
|
|
%makeinstall
|
|
|
|
|
|
rm -f %{buildroot}%{_bindir}/memcached-debug
|
|
rm -f %{buildroot}%{_bindir}/memcached-debug
|
|
@@ -60,24 +75,48 @@ rm -f %{buildroot}%{_bindir}/memcached-debug
|
|
install -m755 scripts/memcached.sysv %{buildroot}%{_initdir}/memcached
|
|
install -m755 scripts/memcached.sysv %{buildroot}%{_initdir}/memcached
|
|
install -m755 scripts/memcached-tool %{buildroot}%{_bindir}/
|
|
install -m755 scripts/memcached-tool %{buildroot}%{_bindir}/
|
|
|
|
|
|
|
|
+popd
|
|
|
|
+
|
|
|
|
+pushd repcached-%{repcached_version}-%{memcached_version}
|
|
|
|
+cp -af AUTHORS COPYING ChangeLog ChangeLog.repcached NEWS README doc ../
|
|
|
|
+popd
|
|
|
|
+
|
|
|
|
+mv -f %{buildroot}%{_bindir}/memcached %{buildroot}%{_bindir}/memcached.memcached
|
|
|
|
+install -m755 repcached-%{repcached_version}-%{memcached_version}/memcached %{buildroot}%{_bindir}/memcached.repcached
|
|
|
|
+
|
|
cat <<EOF > %{buildroot}%{_sysconfdir}/sysconfig/memcached
|
|
cat <<EOF > %{buildroot}%{_sysconfdir}/sysconfig/memcached
|
|
PORT=11211
|
|
PORT=11211
|
|
USER=nobody
|
|
USER=nobody
|
|
MAXCONN=1024
|
|
MAXCONN=1024
|
|
CACHESIZE=64
|
|
CACHESIZE=64
|
|
OPTIONS=""
|
|
OPTIONS=""
|
|
|
|
+#OPTIONS="-x peer.to.replicate"
|
|
EOF
|
|
EOF
|
|
|
|
|
|
%clean
|
|
%clean
|
|
rm -rf %{buildroot}
|
|
rm -rf %{buildroot}
|
|
|
|
|
|
|
|
+%post
|
|
|
|
+/sbin/update-alternatives --install %{_bindir}/memcached \
|
|
|
|
+ memcached %{_bindir}/memcached.memcached 20
|
|
|
|
+/sbin/update-alternatives --install %{_bindir}/memcached \
|
|
|
|
+ memcached %{_bindir}/memcached.repcached 10
|
|
|
|
+
|
|
|
|
+%preun
|
|
|
|
+if [ "$1" = 0 ]; then
|
|
|
|
+ /sbin/update-alternatives --remove memcached %{_bindir}/memcached.memcached
|
|
|
|
+ /sbin/update-alternatives --remove memcached %{_bindir}/memcached.repcached
|
|
|
|
+ /sbin/update-alternatives --auto memcached ||:
|
|
|
|
+fi
|
|
|
|
+
|
|
%files
|
|
%files
|
|
%defattr(-,root,root)
|
|
%defattr(-,root,root)
|
|
%doc AUTHORS COPYING ChangeLog ChangeLog.repcached NEWS README
|
|
%doc AUTHORS COPYING ChangeLog ChangeLog.repcached NEWS README
|
|
%doc doc/CONTRIBUTORS doc/*.txt
|
|
%doc doc/CONTRIBUTORS doc/*.txt
|
|
%config(noreplace) %{_sysconfdir}/sysconfig/memcached
|
|
%config(noreplace) %{_sysconfdir}/sysconfig/memcached
|
|
%{_initdir}/memcached
|
|
%{_initdir}/memcached
|
|
-%{_bindir}/memcached
|
|
|
|
|
|
+%{_bindir}/memcached.memcached
|
|
|
|
+%{_bindir}/memcached.repcached
|
|
%{_bindir}/memcached-tool
|
|
%{_bindir}/memcached-tool
|
|
%{_mandir}/man1/memcached.1*
|
|
%{_mandir}/man1/memcached.1*
|
|
%dir %{_localstatedir}/run/memcached
|
|
%dir %{_localstatedir}/run/memcached
|
|
@@ -87,6 +126,15 @@ rm -rf %{buildroot}
|
|
%{_includedir}/memcached/*
|
|
%{_includedir}/memcached/*
|
|
|
|
|
|
%changelog
|
|
%changelog
|
|
|
|
+* Sat Apr 28 2012 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.4.13-1
|
|
|
|
+- new upstream release.
|
|
|
|
+- made be able to choose between memcached and repcached by alternatives.
|
|
|
|
+
|
|
|
|
+* Sat Aug 20 2011 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.4.7.repcached2.3.1-1
|
|
|
|
+- new upstream release.
|
|
|
|
+- updated repcached patch.
|
|
|
|
+- removed %%Patch0. (fixed in upstream)
|
|
|
|
+
|
|
* Tue Feb 15 2011 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.4.5.repcached2.3.1-1
|
|
* Tue Feb 15 2011 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.4.5.repcached2.3.1-1
|
|
- updated repcached patch.
|
|
- updated repcached patch.
|
|
|
|
|