]> git.pld-linux.org Git - packages/cman.git/blob - cman.spec
- Obsoletes: iddev
[packages/cman.git] / cman.spec
1 #
2 # Conditional build:
3 %bcond_with     libonly         # build package only with lib (needed bootstrap with ccs)
4 #
5 Summary:        General-purpose symmetric cluster manager
6 Summary(pl.UTF-8):      Zarządca symetrycznych klastrów ogólnego przeznaczenia
7 Name:           cman
8 Version:        2.00.00
9 Release:        2
10 License:        GPL v2
11 Group:          Applications/System
12 Source0:        ftp://sources.redhat.com/pub/cluster/releases/cluster-%{version}.tar.gz
13 # Source0-md5:  2ef3f4ba9d3c87b50adfc9b406171085
14 Source1:        %{name}.init
15 Source2:        %{name}.sysconfig
16 URL:            http://sources.redhat.com/cluster/cman/
17 %{!?with_libonly:BuildRequires: ccs-devel}
18 BuildRequires:  openais-devel
19 BuildRequires:  perl-base
20 Requires:       %{name}-libs = %{version}-%{release}
21 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
22
23 %define         _sbindir        /sbin
24
25 # aliasing problems in qdisk/disk.c
26 %define         specflags       -fno-strict-aliasing
27
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
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.
49
50 %package libs
51 Summary:        CMAN library
52 Summary(pl.UTF-8):      Biblioteka CMAN
53 Group:          Libraries
54 Obsoletes:      gulm
55 Obsoletes:      gulm-devel
56 Obsoletes:      gulm-static
57 Obsoletes:      iddev
58 Obsoletes:      magma
59 Obsoletes:      magma-devel
60 Obsoletes:      magma-plugins
61 Obsoletes:      magma-static
62 Conflicts:      cman < 2.00.00-2
63
64 %description libs
65 CMAN library.
66
67 %description libs -l pl.UTF-8
68 Biblioteka CMAN.
69
70 %package devel
71 Summary:        CMAN header files
72 Summary(pl.UTF-8):      Pliki nagłówkowe CMAN
73 Group:          Development/Libraries
74 Requires:       %{name}-libs = %{version}-%{release}
75
76 %description devel
77 CMAN header files.
78
79 %description devel -l pl.UTF-8
80 Pliki nagłówkowe CMAN.
81
82 %package static
83 Summary:        CMAN static library
84 Summary(pl.UTF-8):      Biblioteka statyczna CMAN
85 Group:          Development/Libraries
86 Requires:       %{name}-devel = %{version}-%{release}
87
88 %description static
89 CMAN static library.
90
91 %description devel -l pl.UTF-8
92 Biblioteka statyczna CMAN.
93
94 %prep
95 %setup -q -n cluster-%{version}
96
97 cd %{name}
98 %{__perl} -pi -e 's/ -g/ %{rpmcflags}/' {lib,qdisk,tests}/Makefile
99 %{__perl} -pi -e 's/ -O2 /%{rpmcflags}/' {cman_tool,daemon}/Makefile
100
101 %build
102 cd %{name}
103 ./configure \
104         --ccsincdir="$PWD/../ccs/lib" \
105         --incdir=%{_includedir} \
106         --libdir=%{_libdir} \
107         --libexecdir=%{_libdir} \
108         --mandir=%{_mandir} \
109         --prefix=%{_prefix} \
110         --sbindir=%{_sbindir}
111 %{__make} %{?with_libonly:-C lib} \
112         CC="%{__cc}" \
113         incdir=`pwd`/include
114
115 %install
116 rm -rf $RPM_BUILD_ROOT
117 install -d $RPM_BUILD_ROOT{/etc/sysconfig,/etc/rc.d/init.d}
118
119 %{__make} -C %{name}%{?with_libonly:/lib} install \
120         DESTDIR=$RPM_BUILD_ROOT
121
122 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
123 install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/%{name}
124
125 %clean
126 rm -rf $RPM_BUILD_ROOT
127
128 %post
129 /sbin/chkconfig --add %{name}
130
131 %preun
132 if [ "$1" = "0" ]; then
133         %service -q %{name} stop
134         /sbin/chkconfig --del %{name}
135 fi
136
137 %post   libs -p /sbin/ldconfig
138 %postun libs -p /sbin/ldconfig
139
140 %if %{without libobly}
141 %files
142 %defattr(644,root,root,755)
143 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/%{name}
144 %attr(754,root,root) /etc/rc.d/init.d/%{name}
145 #%attr(754,root,root) /etc/rc.d/init.d/qdiskd
146 %attr(755,root,root) %{_sbindir}/*
147 %attr(755,root,root) %{_libdir}/lcrso/service_cman.lcrso
148 %{_mandir}/man5/cman.5*
149 %{_mandir}/man5/qdisk.5*
150 %{_mandir}/man8/cman_tool.8*
151 %{_mandir}/man8/mkqdisk.8*
152 %{_mandir}/man8/qdiskd.8*
153 %endif
154
155 %files libs
156 %defattr(644,root,root,755)
157 %attr(755,root,root) %{_libdir}/libcman.so.*.*
158
159 %files devel
160 %defattr(644,root,root,755)
161 %attr(755,root,root) %{_libdir}/libcman.so
162 %{_includedir}/*.h
163
164 %files static
165 %defattr(644,root,root,755)
166 %{_libdir}/libcman.a
This page took 0.067847 seconds and 3 git commands to generate.