]> git.pld-linux.org Git - packages/heartbeat.git/blob - heartbeat.spec
- fixed build, requirements, some file location & attributes, gzipped 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 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 Patch1:         %{name}-remove_groupadd_and_chgrp.patch
12 Patch2:         %{name}-manpath.patch
13 # SuSE-specific; transformation unfinished
14 Patch3:         %{name}-init.patch
15 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
16 BuildRequires:  links
17 Requires:       syslogdaemon
18 Requires(pre):  /sbin/chkconfig
19 Requires(pre):  /usr/bin/getgid
20 Requires(pre):  /usr/sbin/groupadd
21 Requires(post): /usr/sbin/groupdel
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 Linuxa. 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
73   [ ! -d $TEMPL ]
74 then
75   install -d $TEMPL
76 fi
77 install rc.config.heartbeat $TEMPL
78
79 rm -f doc/{*.html,*.8,COPYING,Makefile*}
80 gzip -9nf doc/*[^f]
81
82 %files
83 %defattr(644,root,root,755)
84 %defattr(-,root,root)
85 %dir %{_sysconfdir}/ha.d
86 %attr (755,root,root) %{_sysconfdir}/ha.d/harc
87 %{_sysconfdir}/ha.d/shellfuncs
88 %{_sysconfdir}/ha.d/rc.d
89 %{_sysconfdir}/ha.d/README.config
90 %{_sysconfdir}/ha.d/conf
91
92 # this is probably not the best location for binaries...
93 %{_libdir}/heartbeat
94 %{_libdir}/libhbclient.so
95 %{_libdir}/libhbclient.a
96 %{_sysconfdir}/ha.d/resource.d/
97 %{_sysconfdir}/rc.d/init.d/heartbeat
98 %{_sysconfdir}/logrotate.d/heartbeat
99 /var/adm/fillup-templates/rc.config.heartbeat
100 %dir /var/lib/heartbeat
101 %attr (600, root, root)     /var/lib/heartbeat/fifo
102 %attr (750, root, haclient) /var/lib/heartbeat/api
103 %attr (620, root, haclient) /var/lib/heartbeat/register
104 %attr (1770, root, haclient) /var/lib/heartbeat/casual
105 %{_mandir}/man8/heartbeat.8*
106 %doc doc/*
107
108 %clean
109 rm -rf $RPM_BUILD_ROOT
110
111 %pre
112 if [ -n "`/usr/bin/getgid haclient`" ]; then
113         if [ "`/usr/bin/getgid haclient`" != "60" ]; then
114                 echo "Warning: group haclient haven't gid=60. Correct this before installing heartbeat" 1>&2
115                 exit 1
116         fi
117 else
118         /usr/sbin/groupadd -g 60 -r haclient
119 fi
120
121 %post
122 /sbin/chkconfig --add heartbeat
123
124 %preun
125 Uninstall_PPP_hack() {
126   file2hack=etc/ppp/ip-up.local
127   echo "NOTE: Restoring /$file2hack"
128   MARKER="Heartbeat"
129   ed -s $file2hack <<-!EOF  2>/dev/null
130 H
131 g/ $MARKER\$/d
132 w
133 !EOF
134 }
135
136 if [ "$1" = "0" ]; then
137         /sbin/chkconfig --del heartbeat
138         if [ ! -x etc/ppp/ip-up.heart ]; then
139                 Uninstall_PPP_hack
140         fi
141 fi
142
143 %postun
144 if [ "$1" = "0" ]; then
145         /usr/sbin/groupdel haclient 2>/dev/null
146 fi
This page took 0.076969 seconds and 4 git commands to generate.