Browse code

Adding redis package

Change-Id: Idf4f7b4982cc33f9ded2aeb6de3cce537dcba3e7
Reviewed-on: http://photon-jenkins.eng.vmware.com:8082/1508
Reviewed-by: Priyesh Padmavilasom <ppadmavilasom@vmware.com>
Tested-by: gerrit-photon <photon-checkins@vmware.com>

DheerajSShetty authored on 2016/10/11 05:50:54
Showing 1 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,48 @@
0
+Summary:	advanced key-value store
1
+Name:		redis
2
+Version:	3.2.4
3
+Release:	1%{?dist}
4
+License:	BSD
5
+URL:		http://redis.io/
6
+Group:		Applications/Databases
7
+Vendor:		VMware, Inc.
8
+Distribution:   Photon
9
+Source0:	http://download.redis.io/releases/%{name}-%{version}.tar.gz
10
+%define sha1 redis=f0fe685cbfdb8c2d8c74613ad8a5a5f33fba40c9
11
+BuildRequires:  gcc
12
+BuildRequires:  make
13
+
14
+%description
15
+Redis is an in-memory data structure store, used as database, cache and message broker.
16
+
17
+%prep
18
+%setup -q
19
+
20
+%build
21
+make %{?_smp_mflags}
22
+
23
+%install
24
+install -vdm 755 %{buildroot}
25
+make PREFIX=%{buildroot}/usr install
26
+install -D -m 0640 %{name}.conf %{buildroot}%{_sysconfdir}/%{name}/%{name}.conf
27
+install -D -m 0755 utils/redis_init_script %{buildroot}%{_sysconfdir}/init.d/%{name}
28
+
29
+%check
30
+#check requires tcl which is not supported in Photon OS right now.
31
+
32
+%preun
33
+%stop_on_removal %{name}
34
+
35
+%postun
36
+%restart_on_update
37
+%insserv_cleanup
38
+
39
+%files
40
+%defattr(-,root,root)
41
+%{_bindir}/*
42
+%config(noreplace) %{_sysconfdir}/init.d/redis
43
+%config(noreplace) %attr(0640, %{name}, %{name}) %{_sysconfdir}/%{name}/redis.conf
44
+
45
+%changelog
46
+*	Mon Oct 3 2016 Dheeraj Shetty <dheerajs@vmware.com> 3.2.4-1
47
+-	initial version