]>
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 |
ed6d5f29 | 8 | Version: 2.00.00 |
a6bd5743 | 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 |
ed6d5f29 | 13 | # Source0-md5: 2ef3f4ba9d3c87b50adfc9b406171085 |
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} |
18 | BuildRequires: openais-devel | |
c66b6748 | 19 | BuildRequires: perl-base |
e8fc3769 | 20 | Requires: %{name}-libs = %{version}-%{release} |
cb602c2e AM |
21 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
22 | ||
23 | %define _sbindir /sbin | |
24 | ||
e8fc3769 JB |
25 | # aliasing problems in qdisk/disk.c |
26 | %define specflags -fno-strict-aliasing | |
27 | ||
cb602c2e AM |
28 | %description |
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. | |
37 | ||
6153d48e JR |
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. | |
762dc73d | 49 | |
e8fc3769 JB |
50 | %package libs |
51 | Summary: CMAN library | |
52 | Summary(pl.UTF-8): Biblioteka CMAN | |
53 | Group: Libraries | |
54 | ||
55 | %description libs | |
56 | CMAN library. | |
57 | ||
58 | %description libs -l pl.UTF-8 | |
59 | Biblioteka CMAN. | |
60 | ||
9d5dca7b JB |
61 | %package devel |
62 | Summary: CMAN header files | |
8f0dac7b | 63 | Summary(pl.UTF-8): Pliki nagłówkowe CMAN |
9d5dca7b | 64 | Group: Development/Libraries |
e8fc3769 | 65 | Requires: %{name}-libs = %{version}-%{release} |
9d5dca7b JB |
66 | |
67 | %description devel | |
68 | CMAN header files. | |
69 | ||
6153d48e JR |
70 | %description devel -l pl.UTF-8 |
71 | Pliki nagłówkowe CMAN. | |
9d5dca7b | 72 | |
a6bd5743 AM |
73 | %package static |
74 | Summary: CMAN static library | |
8f0dac7b | 75 | Summary(pl.UTF-8): Biblioteka statyczna CMAN |
a6bd5743 | 76 | Group: Development/Libraries |
4a979529 | 77 | Requires: %{name}-devel = %{version}-%{release} |
c66b6748 | 78 | |
a6bd5743 AM |
79 | %description static |
80 | CMAN static library. | |
c66b6748 | 81 | |
6153d48e | 82 | %description devel -l pl.UTF-8 |
a6bd5743 AM |
83 | Biblioteka statyczna CMAN. |
84 | ||
85 | %prep | |
86 | %setup -q -n cluster-%{version} | |
a6bd5743 AM |
87 | |
88 | cd %{name} | |
e8fc3769 JB |
89 | %{__perl} -pi -e 's/ -g/ %{rpmcflags}/' {lib,qdisk,tests}/Makefile |
90 | %{__perl} -pi -e 's/ -O2 /%{rpmcflags}/' {cman_tool,daemon}/Makefile | |
cb602c2e AM |
91 | |
92 | %build | |
a6bd5743 | 93 | cd %{name} |
cb602c2e | 94 | ./configure \ |
ed6d5f29 | 95 | --ccsincdir="$PWD/../ccs/lib" \ |
cb602c2e | 96 | --incdir=%{_includedir} \ |
cb602c2e | 97 | --libdir=%{_libdir} \ |
a4c8a87c | 98 | --libexecdir=%{_libdir} \ |
cb602c2e AM |
99 | --mandir=%{_mandir} \ |
100 | --prefix=%{_prefix} \ | |
101 | --sbindir=%{_sbindir} | |
ed6d5f29 | 102 | %{__make} %{?with_libonly:-C lib} \ |
c66b6748 JB |
103 | CC="%{__cc}" \ |
104 | incdir=`pwd`/include | |
cb602c2e AM |
105 | |
106 | %install | |
107 | rm -rf $RPM_BUILD_ROOT | |
c1252bfc | 108 | install -d $RPM_BUILD_ROOT{/etc/sysconfig,/etc/rc.d/init.d} |
cb602c2e | 109 | |
e8fc3769 | 110 | %{__make} -C %{name}%{?with_libonly:/lib} install \ |
cb602c2e AM |
111 | DESTDIR=$RPM_BUILD_ROOT |
112 | ||
e8fc3769 JB |
113 | install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name} |
114 | install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/%{name} | |
c1252bfc | 115 | |
cb602c2e AM |
116 | %clean |
117 | rm -rf $RPM_BUILD_ROOT | |
118 | ||
b6ba0aed | 119 | %post |
c1252bfc | 120 | /sbin/chkconfig --add %{name} |
121 | ||
c1252bfc | 122 | %preun |
123 | if [ "$1" = "0" ]; then | |
124 | %service -q %{name} stop | |
125 | /sbin/chkconfig --del %{name} | |
126 | fi | |
127 | ||
e8fc3769 JB |
128 | %post libs -p /sbin/ldconfig |
129 | %postun libs -p /sbin/ldconfig | |
130 | ||
131 | %if %{without libobly} | |
cb602c2e AM |
132 | %files |
133 | %defattr(644,root,root,755) | |
c1252bfc | 134 | %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/%{name} |
135 | %attr(754,root,root) /etc/rc.d/init.d/%{name} | |
e8fc3769 JB |
136 | #%attr(754,root,root) /etc/rc.d/init.d/qdiskd |
137 | %attr(755,root,root) %{_sbindir}/* | |
a4c8a87c | 138 | %attr(755,root,root) %{_libdir}/lcrso/service_cman.lcrso |
c66b6748 | 139 | %{_mandir}/man5/cman.5* |
46f80b5f | 140 | %{_mandir}/man5/qdisk.5* |
c66b6748 | 141 | %{_mandir}/man8/cman_tool.8* |
46f80b5f JB |
142 | %{_mandir}/man8/mkqdisk.8* |
143 | %{_mandir}/man8/qdiskd.8* | |
ed6d5f29 | 144 | %endif |
9d5dca7b | 145 | |
e8fc3769 JB |
146 | %files libs |
147 | %defattr(644,root,root,755) | |
148 | %attr(755,root,root) %{_libdir}/libcman.so.*.* | |
149 | ||
9d5dca7b JB |
150 | %files devel |
151 | %defattr(644,root,root,755) | |
0cbf36cb | 152 | %attr(755,root,root) %{_libdir}/libcman.so |
e8fc3769 | 153 | %{_includedir}/*.h |
a6bd5743 AM |
154 | |
155 | %files static | |
156 | %defattr(644,root,root,755) | |
0cbf36cb | 157 | %{_libdir}/libcman.a |