Check for stdint.h.
[beanstalkd.git] / beanstalkd.spec
blobfeb2cbd58443e951673c6f633e9b4a1e96c2360f
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: 1.2
8 Release: 0%{?dist}
9 Summary: A fast, distributed, in-memory workqueue service
11 Group: System Environment/Daemons
12 License: GPLv3+
13 URL: http://xph.us/software/%{name}/
14 Source0: http://xph.us/software/%{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 beanstalkd is a fast, distributed, in-memory workqueue service. Its
27 interface is generic, but was originally designed for reducing the
28 latency of page views in high-volume web applications by running most
29 time-consuming tasks asynchronously.
32 %prep
33 %setup -q
34 if [ ! -e configure ]; then
35 sh buildconf.sh
38 %build
39 %configure --disable-rpath --docdir=%{_defaultdocdir}/%{name}-%{version}
40 make %{?_smp_mflags}
42 %install
43 rm -rf $RPM_BUILD_ROOT
44 make install DESTDIR=$RPM_BUILD_ROOT
45 %{__install} -p -D -m 0644 doc/%{name}.1 %{buildroot}%{_mandir}/man1/%{name}.1
46 %{__install} -p -D -m 0755 scripts/%{name}.init %{buildroot}%{_initrddir}/%{name}
47 %{__install} -p -D -m 0644 scripts/%{name}.sysconfig %{buildroot}%{_sysconfdir}/sysconfig/%{name}
50 %clean
51 rm -rf $RPM_BUILD_ROOT
53 %pre
54 %{_sbindir}/useradd -c "beanstalkd user" -s /bin/false -r -d %{beanstalkd_home} %{beanstalkd_user} 2>/dev/null || :
56 %post
57 /sbin/chkconfig --add %{name}
59 %preun
60 if [ $1 = 0 ]; then
61 /sbin/service %{name} stop >/dev/null 2>&1
62 /sbin/chkconfig --del %{name}
65 %postun
66 if [ $1 -ge 1 ]; then
67 /sbin/service %{name} condrestart > /dev/null 2>&1 || :
70 %files
71 %defattr(-,root,root,-)
72 %doc %{_defaultdocdir}/%{name}-%{version}/protocol.txt
73 %doc README COPYING README-DEVELOPERS README-TESTS doc/protocol.txt
74 %{_initrddir}/%{name}
75 %{_bindir}/%{name}
76 %{_mandir}/man1/%{name}.1.gz
77 %config(noreplace) %{_sysconfdir}/sysconfig/%{name}
80 %changelog
81 * Sun Jan 4 2009 Ask Bjørn Hansen <ask@develooper.com> - 1.2-0
82 - 1.2-tobe
83 - Use man page and .init/sysconfig scripts from .tar.gz
85 * Sat Nov 22 2008 Jeremy Hinegardner <jeremy at hinegardner dot org> - 1.1-1
86 - initial spec creation