3 %bcond_with libonly # build package only with lib (needed bootstrap with ccs)
5 Summary: General-purpose symmetric cluster manager
6 Summary(pl.UTF-8): Zarządca symetrycznych klastrów ogólnego przeznaczenia
11 Group: Applications/System
12 Source0: ftp://sources.redhat.com/pub/cluster/releases/cluster-%{version}.tar.gz
13 # Source0-md5: 2ef3f4ba9d3c87b50adfc9b406171085
15 Source2: %{name}.sysconfig
16 URL: http://sources.redhat.com/cluster/cman/
17 %{!?with_libonly:BuildRequires: ccs-devel}
18 BuildRequires: openais-devel
19 BuildRequires: perl-base
20 Requires: %{name}-libs = %{version}-%{release}
21 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
23 %define _sbindir /sbin
25 # aliasing problems in qdisk/disk.c
26 %define specflags -fno-strict-aliasing
29 MAN is a symmetric, general-purpose, kernel-based cluster manager. It
30 has two parts. Connection Manager (cnxman) handles membership,
31 messaging, quorum, event notification and transitions. Service Manager
32 (sm) handles "service groups" which are a general way of representing
33 and managing instances of external systems that require cluster
34 management. The CMAN cluster manager is the foundational system upon
35 which DLM, GFS, CLVM, and Fence all depend. The CMAN API in the kernel
36 and userspace is general and available for other programs to use.
38 %description -l pl.UTF-8
39 MAN to zarządca opartych na jądrze symetrycznych klastrów ogólnego
40 przeznaczenia. Składa się z dwóch części. Zarządca połączeń
41 (Connection Manager, cnxman) obsługuje członkostwo, komunikację,
42 kworum, powiadamianie o zdarzeniach i przejścia. Zarządca usług
43 (Service Manager, sm) obsługuje "grupy usług", które są ogólnym
44 sposobem reprezentacji i zarządzania instancjami zewnętrznych systemów
45 wymagających zarządzania klastrem. Zarządca klastrów CMAN to
46 podstawowy system, na którym polegają DLM, GFS, CLVM i Fence. API
47 CMAN-a w jądrze i przestrzeni użytkownika jest ogólne i w całości
48 dostępne do wykorzystania w innych programach.
52 Summary(pl.UTF-8): Biblioteka CMAN
56 Obsoletes: gulm-static
58 Obsoletes: magma-devel
59 Obsoletes: magma-plugins
60 Obsoletes: magma-static
65 %description libs -l pl.UTF-8
69 Summary: CMAN header files
70 Summary(pl.UTF-8): Pliki nagłówkowe CMAN
71 Group: Development/Libraries
72 Requires: %{name}-libs = %{version}-%{release}
77 %description devel -l pl.UTF-8
78 Pliki nagłówkowe CMAN.
81 Summary: CMAN static library
82 Summary(pl.UTF-8): Biblioteka statyczna CMAN
83 Group: Development/Libraries
84 Requires: %{name}-devel = %{version}-%{release}
89 %description devel -l pl.UTF-8
90 Biblioteka statyczna CMAN.
93 %setup -q -n cluster-%{version}
96 %{__perl} -pi -e 's/ -g/ %{rpmcflags}/' {lib,qdisk,tests}/Makefile
97 %{__perl} -pi -e 's/ -O2 /%{rpmcflags}/' {cman_tool,daemon}/Makefile
102 --ccsincdir="$PWD/../ccs/lib" \
103 --incdir=%{_includedir} \
104 --libdir=%{_libdir} \
105 --libexecdir=%{_libdir} \
106 --mandir=%{_mandir} \
107 --prefix=%{_prefix} \
108 --sbindir=%{_sbindir}
109 %{__make} %{?with_libonly:-C lib} \
114 rm -rf $RPM_BUILD_ROOT
115 install -d $RPM_BUILD_ROOT{/etc/sysconfig,/etc/rc.d/init.d}
117 %{__make} -C %{name}%{?with_libonly:/lib} install \
118 DESTDIR=$RPM_BUILD_ROOT
120 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
121 install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/%{name}
124 rm -rf $RPM_BUILD_ROOT
127 /sbin/chkconfig --add %{name}
130 if [ "$1" = "0" ]; then
131 %service -q %{name} stop
132 /sbin/chkconfig --del %{name}
135 %post libs -p /sbin/ldconfig
136 %postun libs -p /sbin/ldconfig
138 %if %{without libobly}
140 %defattr(644,root,root,755)
141 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/%{name}
142 %attr(754,root,root) /etc/rc.d/init.d/%{name}
143 #%attr(754,root,root) /etc/rc.d/init.d/qdiskd
144 %attr(755,root,root) %{_sbindir}/*
145 %attr(755,root,root) %{_libdir}/lcrso/service_cman.lcrso
146 %{_mandir}/man5/cman.5*
147 %{_mandir}/man5/qdisk.5*
148 %{_mandir}/man8/cman_tool.8*
149 %{_mandir}/man8/mkqdisk.8*
150 %{_mandir}/man8/qdiskd.8*
154 %defattr(644,root,root,755)
155 %attr(755,root,root) %{_libdir}/libcman.so.*.*
158 %defattr(644,root,root,755)
159 %attr(755,root,root) %{_libdir}/libcman.so
163 %defattr(644,root,root,755)