-
Notifications
You must be signed in to change notification settings - Fork 2
/
webdis.spec
67 lines (53 loc) · 1.52 KB
/
webdis.spec
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
# The following software is released as specified below.
# This spec file is released to the public domain.
Name: webdis
Version: 0.1
Release: 3
Summary: A fast HTTP interface for Redis
Group: Web
License: GPL
URL: http://webd.is
BuildRoot: %{_tmppath}/%{name}-%{version}
# Source is on github git://github.com/nicolasff/webdis.git
Source0: webdis-a26a868.git.20120212.tar.gz
Source1: webdis.initd
BuildRequires: binutils libevent-devel
Requires: libevent chkconfig initscripts
%description
A fast HTTP interface for Redis, based on Libevent. Can return Redis objects in arrays, TXT, JSON and HTML.
%prep
%setup -q
%build
make
%install
rm -rf %{buildroot}
make install DESTDIR=%{buildroot} PREFIX=%{_usr}
%{__install} -Dp -m 0755 %{SOURCE1} %{buildroot}%{_initrddir}/%{name}
%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
%postun
if [ "$1" -ge 1 ]; then
/sbin/service %{name} condrestart >/dev/null 2>&1 || :
fi
%files
%defattr(-,root,root,-)
%{_sysconfdir}/webdis.prod.json
%{_bindir}/webdis
%{_initrddir}/webdis
%changelog
* Sun Feb 12 2012 Jeff Sheltren <[email protected]>
- Update to latest HEAD from git
* Thu Dec 13 2011 Jeff Sheltren <[email protected]>
- Spec cleanup per Fedora guidelines
- Add chkconfig calls to post scripts
* Thu Dec 13 2011 Narayan Newton <[email protected]>
- Initial Webdis Spec
* Sat Aug 29 2009 Robert Xu <[email protected]>
- Initial Spec File