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