]> git.pld-linux.org Git - packages/heartbeat.git/blob - heartbeat.spec
- adapterized.
[packages/heartbeat.git] / heartbeat.spec
1 Summary:        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 License:        GPL
7 URL:            http://linux-ha.org/
8 Group:          Applications/System
9 Source0:        http://linux-ha.org/download/%{name}-%{version}.tar.gz
10 Patch0:         %{name}.dirty.time.h.patch
11 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
12 BuildRequires:  links
13 Requires:       sysklogd
14 Prereq:         /sbin/chkconfig
15 Prereq:         /usr/bin/getgid
16 Prereq:         /usr/sbin/groupadd
17 Prereq:         /usr/sbin/groupdel
18
19 %description
20 heartbeat is a basic heartbeat subsystem for Linux-HA. It will run
21 scripts at initialization, and when machines go up or down. This
22 version will also perform IP address takeover using gratuitous ARPs.
23 It works correctly for a 2-node configuration, and is extensible to
24 larger configurations.
25
26 It implements the following kinds of heartbeats:
27  - Bidirectional Serial Rings ("raw" serial ports)
28
29 %description -l pl
30 heartbeat jest podstawowym podsystemem dla systemów o podwy¿szonej
31 dostêpno¶ci budowanych w oparciu o Linuxa. Zajmuje siê uruchamianiem
32 skryptów podczas startu i zamykania systemu. Ta wersja pakietu pozwala
33 na przejmowanie adresów IP. Oprogramowanie dzia³a poprawnie dla
34 konfiguracji sk³adaj±cej siê z 2 hostów, mo¿na je równie¿ stosowaæ do
35 bardziej skomplikowanych konfiguracji.
36
37 #%package stonith
38 #Summary: Provides an interface to Shoot The Other Node In The Head
39 #Group: Utilities
40
41 %prep
42 %setup -q
43 %patch0 -p0
44
45 %build
46 #zmienic to:
47 sed -e 's/MAKE=gmake/MAKE=make/g' < Makefile > aqq
48 mv -f aqq Makefile
49 cd doc
50 sed -e 's/lynx/links/' > aqq < Makefile
51 mv -f aqq Makefile
52 cd ..
53 %{__make}
54
55 %install
56 rm -rf $RPM_BUILD_ROOT
57 RPM_BUILD=yes BUILD_ROOT=$RPM_BUILD_ROOT %{__make} install
58 (
59 cd $RPM_BUILD_ROOT%{_sysconfdir}/ha.d/resource.d
60   rm -f ldirectord
61 ln -sf %{_sbindir}/ldirectord ldirectord
62 )
63
64 TEMPL=$RPM_BUILD_ROOT/var/adm/fillup-templates
65 if
66   [ ! -d $TEMPL ]
67 then
68   install -d $TEMPL
69 fi
70 install rc.config.heartbeat $TEMPL
71
72 %files
73 %defattr(644,root,root,755)
74 %defattr(-,root,root)
75 %dir %{_sysconfdir}/ha.d
76 %{_sysconfdir}/ha.d/harc
77 %{_sysconfdir}/ha.d/shellfuncs
78 %{_sysconfdir}/ha.d/rc.d
79 %{_sysconfdir}/ha.d/README.config
80 %{_sysconfdir}/ha.d/conf
81 %{_libdir}/heartbeat
82 %{_libdir}/libhbclient.so
83 %{_libdir}/libhbclient.a
84 %{_sysconfdir}/ha.d/resource.d/
85 %{_sysconfdir}/init.d/heartbeat
86 /etc/logrotate.d/heartbeat
87 /var/adm/fillup-templates/rc.config.heartbeat
88 %dir /var/lib/heartbeat
89 %attr (600, root, root)       /var/lib/heartbeat/fifo
90 %attr (750, root, haclient) /var/lib/heartbeat/api
91 %attr (620, root, haclient) /var/lib/heartbeat/register
92 %attr (1770, root, haclient) /var/lib/heartbeat/casual
93 %{_mandir}/man8/heartbeat.8*
94 %doc doc/*
95
96 %clean
97 rm -rf $RPM_BUILD_ROOT
98
99 %pre
100 if [ -n "`/usr/bin/getgid haclient`" ]; then
101         if [ "`/usr/bin/getgid haclient`" != "60" ]; then
102                 echo "Warning: group haclient haven't gid=60. Correct this before installing heartbeat" 1>&2
103                 exit 1
104         fi
105 else
106         /usr/sbin/groupadd -g 60 -r
107 fi
108
109 %post
110 /sbin/chkconfig --add heartbeat
111
112 %preun
113 Uninstall_PPP_hack() {
114   file2hack=etc/ppp/ip-up.local
115   echo "NOTE: Restoring /$file2hack"
116   MARKER="Heartbeat"
117   ed -s $file2hack <<-!EOF  2>/dev/null
118 H
119 g/ $MARKER\$/d
120 w
121 !EOF
122 }
123
124 if [ "$1" = "0" ]; then
125         /sbin/chkconfig --del heartbeat
126         if [ ! -x etc/ppp/ip-up.heart ]; then
127                 Uninstall_PPP_hack
128         fi
129 fi
130
131 %postun
132 if [ "$1" = "0" ]; then
133         /usr/sbin/groupdel haclient 2>/dev/null
134 fi
This page took 0.03919 seconds and 3 git commands to generate.