summaryrefslogtreecommitdiff
path: root/memcached.spec.in
diff options
context:
space:
mode:
authorDustin Sallings <dustin@spy.net>2009-08-23 01:01:50 -0700
committerdormando <dormando@rydia.net>2009-08-29 15:34:00 -0700
commit4f5679356a2f98ffeb905840f28b2bc5a1498293 (patch)
tree3d5c5c31c55c04ac5d0b56b37550595ad5715fe9 /memcached.spec.in
parent483e82adc89c984cbe040857d9cf43fc725883cd (diff)
downloadmemcached-4f5679356a2f98ffeb905840f28b2bc5a1498293.tar.gz
Generate the memcached.spec along with the version number.
Diffstat (limited to 'memcached.spec.in')
-rw-r--r--memcached.spec.in115
1 files changed, 115 insertions, 0 deletions
diff --git a/memcached.spec.in b/memcached.spec.in
new file mode 100644
index 0000000..4683527
--- /dev/null
+++ b/memcached.spec.in
@@ -0,0 +1,115 @@
+Name: memcached
+Version: @VERSION@
+Release: 1%{?dist}
+Summary: High Performance, Distributed Memory Object Cache
+
+Group: System Environment/Daemons
+License: BSD
+URL: http://www.danga.com/memcached/
+Source0: http://www.danga.com/memcached/dist/%{name}-%{version}.tar.gz
+BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+
+BuildRequires: libevent-devel
+BuildRequires: perl(Test::More)
+Requires: initscripts
+Requires(post): /sbin/chkconfig
+Requires(preun): /sbin/chkconfig, /sbin/service
+Requires(postun): /sbin/service
+
+%description
+memcached is a high-performance, distributed memory object caching
+system, generic in nature, but intended for use in speeding up dynamic
+web applications by alleviating database load.
+
+%prep
+%setup -q
+
+
+%build
+%configure --enable-threads
+
+make %{?_smp_mflags}
+
+%check
+make test
+
+%install
+rm -rf %{buildroot}
+make install DESTDIR=%{buildroot}
+
+# remove memcached-debug
+rm -f %{buildroot}/%{_bindir}/memcached-debug
+
+# Perl script for monitoring memcached
+install -Dp -m0755 scripts/memcached-tool %{buildroot}%{_bindir}/memcached-tool
+
+# Init script
+install -Dp -m0755 scripts/memcached.sysv %{buildroot}%{_initrddir}/memcached
+
+# Default configs
+mkdir -p %{buildroot}/%{_sysconfdir}/sysconfig
+cat <<EOF >%{buildroot}/%{_sysconfdir}/sysconfig/%{name}
+PORT="11211"
+USER="nobody"
+MAXCONN="1024"
+CACHESIZE="64"
+OPTIONS=""
+EOF
+
+# pid directory
+mkdir -p %{buildroot}/%{_localstatedir}/run/memcached
+
+%clean
+rm -rf %{buildroot}
+
+
+%post
+/sbin/chkconfig --add %{name}
+
+%preun
+if [ "$1" = 0 ] ; then
+ /sbin/service %{name} stop > /dev/null 2>&1
+ /sbin/chkconfig --del %{name}
+fi
+exit 0
+
+%postun
+if [ "$1" -ge 1 ]; then
+ /sbin/service %{name} condrestart > /dev/null 2>&1
+fi
+exit 0
+
+
+%files
+%defattr(-,root,root,-)
+%doc AUTHORS ChangeLog COPYING NEWS README TODO doc/CONTRIBUTORS doc/*.txt
+%config(noreplace) %{_sysconfdir}/sysconfig/%{name}
+
+%dir %attr(750,nobody,nobody) %{_localstatedir}/run/memcached
+%{_bindir}/memcached-tool
+%{_bindir}/memcached
+%{_mandir}/man1/memcached.1*
+%{_initrddir}/memcached
+
+
+%changelog
+* Sat Aug 29 2009 Dustin Sallings <dustin@spy.net> - 1.4.1-1
+- Autogenerate the version number from tags.
+
+* Wed Jul 4 2007 Paul Lindner <lindner@inuus.com> - 1.2.2-5
+- Use /var/run/memcached/ directory to hold PID file
+
+* Sat May 12 2007 Paul Lindner <lindner@inuus.com> - 1.2.2-4
+- Remove tabs from spec file, rpmlint reports no more errors
+
+* Thu May 10 2007 Paul Lindner <lindner@inuus.com> - 1.2.2-3
+- Enable build-time regression tests
+- add dependency on initscripts
+- remove memcached-debug (not needed in dist)
+- above suggestions from Bernard Johnson
+
+* Mon May 7 2007 Paul Lindner <lindner@inuus.com> - 1.2.2-2
+- Tidyness improvements suggested by Ruben Kerkhof in bugzilla #238994
+
+* Fri May 4 2007 Paul Lindner <lindner@inuus.com> - 1.2.2-1
+- Initial spec file created via rpmdev-newspec