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