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