]> git.pld-linux.org Git - packages/heartbeat.git/blob - heartbeat.spec
- use macros in %{pre,post}{,un}
[packages/heartbeat.git] / heartbeat.spec
1 Summary: heartbeat - heartbeat subsystem for High-Availability Linux
2 Summary(pl):  podsystem heartbeat dla systemów o podwy¿szonej niezawodno¶ci
3 Name:   heartbeat
4 Version:        0.4.9
5 Release:        3
6 Copyright: GPL
7 URL: http://linux-ha.org/
8 Group: Utilities
9 Group(pl): Narzêdzia
10 Source: http://linux-ha.org/download/heartbeat-0.4.9.tar.gz
11 Patch0: heartbeat.dirty.time.h.patch
12 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
13 BuildPreReq: links
14 Requires: sysklogd
15
16 #%package stonith
17 #Summary: Provides an interface to Shoot The Other Node In The Head 
18 #Group: Utilities
19
20 %description
21 heartbeat is a basic heartbeat subsystem for Linux-HA.
22 It will run scripts at initialization, and when machines go up or down.
23 This version will also perform IP address takeover using gratuitous ARPs.
24 It works correctly for a 2-node configuration, and is extensible to larger
25 configurations.
26
27
28 It implements the following kinds of heartbeats:
29         - Bidirectional Serial Rings ("raw" serial ports)
30         - UDP/IP broadcast (ethernet, etc)
31         - Bidirectional Serial PPP/UDP Rings (using PPP)
32         - "ping" heartbeats (for routers, switches, etc.)
33            (to be used for breaking ties in 2-node systems)
34 %description(pl)
35 heartbeat jest podstawowym podsystemem dla systemów o podwy¿szonej dostêpno¶ci budowanych w oparciu o Linuxa. Zajmuje siê uruchamianiem skryptów podczas startu i zamykania systemu. Ta wersja pakietu pozwala na przejmowanie adresów IP. Oprogramowanie dzia³a poprawnie dla konfiguracji sk³adaj±cej siê z 2 hostów, mo¿na je równie¿ stosowaæ do bardziej skomplikowanych konfiguracji.
36
37 %changelog
38 #
39 %prep
40 %setup -q
41 %patch0 -p0
42 %build
43
44 #zmienic to:
45 sed -e 's/MAKE=gmake/MAKE=make/g' < Makefile > aqq
46 mv aqq Makefile
47 cd doc
48 sed -e 's/lynx/links/' > aqq < Makefile
49 mv aqq Makefile
50 cd ..
51 make
52 ###########################################################
53 %install
54 ###########################################################
55 if
56   [ -z "${RPM_BUILD_ROOT}"  -a "${RPM_BUILD_ROOT}" != "/" ]
57 then
58   rm -rf $RPM_BUILD_ROOT
59 fi
60 RPM_BUILD=yes BUILD_ROOT=$RPM_BUILD_ROOT make install
61 (
62   cd $RPM_BUILD_ROOT/etc/ha.d/resource.d
63   rm -f ldirectord
64   ln -s /usr/sbin/ldirectord ldirectord
65 )
66
67 TEMPL=$RPM_BUILD_ROOT/var/adm/fillup-templates
68 if
69   [ ! -d $TEMPL ]
70 then
71   mkdir -p $TEMPL
72 fi
73 install -m 644 rc.config.heartbeat $TEMPL
74
75 ###########################################################
76 %files
77 ###########################################################
78 %defattr(-,root,root)
79 %dir /etc/ha.d
80 /etc/ha.d/harc
81 /etc/ha.d/shellfuncs
82 /etc/ha.d/rc.d
83 /etc/ha.d/README.config
84 /etc/ha.d/conf
85 /usr/lib/heartbeat
86 /usr/lib/libhbclient.so
87 /usr/lib/libhbclient.a
88 /etc/ha.d/resource.d/
89 /etc/init.d/heartbeat
90 /etc/logrotate.d/heartbeat
91 /var/adm/fillup-templates/rc.config.heartbeat
92 %dir /var/lib/heartbeat
93 %attr (600, root, root)       /var/lib/heartbeat/fifo
94 %attr (750, root, haclient) /var/lib/heartbeat/api
95 %attr (620, root, haclient) /var/lib/heartbeat/register
96 %attr (1770, root, haclient) /var/lib/heartbeat/casual
97 /usr/man/man8/heartbeat.8*
98 %doc doc/*
99
100
101 ###########################################################
102 %clean
103 ###########################################################
104 rm -rf $RPM_BUILD_ROOT
105 rm -rf $RPM_BUILD_DIR/heartbeat-0.4.9
106
107 ###########################################################
108 %pre
109 GROUP=haclient; GID=60; %groupadd
110 #
111 #  Multi-distribution kludge for init scripts...
112 #
113 if
114   [ ! -d etc/init.d ]
115 then
116   if
117     [ -d sbin/init.d  -a ! -L sbin/init.d ]
118   then
119     ln -s ../sbin/init.d etc/init.d
120   elif
121     [ -d etc/rc.d/init.d ]
122   then
123     ln -s rc.d/init.d etc/init.d
124   else
125     # I give up!
126     echo "Warning: making directory /etc/init.d"
127     mkdir -p etc/init.d
128   fi
129 fi
130 ###########################################################
131 #
132 #  Multi-distribution kludge for init scripts...
133 #
134 if
135   [ ! -d etc/init.d ]
136 then
137   if
138     [ -d sbin/init.d  -a ! -L sbin/init.d ]
139   then
140     ln -s ../sbin/init.d etc/init.d
141   elif
142     [ -d etc/rc.d/init.d ]
143   then
144     ln -s rc.d/init.d etc/init.d
145   else
146     # I give up!
147     echo "Warning: making directory /etc/init.d"
148     mkdir -p etc/init.d
149   fi
150 fi
151 ###########################################################
152 %post
153 ###########################################################
154
155 # Run heartbeat on startup
156 %chkconfig_add
157
158 ###########################################################
159 %preun
160 ###########################################################
161
162 Uninstall_PPP_hack() {
163   file2hack=etc/ppp/ip-up.local
164   echo "NOTE: Restoring /$file2hack"
165   MARKER="Heartbeat"
166   ed -s $file2hack <<-!EOF  2>/dev/null
167 H
168 g/ $MARKER\$/d
169 w
170 !EOF
171 }
172
173 %chkconfig_del
174 if
175   [ $1 = 0 ]
176 then
177   if
178     [ ! -x etc/ppp/ip-up.heart ]
179   then
180     Uninstall_PPP_hack
181   fi
182 fi
183 true
This page took 0.192761 seconds and 4 git commands to generate.