]> git.pld-linux.org Git - packages/cman.git/blob - cman.spec
- up to 2.03.11, deprecation note
[packages/cman.git] / cman.spec
1 # NOTE: obsoleted by -cman subpackages from cluster.spec (3.x)
2 #
3 # Conditional build:
4 %bcond_with     libonly         # build package only with lib (needed bootstrap with ccs)
5 #
6 Summary:        General-purpose symmetric cluster manager
7 Summary(pl.UTF-8):      Zarządca symetrycznych klastrów ogólnego przeznaczenia
8 Name:           cman
9 Version:        2.03.11
10 Release:        1
11 License:        GPL v2
12 Group:          Applications/System
13 Source0:        ftp://sources.redhat.com/pub/cluster/releases/cluster-%{version}.tar.gz
14 # Source0-md5:  712b9f583472d1de614641bc0f4a0aaf
15 Source1:        %{name}.init
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)
25
26 %define         _sbindir        /sbin
27
28 # aliasing problems in qdisk/disk.c
29 %define         specflags       -fno-strict-aliasing
30
31 %description
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.
40
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.
52
53 %package libs
54 Summary:        CMAN library
55 Summary(pl.UTF-8):      Biblioteka CMAN
56 Group:          Libraries
57 Obsoletes:      gulm
58 Obsoletes:      gulm-devel
59 Obsoletes:      gulm-static
60 Obsoletes:      iddev
61 Obsoletes:      magma
62 Obsoletes:      magma-devel
63 Obsoletes:      magma-plugins
64 Obsoletes:      magma-static
65 Conflicts:      cman < 2.00.00-2
66
67 %description libs
68 CMAN library.
69
70 %description libs -l pl.UTF-8
71 Biblioteka CMAN.
72
73 %package devel
74 Summary:        CMAN header files
75 Summary(pl.UTF-8):      Pliki nagłówkowe CMAN
76 Group:          Development/Libraries
77 Requires:       %{name}-libs = %{version}-%{release}
78
79 %description devel
80 CMAN header files.
81
82 %description devel -l pl.UTF-8
83 Pliki nagłówkowe CMAN.
84
85 %package static
86 Summary:        CMAN static library
87 Summary(pl.UTF-8):      Biblioteka statyczna CMAN
88 Group:          Development/Libraries
89 Requires:       %{name}-devel = %{version}-%{release}
90
91 %description static
92 CMAN static library.
93
94 %description static -l pl.UTF-8
95 Biblioteka statyczna CMAN.
96
97 %prep
98 %setup -q -n cluster-%{version}
99 %patch0 -p1
100
101 # there are warnings caused by some unused variables
102 %{__sed} -i -e 's/-Werror //' %{name}/qdisk/Makefile
103
104 %build
105 ./configure \
106         --cc="%{__cc}" \
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} \
116         --without_gfs \
117         --without_gfs2 \
118         --without_gnbd \
119         --without_kernel_modules
120
121 %{__make} -C %{name}%{?with_libonly:/lib}
122
123 %install
124 rm -rf $RPM_BUILD_ROOT
125 install -d $RPM_BUILD_ROOT{/etc/sysconfig,/etc/rc.d/init.d}
126
127 %{__make} -C %{name}%{?with_libonly:/lib} install \
128         DESTDIR=$RPM_BUILD_ROOT
129
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}
133 %endif
134
135 %clean
136 rm -rf $RPM_BUILD_ROOT
137
138 %post
139 /sbin/chkconfig --add %{name}
140
141 %preun
142 if [ "$1" = "0" ]; then
143         %service -q %{name} stop
144         /sbin/chkconfig --del %{name}
145 fi
146
147 %post   libs -p /sbin/ldconfig
148 %postun libs -p /sbin/ldconfig
149
150 %if %{without libonly}
151 %files
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}
155 # TODO: PLDify
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*
166 %endif
167
168 %files libs
169 %defattr(644,root,root,755)
170 %attr(755,root,root) %{_libdir}/libcman.so.*.*
171 %attr(755,root,root) %ghost %{_libdir}/libcman.so.2
172
173 %files devel
174 %defattr(644,root,root,755)
175 %attr(755,root,root) %{_libdir}/libcman.so
176 %{_includedir}/libcman.h
177
178 %files static
179 %defattr(644,root,root,755)
180 %{_libdir}/libcman.a
This page took 0.089087 seconds and 3 git commands to generate.