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