|
@@ -1,4 +1,4 @@
|
|
|
-%define memcached_version 1.4.25
|
|
|
+%define memcached_version 1.5.12
|
|
|
|
|
|
Summary: a high-performance, distributed memory object caching system
|
|
|
Summary(ja): ハイパフォーマンスな分散メモリオブジェクトキャッシングシステム
|
|
@@ -7,9 +7,6 @@ Version: %{memcached_version}
|
|
|
Release: 1%{?_dist_release}
|
|
|
Source0: http://www.danga.com/memcached/dist/%{name}-%{memcached_version}.tar.gz
|
|
|
|
|
|
-# repcached patch
|
|
|
-Patch0: repcached-%{memcached_version}.patch
|
|
|
-
|
|
|
# Patches
|
|
|
|
|
|
|
|
@@ -43,22 +40,10 @@ memcached binary include files.
|
|
|
|
|
|
perl -pi -e 's|/var/run/memcached\.pid|/var/run/memcached/memcached.pid|' scripts/memcached.sysv
|
|
|
|
|
|
-%setup -q -D -T -a 0 -n memcached-%{memcached_version}
|
|
|
-pushd memcached-%{memcached_version}
|
|
|
-%patch0 -p1 -b .replicate
|
|
|
-popd
|
|
|
-
|
|
|
%build
|
|
|
-./autogen.sh
|
|
|
%configure
|
|
|
%__make %{?_smp_mflags}
|
|
|
|
|
|
-pushd memcached-%{memcached_version}
|
|
|
-./autogen.sh
|
|
|
-%configure --enable-replication
|
|
|
-%__make %{?_smp_mflags}
|
|
|
-popd
|
|
|
-
|
|
|
%install
|
|
|
rm -rf %{buildroot}
|
|
|
mkdir -p %{buildroot}%{_initdir}
|
|
@@ -72,40 +57,24 @@ rm -f %{buildroot}%{_bindir}/memcached-debug
|
|
|
install -m755 scripts/memcached.sysv %{buildroot}%{_initdir}/memcached
|
|
|
install -m755 scripts/memcached-tool %{buildroot}%{_bindir}/
|
|
|
|
|
|
-pushd memcached-%{memcached_version}
|
|
|
-cp -f *.repcached ../
|
|
|
-popd
|
|
|
-
|
|
|
-mv -f %{buildroot}%{_bindir}/memcached %{buildroot}%{_bindir}/memcached.memcached
|
|
|
-install -m755 memcached-%{memcached_version}/memcached %{buildroot}%{_bindir}/memcached.repcached
|
|
|
-
|
|
|
cat <<EOF > %{buildroot}%{_sysconfdir}/sysconfig/memcached
|
|
|
PORT=11211
|
|
|
USER=nobody
|
|
|
MAXCONN=1024
|
|
|
CACHESIZE=64
|
|
|
OPTIONS=""
|
|
|
-#OPTIONS="-x peer_to_replicate"
|
|
|
EOF
|
|
|
|
|
|
%clean
|
|
|
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
|
|
|
+%triggerprein -- memcached < 1.5.0
|
|
|
+ /sbin/update-alternatives --remove memcached %{_bindir}/memcached.memcached ||:
|
|
|
+ /sbin/update-alternatives --remove memcached %{_bindir}/memcached.repcached ||:
|
|
|
+rm -f %{_bindir}/memcached
|
|
|
|
|
|
-%triggerpostun -- memcached < 1.4.13
|
|
|
-/sbin/update-alternatives --auto memcached ||:
|
|
|
+%post
|
|
|
+/sbin/service memcached condrestart ||:
|
|
|
|
|
|
%files
|
|
|
%defattr(-,root,root)
|
|
@@ -113,8 +82,7 @@ fi
|
|
|
%doc doc/CONTRIBUTORS doc/*.txt
|
|
|
%config(noreplace) %{_sysconfdir}/sysconfig/memcached
|
|
|
%{_initdir}/memcached
|
|
|
-%{_bindir}/memcached.memcached
|
|
|
-%{_bindir}/memcached.repcached
|
|
|
+%{_bindir}/memcached
|
|
|
%{_bindir}/memcached-tool
|
|
|
%{_mandir}/man1/memcached.1*
|
|
|
%dir %{_localstatedir}/run/memcached
|
|
@@ -124,6 +92,11 @@ fi
|
|
|
%{_includedir}/memcached/*
|
|
|
|
|
|
%changelog
|
|
|
+* Sun Nov 04 2018 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.5.12-1
|
|
|
+- new upstream release.
|
|
|
+- built with libevent-2.1.8.
|
|
|
+- dropped repcached.
|
|
|
+
|
|
|
* Mon Nov 23 2015 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.4.25-1
|
|
|
- new upstream release.
|
|
|
|