]> git.pld-linux.org Git - packages/heartbeat.git/blob - heartbeat.spec
- 0.4.9.1 - updated patches, few new, some cleanups
[packages/heartbeat.git] / heartbeat.spec
1 Summary:        Heartbeat - subsystem for High-Availability Linux
2 Summary(es):    Subsistema heartbeat para Linux "High-Availability"
3 Summary(pl):    Podsystem heartbeat dla systemów o podwy¿szonej niezawodno¶ci
4 Summary(pt_BR): Implementa sistema de monitoração (heartbeats) visando Alta Disponibilidade
5 Name:           heartbeat
6 Version:        0.4.9.1
7 Release:        0.9
8 License:        GPL v2+
9 Group:          Applications/System
10 Source0:        http://linux-ha.org/download/%{name}-%{version}.tar.gz
11 Patch0:         %{name}.dirty.time.h.patch
12 Patch1:         %{name}-remove_groupadd_and_chgrp.patch
13 Patch2:         %{name}-manpath.patch
14 Patch3:         %{name}-doc_fix.patch
15 Patch4:         %{name}-install_stupidity.patch
16 # SuSE-specific; transformation unfinished
17 Patch5:         %{name}-init.patch
18 URL:            http://linux-ha.org/
19 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
20 BuildRequires:  links
21 Requires(pre):  /sbin/chkconfig
22 Requires(pre):  /usr/bin/getgid
23 Requires(pre):  /usr/sbin/groupadd
24 Requires(post): /usr/sbin/groupdel
25 Requires:       syslogdaemon
26
27 %description
28 heartbeat is a basic heartbeat subsystem for Linux-HA. It will run
29 scripts at initialization, and when machines go up or down. This
30 version will also perform IP address takeover using gratuitous ARPs.
31 It works correctly for a 2-node configuration, and is extensible to
32 larger configurations.
33
34 It implements the following kinds of heartbeats:
35  - Bidirectional Serial Rings ("raw" serial ports)
36
37 %description -l es
38 heartbeat es un sistema básico para Linux-HA. La función de este
39 software es ejecutar scripts en la inicialización y al apagar las
40 máquinas que lo utilizan.
41
42 %description -l pl
43 heartbeat jest podstawowym podsystemem dla systemów o podwy¿szonej
44 dostêpno¶ci budowanych w oparciu o Linuksa. Zajmuje siê uruchamianiem
45 skryptów podczas startu i zamykania systemu. Ta wersja pakietu pozwala
46 na przejmowanie adresów IP. Oprogramowanie dzia³a poprawnie dla
47 konfiguracji sk³adaj±cej siê z 2 hostów, mo¿na je równie¿ stosowaæ do
48 bardziej skomplikowanych konfiguracji.
49
50 #%package stonith
51 #Summary: Provides an interface to Shoot The Other Node In The Head
52 #Group: Utilities
53
54 %prep
55 %setup -q
56 %patch0 -p0
57 %patch1 -p0
58 %patch2 -p0
59 %patch3 -p1
60 %patch4 -p1
61 %patch5 -p0
62
63 %build
64 #zmienic to:
65 sed -e 's/MAKE=gmake/MAKE=make/g' < Makefile > aqq
66 mv -f aqq Makefile
67 cd doc
68 sed -e 's/lynx/links/' > aqq < Makefile
69 mv -f aqq Makefile
70 cd ..
71 %{__make}
72
73 %install
74 rm -rf $RPM_BUILD_ROOT
75 RPM_BUILD=yes BUILD_ROOT=$RPM_BUILD_ROOT %{__make} install
76
77 rm -f $RPM_BUILD_ROOT%{_sysconfdir}/ha.d/resource.d/ldirectord
78 ln -sf %{_sbindir}/ldirectord $RPM_BUILD_ROOT%{_sysconfdir}/ha.d/resource.d/ldirectord
79
80 TEMPL=$RPM_BUILD_ROOT/var/adm/fillup-templates
81 if [ ! -d $TEMPL ]; then
82         install -d $TEMPL
83 fi
84 install rc.config.heartbeat $TEMPL
85
86 rm -f doc/{*.html,*.8,COPYING,Makefile*}
87
88
89 %clean
90 rm -rf $RPM_BUILD_ROOT
91
92 %pre
93 if [ -n "`/usr/bin/getgid haclient`" ]; then
94         if [ "`/usr/bin/getgid haclient`" != "60" ]; then
95                 echo "Error: group haclient doesn't have gid=60. Correct this before installing heartbeat." 1>&2
96                 exit 1
97         fi
98 else
99         /usr/sbin/groupadd -g 60 -r haclient
100 fi
101
102 %post
103 /sbin/chkconfig --add heartbeat
104
105 %preun
106 Uninstall_PPP_hack() {
107   file2hack=etc/ppp/ip-up.local
108   echo "NOTE: Restoring /$file2hack"
109   MARKER="Heartbeat"
110   ed -s $file2hack <<-!EOF  2>/dev/null
111 H
112 g/ $MARKER\$/d
113 w
114 !EOF
115 }
116
117 if [ "$1" = "0" ]; then
118         /sbin/chkconfig --del heartbeat
119         if [ ! -x etc/ppp/ip-up.heart ]; then
120                 Uninstall_PPP_hack
121         fi
122 fi
123
124 %postun
125 if [ "$1" = "0" ]; then
126         /usr/sbin/groupdel haclient 2>/dev/null
127 fi
128
129 %files
130 %defattr(644,root,root,755)
131 %doc doc/*
132 %attr (755,root,root) %{_sysconfdir}/ha.d/harc
133 %attr (755,root,root) %{_sbindir}/*
134 %{_sysconfdir}/ha.d/shellfuncs
135 %{_sysconfdir}/ha.d/rc.d
136 %{_sysconfdir}/ha.d/README.config
137 %{_sysconfdir}/ha.d/conf
138 %{_sysconfdir}/ha.d/resource.d/
139 %dir %{_sysconfdir}/ha.d
140 %{_sysconfdir}/rc.d/init.d/*
141 %{_sysconfdir}/logrotate.d/*
142
143 # this is probably not the best location for binaries...
144 %{_libdir}/heartbeat
145 #%{_libdir}/libhbclient.so
146 #%{_libdir}/libhbclient.a
147 %{_libdir}/*.so
148 %{_libdir}/*.a
149 %dir %{_libdir}/stonith
150 %{_libdir}/stonith/*.so
151 /var/adm/fillup-templates/rc.config.heartbeat
152 %dir /var/lib/heartbeat
153 %attr (600,root,root) /var/lib/heartbeat/fifo
154 %attr (750,root,haclient) /var/lib/heartbeat/api
155 %attr (620,root,haclient) /var/lib/heartbeat/register
156 %attr (1770,root,haclient) /var/lib/heartbeat/casual
157 %{_mandir}/man8/*.8*
This page took 0.045832 seconds and 4 git commands to generate.