Fix a memory leak in list-tubes-watched.
[beanstalkd.git] / beanstalkd.spec.in
blobfecfd5858ab2d34de285015ac18e208200317cc8
1 %define beanstalkd_user beanstalkd
2 %define beanstalkd_group %{beanstalkd_user}
3 %define beanstalkd_home %{_localstatedir}/lib/beanstalkd
4 %define beanstalkd_logdir %{_localstatedir}/log/beanstalkd
6 Name: beanstalkd
7 Version: @VERSION@
8 Release: 0%{?dist}
9 Summary: A simple, fast workqueue service
11 Group: System Environment/Daemons
12 License: GPLv3+
13 URL: http://xph.us/software/%{name}/
14 Source0: http://xph.us/dist/%{name}/rel/%{name}-%{version}.tar.gz
16 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
17 BuildRequires: libevent-devel
19 Requires(pre): %{_sbindir}/useradd
20 Requires(post): /sbin/chkconfig
21 Requires(preun): /sbin/chkconfig, /sbin/service
22 Requires(postun): /sbin/service
25 %description
26 Beanstalk is a simple, fast workqueue service. Its interface is generic, but
27 was originally designed for reducing the latency of page views in high-volume
28 web applications by running time-consuming tasks asynchronously.
31 %prep
32 %setup -q
33 if [ ! -e configure ]; then
34 sh buildconf.sh
37 %build
38 %configure --disable-rpath --docdir=%{_defaultdocdir}/%{name}-%{version}
39 make %{?_smp_mflags}
41 %install
42 rm -rf $RPM_BUILD_ROOT
43 make install DESTDIR=$RPM_BUILD_ROOT
44 %{__install} -p -D -m 0644 doc/%{name}.1 %{buildroot}%{_mandir}/man1/%{name}.1
45 %{__install} -p -D -m 0755 scripts/%{name}.init %{buildroot}%{_initrddir}/%{name}
46 %{__install} -p -D -m 0644 scripts/%{name}.sysconfig %{buildroot}%{_sysconfdir}/sysconfig/%{name}
49 %clean
50 rm -rf $RPM_BUILD_ROOT
52 %pre
53 %{_sbindir}/useradd -c "beanstalkd user" -s /bin/false -r -m -d %{beanstalkd_home} %{beanstalkd_user} 2>/dev/null || :
55 %post
56 /sbin/chkconfig --add %{name}
58 %preun
59 if [ $1 = 0 ]; then
60 /sbin/service %{name} stop >/dev/null 2>&1
61 /sbin/chkconfig --del %{name}
64 %postun
65 if [ $1 -ge 1 ]; then
66 /sbin/service %{name} condrestart > /dev/null 2>&1 || :
69 %files
70 %defattr(-,root,root,-)
71 %doc %{_defaultdocdir}/%{name}-%{version}/protocol.txt
72 %doc README COPYING README-DEVELOPERS README-TESTS doc/protocol.txt
73 %{_initrddir}/%{name}
74 %{_bindir}/%{name}
75 %{_mandir}/man1/%{name}.1.gz
76 %config(noreplace) %{_sysconfdir}/sysconfig/%{name}
79 %changelog
80 * Thu Oct 1 2009 Keith Rarick <kr@xph.us> - 1.4-0
81 - Convert this file to an autoconf template
82 - Tweak the summary and description
84 * Sun Jan 4 2009 Ask Bjørn Hansen <ask@develooper.com> - 1.2-0
85 - 1.2-tobe
86 - Use man page and .init/sysconfig scripts from .tar.gz
88 * Sat Nov 22 2008 Jeremy Hinegardner <jeremy at hinegardner dot org> - 1.1-1
89 - initial spec creation