]>
Commit | Line | Data |
---|---|---|
ed6d5f29 | 1 | # |
2 | # Conditional build: | |
e8fc3769 | 3 | %bcond_with libonly # build package only with lib (needed bootstrap with ccs) |
ed6d5f29 | 4 | # |
762dc73d | 5 | Summary: General-purpose symmetric cluster manager |
8f0dac7b | 6 | Summary(pl.UTF-8): Zarządca symetrycznych klastrów ogólnego przeznaczenia |
cb602c2e | 7 | Name: cman |
e6276ceb PS |
8 | Version: 2.03.10 |
9 | Release: 1 | |
c66b6748 | 10 | License: GPL v2 |
cb602c2e | 11 | Group: Applications/System |
a6bd5743 | 12 | Source0: ftp://sources.redhat.com/pub/cluster/releases/cluster-%{version}.tar.gz |
e6276ceb | 13 | # Source0-md5: 379b560096e315d4b52e238a5c72ba4a |
c1252bfc | 14 | Source1: %{name}.init |
15 | Source2: %{name}.sysconfig | |
c31c0e69 | 16 | URL: http://sources.redhat.com/cluster/cman/ |
ed6d5f29 | 17 | %{!?with_libonly:BuildRequires: ccs-devel} |
e6276ceb | 18 | BuildRequires: ncurses-devel |
ed6d5f29 | 19 | BuildRequires: openais-devel |
c66b6748 | 20 | BuildRequires: perl-base |
e8fc3769 | 21 | Requires: %{name}-libs = %{version}-%{release} |
cb602c2e AM |
22 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
23 | ||
24 | %define _sbindir /sbin | |
25 | ||
e8fc3769 JB |
26 | # aliasing problems in qdisk/disk.c |
27 | %define specflags -fno-strict-aliasing | |
28 | ||
cb602c2e AM |
29 | %description |
30 | MAN is a symmetric, general-purpose, kernel-based cluster manager. It | |
31 | has two parts. Connection Manager (cnxman) handles membership, | |
32 | messaging, quorum, event notification and transitions. Service Manager | |
33 | (sm) handles "service groups" which are a general way of representing | |
34 | and managing instances of external systems that require cluster | |
35 | management. The CMAN cluster manager is the foundational system upon | |
36 | which DLM, GFS, CLVM, and Fence all depend. The CMAN API in the kernel | |
37 | and userspace is general and available for other programs to use. | |
38 | ||
6153d48e JR |
39 | %description -l pl.UTF-8 |
40 | MAN to zarządca opartych na jądrze symetrycznych klastrów ogólnego | |
41 | przeznaczenia. Składa się z dwóch części. Zarządca połączeń | |
42 | (Connection Manager, cnxman) obsługuje członkostwo, komunikację, | |
43 | kworum, powiadamianie o zdarzeniach i przejścia. Zarządca usług | |
44 | (Service Manager, sm) obsługuje "grupy usług", które są ogólnym | |
45 | sposobem reprezentacji i zarządzania instancjami zewnętrznych systemów | |
46 | wymagających zarządzania klastrem. Zarządca klastrów CMAN to | |
47 | podstawowy system, na którym polegają DLM, GFS, CLVM i Fence. API | |
48 | CMAN-a w jądrze i przestrzeni użytkownika jest ogólne i w całości | |
49 | dostępne do wykorzystania w innych programach. | |
762dc73d | 50 | |
e8fc3769 JB |
51 | %package libs |
52 | Summary: CMAN library | |
53 | Summary(pl.UTF-8): Biblioteka CMAN | |
54 | Group: Libraries | |
f24bf85c JB |
55 | Obsoletes: gulm |
56 | Obsoletes: gulm-devel | |
57 | Obsoletes: gulm-static | |
334cd07c | 58 | Obsoletes: iddev |
f24bf85c JB |
59 | Obsoletes: magma |
60 | Obsoletes: magma-devel | |
61 | Obsoletes: magma-plugins | |
62 | Obsoletes: magma-static | |
48676e79 | 63 | Conflicts: cman < 2.00.00-2 |
e8fc3769 JB |
64 | |
65 | %description libs | |
66 | CMAN library. | |
67 | ||
68 | %description libs -l pl.UTF-8 | |
69 | Biblioteka CMAN. | |
70 | ||
9d5dca7b JB |
71 | %package devel |
72 | Summary: CMAN header files | |
8f0dac7b | 73 | Summary(pl.UTF-8): Pliki nagłówkowe CMAN |
9d5dca7b | 74 | Group: Development/Libraries |
e8fc3769 | 75 | Requires: %{name}-libs = %{version}-%{release} |
9d5dca7b JB |
76 | |
77 | %description devel | |
78 | CMAN header files. | |
79 | ||
6153d48e JR |
80 | %description devel -l pl.UTF-8 |
81 | Pliki nagłówkowe CMAN. | |
9d5dca7b | 82 | |
a6bd5743 AM |
83 | %package static |
84 | Summary: CMAN static library | |
8f0dac7b | 85 | Summary(pl.UTF-8): Biblioteka statyczna CMAN |
a6bd5743 | 86 | Group: Development/Libraries |
4a979529 | 87 | Requires: %{name}-devel = %{version}-%{release} |
c66b6748 | 88 | |
a6bd5743 AM |
89 | %description static |
90 | CMAN static library. | |
c66b6748 | 91 | |
fbced621 | 92 | %description static -l pl.UTF-8 |
a6bd5743 AM |
93 | Biblioteka statyczna CMAN. |
94 | ||
95 | %prep | |
96 | %setup -q -n cluster-%{version} | |
a6bd5743 AM |
97 | |
98 | cd %{name} | |
e8fc3769 JB |
99 | %{__perl} -pi -e 's/ -g/ %{rpmcflags}/' {lib,qdisk,tests}/Makefile |
100 | %{__perl} -pi -e 's/ -O2 /%{rpmcflags}/' {cman_tool,daemon}/Makefile | |
cb602c2e AM |
101 | |
102 | %build | |
103 | ./configure \ | |
e6276ceb PS |
104 | --without_kernel_modules \ |
105 | --without_gfs \ | |
106 | --without_gfs2 \ | |
107 | --without_gnbd \ | |
108 | --ccsincdir="$PWD/ccs/lib" \ | |
cb602c2e | 109 | --incdir=%{_includedir} \ |
e6276ceb | 110 | --ncursesincdir=%{_includedir}/ncurses \ |
cb602c2e | 111 | --libdir=%{_libdir} \ |
a4c8a87c | 112 | --libexecdir=%{_libdir} \ |
cb602c2e AM |
113 | --mandir=%{_mandir} \ |
114 | --prefix=%{_prefix} \ | |
115 | --sbindir=%{_sbindir} | |
e6276ceb | 116 | |
ed6d5f29 | 117 | %{__make} %{?with_libonly:-C lib} \ |
c66b6748 JB |
118 | CC="%{__cc}" \ |
119 | incdir=`pwd`/include | |
cb602c2e AM |
120 | |
121 | %install | |
122 | rm -rf $RPM_BUILD_ROOT | |
c1252bfc | 123 | install -d $RPM_BUILD_ROOT{/etc/sysconfig,/etc/rc.d/init.d} |
cb602c2e | 124 | |
e8fc3769 | 125 | %{__make} -C %{name}%{?with_libonly:/lib} install \ |
cb602c2e AM |
126 | DESTDIR=$RPM_BUILD_ROOT |
127 | ||
e8fc3769 JB |
128 | install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name} |
129 | install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/%{name} | |
c1252bfc | 130 | |
cb602c2e AM |
131 | %clean |
132 | rm -rf $RPM_BUILD_ROOT | |
133 | ||
b6ba0aed | 134 | %post |
c1252bfc | 135 | /sbin/chkconfig --add %{name} |
136 | ||
c1252bfc | 137 | %preun |
138 | if [ "$1" = "0" ]; then | |
139 | %service -q %{name} stop | |
140 | /sbin/chkconfig --del %{name} | |
141 | fi | |
142 | ||
e8fc3769 JB |
143 | %post libs -p /sbin/ldconfig |
144 | %postun libs -p /sbin/ldconfig | |
145 | ||
58a4b58e | 146 | %if %{without libonly} |
cb602c2e AM |
147 | %files |
148 | %defattr(644,root,root,755) | |
c1252bfc | 149 | %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/%{name} |
150 | %attr(754,root,root) /etc/rc.d/init.d/%{name} | |
e8fc3769 JB |
151 | #%attr(754,root,root) /etc/rc.d/init.d/qdiskd |
152 | %attr(755,root,root) %{_sbindir}/* | |
a4c8a87c | 153 | %attr(755,root,root) %{_libdir}/lcrso/service_cman.lcrso |
c66b6748 | 154 | %{_mandir}/man5/cman.5* |
46f80b5f | 155 | %{_mandir}/man5/qdisk.5* |
c66b6748 | 156 | %{_mandir}/man8/cman_tool.8* |
46f80b5f JB |
157 | %{_mandir}/man8/mkqdisk.8* |
158 | %{_mandir}/man8/qdiskd.8* | |
ed6d5f29 | 159 | %endif |
9d5dca7b | 160 | |
e8fc3769 JB |
161 | %files libs |
162 | %defattr(644,root,root,755) | |
163 | %attr(755,root,root) %{_libdir}/libcman.so.*.* | |
164 | ||
9d5dca7b JB |
165 | %files devel |
166 | %defattr(644,root,root,755) | |
0cbf36cb | 167 | %attr(755,root,root) %{_libdir}/libcman.so |
e8fc3769 | 168 | %{_includedir}/*.h |
a6bd5743 AM |
169 | |
170 | %files static | |
171 | %defattr(644,root,root,755) | |
0cbf36cb | 172 | %{_libdir}/libcman.a |