-
Notifications
You must be signed in to change notification settings - Fork 19
/
redis-keepalived.spec
82 lines (63 loc) · 2.18 KB
/
redis-keepalived.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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
%define RedisKeepalived redis-keepalived
%define RedisKeepalivedMaster redis-keepalived-master
%define RedisKeepalivedSlave redis-keepalived-slave
%define RKVersion 1.0.0
Name: %{RedisKeepalived}
Version: %{RKVersion}
Release: 1%{?dist}
Summary: The Redis Keepalived
License: GPL
Group: Development/System
URL: https://github.com/straw618/RedisKeepalived
Source: %{name}-%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Requires: %__cp %__mv %__chmod %__grep %__mkdir %__install %__id
%description
This package provides Redis Keepalived
%package -n %{RedisKeepalivedMaster}
Requires: redis
Requires: keepalived
Summary: This package provides Redis Keepalived Master
%package -n %{RedisKeepalivedSlave}
Requires: redis
Requires: keepalived
Summary: This package provides Redis Keepalived Slave
%description -n %{RedisKeepalivedMaster}
This package is config of Redis Keepalived Master
%description -n %{RedisKeepalivedSlave}
This package is config of Redis Keepalived Slave
%prep
%setup -q
%build
# FIXME: I need to fix the upstream Makefile to use LIBDIR et al. properly and
# send the upstream maintainer a patch.
# add DOCDIR to the configure part
%install
rm -rf %{buildroot}
mkdir -p %{buildroot}/etc/keepalived
cp -rf config %{buildroot}/etc/redis-keepalived
cp -rf scripts %{buildroot}/etc/keepalived/
%post -n %{RedisKeepalivedMaster}
sudo mv -f /etc/redis-keepalived/redis.conf /etc/
sudo mv -f /etc/redis-keepalived/keepalived.master /etc/keepalived/keepalived.conf
sudo rm -rf /etc/redis-keepalived
%post -n %{RedisKeepalivedSlave}
sudo mv -f /etc/redis-keepalived/redis.conf /etc/
sudo mv -f /etc/redis-keepalived/keepalived.slave /etc/keepalived/keepalived.conf
sudo rm -rf /etc/redis-keepalived
%postun
%clean
#rm -rf %{buildroot}
%files -n %{RedisKeepalivedMaster}
%defattr(-,root,root,-)
/etc/redis-keepalived/redis.conf
/etc/redis-keepalived/keepalived.master
/etc/keepalived/scripts/*
%files -n %{RedisKeepalivedSlave}
%defattr(-,root,root,-)
/etc/redis-keepalived/redis.conf
/etc/redis-keepalived/keepalived.slave
/etc/keepalived/scripts/*
%changelog
* Mon Jun 23 2014 Fuqiang Chen<[email protected]>
- first RPM release (1.0)