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