]> git.pld-linux.org Git - packages/memcached.git/blobdiff - memcached.spec
- release 2: rebuild with new libevent
[packages/memcached.git] / memcached.spec
index dfaaf6af01dccd5a6c85eedfae99a4cad0706f5d..3e7cb22fc2d0d6adc0df92914eb8e54acacbe5db 100644 (file)
@@ -1,28 +1,33 @@
 # TODO
-# - init script (see scripts/), but gotta test it first :-)
-#
+# - memcached has -P option for pid, but root privs are dropped before
+#   pid is written, so either run memcached as new uid or hack code to
+#   write pidfile before changing uid, as rc-script removes pid on
+#   shutdown anyway.
 Summary:       A high-performance, distributed memory object caching system
-Summary(pl):   Rozproszony system cache'owania obiektów o wysokiej wydajno¶ci
+Summary(pl.UTF-8):     Rozproszony, wysokiej wydajności system cache'owania obiektów
 Name:          memcached
-Version:       1.1.12
-Release:       0.2
-Epoch:         0
-License:       GPL?
-Vendor:                Brad Fitzpatrick <brad@danga.com>
+Version:       1.2.2
+Release:       2
+License:       BSD
 Group:         Networking/Daemons
 Source0:       http://www.danga.com/memcached/dist/%{name}-%{version}.tar.gz
-# Source0-md5: a1236dad33e9ac6c36d53faa8da61780
+# Source0-md5: a08851f7fa7b15e92ee6320b7a79c321
+Source1:       %{name}.init
+Source2:       %{name}.sysconfig
 URL:           http://www.danga.com/memcached/
 BuildRequires: autoconf
 BuildRequires: automake
-BuildRequires: libevent-devel
+BuildRequires: libevent-devel >= 1.1
+BuildRequires: rpmbuild(macros) >= 1.268
+Requires(post,preun):  /sbin/chkconfig
+Requires:      rc-scripts
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %description
 A high-performance, distributed memory object caching system.
 
-%description -l pl
-Rozproszony system cache'owania obiektów o wysokiej wydajno¶ci.
+%description -l pl.UTF-8
+Rozproszony, wysokiej wydajności system cache'owania obiektów.
 
 %prep
 %setup -q
@@ -37,10 +42,25 @@ Rozproszony system cache'owania obiekt
 
 %install
 rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT{%{_bindir},%{_mandir}/man1}
-install memcached $RPM_BUILD_ROOT%{_bindir}
+install -d $RPM_BUILD_ROOT/etc/{rc.d/init.d,sysconfig}
+install -d $RPM_BUILD_ROOT{%{_sbindir},%{_mandir}/man1}
+
+install memcached $RPM_BUILD_ROOT%{_sbindir}
 install doc/memcached.1 $RPM_BUILD_ROOT%{_mandir}/man1
 
+install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
+install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/%{name}
+
+%post
+/sbin/chkconfig --add %{name}
+%service %{name} restart
+
+%preun
+if [ "$1" = "0" ]; then
+       %service -q %{name} stop
+       /sbin/chkconfig --del %{name}
+fi
+
 %clean
 rm -rf $RPM_BUILD_ROOT
 
@@ -49,3 +69,5 @@ rm -rf $RPM_BUILD_ROOT
 %doc AUTHORS README TODO doc/*.txt
 %attr(755,root,root) %{_sbindir}/*
 %{_mandir}/man1/*
+%attr(754,root,root) /etc/rc.d/init.d/%{name}
+%config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/%{name}
This page took 0.034184 seconds and 4 git commands to generate.