1 # NOTE: obsoleted by -cman subpackages from cluster.spec (3.x)
4 %bcond_with libonly # build package only with lib (needed bootstrap with ccs)
6 Summary: General-purpose symmetric cluster manager
7 Summary(pl.UTF-8): Zarządca symetrycznych klastrów ogólnego przeznaczenia
12 Group: Applications/System
13 Source0: ftp://sources.redhat.com/pub/cluster/releases/cluster-%{version}.tar.gz
14 # Source0-md5: 712b9f583472d1de614641bc0f4a0aaf
16 Source2: %{name}.sysconfig
17 Patch0: cluster-kernel.patch
18 URL: http://sources.redhat.com/cluster/cman/
19 %{!?with_libonly:BuildRequires: ccs-devel >= 2.03.10}
20 BuildRequires: ncurses-devel
21 %{!?with_libonly:BuildRequires: openais-devel < 1.0}
22 BuildRequires: perl-base
23 Requires: %{name}-libs = %{version}-%{release}
24 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
26 %define _sbindir /sbin
28 # aliasing problems in qdisk/disk.c
29 %define specflags -fno-strict-aliasing
32 MAN is a symmetric, general-purpose, kernel-based cluster manager. It
33 has two parts. Connection Manager (cnxman) handles membership,
34 messaging, quorum, event notification and transitions. Service Manager
35 (sm) handles "service groups" which are a general way of representing
36 and managing instances of external systems that require cluster
37 management. The CMAN cluster manager is the foundational system upon
38 which DLM, GFS, CLVM, and Fence all depend. The CMAN API in the kernel
39 and userspace is general and available for other programs to use.
41 %description -l pl.UTF-8
42 MAN to zarządca opartych na jądrze symetrycznych klastrów ogólnego
43 przeznaczenia. Składa się z dwóch części. Zarządca połączeń
44 (Connection Manager, cnxman) obsługuje członkostwo, komunikację,
45 kworum, powiadamianie o zdarzeniach i przejścia. Zarządca usług
46 (Service Manager, sm) obsługuje "grupy usług", które są ogólnym
47 sposobem reprezentacji i zarządzania instancjami zewnętrznych systemów
48 wymagających zarządzania klastrem. Zarządca klastrów CMAN to
49 podstawowy system, na którym polegają DLM, GFS, CLVM i Fence. API
50 CMAN-a w jądrze i przestrzeni użytkownika jest ogólne i w całości
51 dostępne do wykorzystania w innych programach.
55 Summary(pl.UTF-8): Biblioteka CMAN
59 Obsoletes: gulm-static
62 Obsoletes: magma-devel
63 Obsoletes: magma-plugins
64 Obsoletes: magma-static
65 Conflicts: cman < 2.00.00-2
70 %description libs -l pl.UTF-8
74 Summary: CMAN header files
75 Summary(pl.UTF-8): Pliki nagłówkowe CMAN
76 Group: Development/Libraries
77 Requires: %{name}-libs = %{version}-%{release}
82 %description devel -l pl.UTF-8
83 Pliki nagłówkowe CMAN.
86 Summary: CMAN static library
87 Summary(pl.UTF-8): Biblioteka statyczna CMAN
88 Group: Development/Libraries
89 Requires: %{name}-devel = %{version}-%{release}
94 %description static -l pl.UTF-8
95 Biblioteka statyczna CMAN.
98 %setup -q -n cluster-%{version}
101 # there are warnings caused by some unused variables
102 %{__sed} -i -e 's/-Werror //' %{name}/qdisk/Makefile
107 --cflags="%{rpmcflags} -Wall" \
108 --ldflags="%{rpmldflags}" \
109 --incdir=%{_includedir} \
110 --ncursesincdir=%{_includedir}/ncurses \
111 --libdir=%{_libdir} \
112 --libexecdir=%{_libdir} \
113 --mandir=%{_mandir} \
114 --prefix=%{_prefix} \
115 --sbindir=%{_sbindir} \
119 --without_kernel_modules
121 %{__make} -C %{name}%{?with_libonly:/lib}
124 rm -rf $RPM_BUILD_ROOT
125 install -d $RPM_BUILD_ROOT{/etc/sysconfig,/etc/rc.d/init.d}
127 %{__make} -C %{name}%{?with_libonly:/lib} install \
128 DESTDIR=$RPM_BUILD_ROOT
130 %if %{without libonly}
131 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
132 install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/%{name}
136 rm -rf $RPM_BUILD_ROOT
139 /sbin/chkconfig --add %{name}
142 if [ "$1" = "0" ]; then
143 %service -q %{name} stop
144 /sbin/chkconfig --del %{name}
147 %post libs -p /sbin/ldconfig
148 %postun libs -p /sbin/ldconfig
150 %if %{without libonly}
152 %defattr(644,root,root,755)
153 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/%{name}
154 %attr(754,root,root) /etc/rc.d/init.d/%{name}
156 #%attr(754,root,root) /etc/rc.d/init.d/qdiskd
157 %attr(755,root,root) %{_sbindir}/cman_tool
158 %attr(755,root,root) %{_sbindir}/mkqdisk
159 %attr(755,root,root) %{_sbindir}/qdiskd
160 %attr(755,root,root) %{_libdir}/lcrso/service_cman.lcrso
161 %{_mandir}/man5/cman.5*
162 %{_mandir}/man5/qdisk.5*
163 %{_mandir}/man8/cman_tool.8*
164 %{_mandir}/man8/mkqdisk.8*
165 %{_mandir}/man8/qdiskd.8*
169 %defattr(644,root,root,755)
170 %attr(755,root,root) %{_libdir}/libcman.so.*.*
171 %attr(755,root,root) %ghost %{_libdir}/libcman.so.2
174 %defattr(644,root,root,755)
175 %attr(755,root,root) %{_libdir}/libcman.so
176 %{_includedir}/libcman.h
179 %defattr(644,root,root,755)