]> git.pld-linux.org Git - packages/corosync.git/blob - corosync.spec
- systemd unit files added
[packages/corosync.git] / corosync.spec
1 #
2 # Conditional build:
3 %bcond_with     apidocs         # build apidocs (man3 pages are provided anyway)
4 %bcond_without  dbus            # DBus events
5 %bcond_without  rdma            # RDMA support
6 %bcond_without  snmp            # SNMP protocol support
7 #
8 Summary:        Corosync - OSI Certified implementation of a complete cluster engine
9 Summary(pl.UTF-8):      Corosync - implementacja silnika klastrowego certyfikowana przez OSI
10 Name:           corosync
11 Version:        1.4.3
12 Release:        2.2
13 License:        BSD
14 Group:          Base
15 Source0:        ftp://ftp:downloads@corosync.org/downloads/%{name}-%{version}/%{name}-%{version}.tar.gz
16 # Source0-md5:  9e9943a7d9eb90fabd52d12b215c699c
17 Source1:        %{name}.init
18 Source2:        %{name}-notifyd.init
19 Source3:        %{name}-notifyd.sysconfig
20 Source4:        %{name}.service
21 Source5:        %{name}-notifyd.service
22 Source6:        %{name}.target
23 Patch0:         %{name}-makefile.patch
24 URL:            http://www.corosync.org/
25 BuildRequires:  autoconf >= 2.61
26 BuildRequires:  automake
27 %{?with_dbus:BuildRequires:     dbus-devel}
28 %{?with_apidocs:BuildRequires:  doxygen}
29 %if %{with rdma}
30 BuildRequires:  libibverbs-devel
31 BuildRequires:  librdmacm-devel
32 %endif
33 %{?with_snmp:BuildRequires:     net-snmp-devel}
34 BuildRequires:  nss-devel
35 BuildRequires:  pkgconfig
36 Requires:       %{name}-libs = %{version}-%{release}
37 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
38
39 # short_service_name_get() is defined in executable
40 %define         skip_post_check_so      libcoroipcs\.so.*
41
42 %description
43 The Corosync Cluster Engine is an OSI Certified implementation of a
44 complete cluster engine.
45
46 %description -l pl.UTF-8
47 Corosync Cluster Engine to implementacja pełnego silnika klastrowego
48 certyfikowana przez OSI.
49
50 %package libs
51 Summary:        Corosync Cluster Engine libraries
52 Summary(pl.UTF-8):      Biblioteki silnika klastrowego Corosync
53 Group:          Libraries
54
55 %description libs
56 This package contains the libraries of Corosync Cluster Engine, an OSI
57 Certified implementation of a complete cluster engine.
58
59 %description libs -l pl.UTF-8
60 Ten pakiet zawiera biblioteki Corosync Cluster Engine - pełnego
61 silnika klastrowego certyfikowanego przez OSI.
62
63 %package devel
64 Summary:        Header files for Corosync libraries
65 Summary(pl.UTF-8):      Pliki nagłówkowe bibliotek Corosync
66 Group:          Development/Libraries
67 Requires:       %{name}-libs = %{version}-%{release}
68 Conflicts:      openais-devel < 1.0
69
70 %description devel
71 This package contains the include files used to develop using Corosync
72 APIs.
73
74 %description devel -l pl.UTF-8
75 Ten pakiet zawiera pliki nagłówkowe potrzebne do tworzenia programów z
76 użyciem API Corosync.
77
78 %package static
79 Summary:        Corosync static libraries
80 Summary(pl.UTF-8):      Statyczne biblioteki Corosync
81 Group:          Development/Libraries
82 Requires:       %{name}-devel = %{version}-%{release}
83
84 %description static
85 This package contains the Corosync static libraries.
86
87 %description static -l pl.UTF-8
88 Ten pakiet zawiera statyczne biblioteki Corosync.
89
90 %package -n mibs-corosync
91 Summary:        Corosync SNMP MIB data
92 Summary(pl.UTF-8):      Dane SNMP MIB dla Corosync
93 Group:          Applications/System
94 Requires:       mibs-dirs
95
96 %description -n mibs-corosync
97 Corosync SNMP MIB data.
98
99 %description -n mibs-corosync -l pl.UTF-8
100 Dane SNMP MIB dla Corosync.
101
102 %prep
103 %setup -q
104 %patch0 -p1
105
106 %build
107 %{__aclocal}
108 %{__autoconf}
109 %{__autoheader}
110 %{__automake}
111 # options not yet supported: monitoring, watchdog, augeas
112 %configure \
113         %{?with_dbus:--enable-dbus} \
114         --enable-nss \
115         %{?with_rdma:--enable-rdma} \
116         %{?with_snmp:--enable-snmp} \
117         --with-initddir=/etc/rc.d/init.d \
118         --with-lcrso-dir=%{_libdir}/lcrso
119
120 %{__make}
121
122 %{?with_apidocs:%{__make} doxygen}
123
124 %install
125 rm -rf $RPM_BUILD_ROOT
126 install -d $RPM_BUILD_ROOT{/etc/rc.d/init.d,/etc/sysconfig,%{systemdunitdir}}
127
128 %{__make} install \
129         DESTDIR=$RPM_BUILD_ROOT
130
131 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/corosync
132
133 sed -e 's/^/#/' $RPM_BUILD_ROOT%{_sysconfdir}/corosync/corosync.conf.example \
134         >$RPM_BUILD_ROOT%{_sysconfdir}/corosync/corosync.conf
135 %{__rm} $RPM_BUILD_ROOT%{_sysconfdir}/corosync/corosync.conf.example*
136
137 %{?with_apidocs:install doc/api/man/man3/* $RPM_BUILD_ROOT%{_mandir}/man3}
138
139 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
140 install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}-notifyd
141 install %{SOURCE3} $RPM_BUILD_ROOT/etc/sysconfig/%{name}-notifyd
142 install %{SOURCE4} $RPM_BUILD_ROOT%{systemdunitdir}/%{name}.service
143 install %{SOURCE5} $RPM_BUILD_ROOT%{systemdunitdir}/%{name}-notifyd.service
144 install %{SOURCE6} $RPM_BUILD_ROOT%{systemdunitdir}/%{name}.target
145
146 %clean
147 rm -rf $RPM_BUILD_ROOT
148
149 %post
150 /sbin/chkconfig --add %{name}
151 /sbin/chkconfig --add %{name}-notifyd
152 %service %{name} restart
153 %service %{name}-notifyd restart
154 %systemd_post %{name}.service
155 %systemd_post %{name}-notifyd.service
156 %systemd_post %{name}.target
157
158 %preun
159 if [ "$1" = "0" ]; then
160         %service -q %{name} stop
161         /sbin/chkconfig --del %{name}
162         %service -q %{name}-notifyd stop
163         /sbin/chkconfig --del %{name}-notifyd
164 fi
165 %systemd_preun %{name}.service
166 %systemd_preun %{name}-notifyd.service
167 %systemd_preun %{name}.target
168
169 %postun
170 %systemd_reload
171
172 %post   libs -p /sbin/ldconfig
173 %postun libs -p /sbin/ldconfig
174
175 %files
176 %defattr(644,root,root,755)
177 %doc AUTHORS ChangeLog LICENSE README.devmap README.recovery SECURITY TODO conf/corosync.conf.example*
178 %attr(754,root,root) /etc/rc.d/init.d/corosync
179 %attr(754,root,root) /etc/rc.d/init.d/corosync-notifyd
180 %{systemdunitdir}/%{name}.service
181 %{systemdunitdir}/%{name}-notifyd.service
182 %{systemdunitdir}/%{name}.target
183 %verify(not md5 mtime size) %config(noreplace) /etc/sysconfig/%{name}-notifyd
184 %dir %{_sysconfdir}/corosync
185 %verify(not md5 mtime size) %config(noreplace) %{_sysconfdir}/corosync/corosync.conf
186 %attr(755,root,root) %{_bindir}/corosync-blackbox
187 %attr(755,root,root) %{_sbindir}/corosync
188 %attr(755,root,root) %{_sbindir}/corosync-cfgtool
189 %attr(755,root,root) %{_sbindir}/corosync-cpgtool
190 %attr(755,root,root) %{_sbindir}/corosync-fplay
191 %attr(755,root,root) %{_sbindir}/corosync-keygen
192 %attr(755,root,root) %{_sbindir}/corosync-notifyd
193 %attr(755,root,root) %{_sbindir}/corosync-objctl
194 %attr(755,root,root) %{_sbindir}/corosync-pload
195 %attr(755,root,root) %{_sbindir}/corosync-quorumtool
196 %attr(755,root,root) %{_libdir}/lcrso/*.lcrso
197 %{_mandir}/man5/corosync.conf.5*
198 %{_mandir}/man8/corosync.8*
199 %{_mandir}/man8/corosync-blackbox.8*
200 %{_mandir}/man8/corosync-cfgtool.8*
201 %{_mandir}/man8/corosync-cpgtool.8*
202 %{_mandir}/man8/corosync-fplay.8*
203 %{_mandir}/man8/corosync-keygen.8*
204 %{_mandir}/man8/corosync-notifyd.8*
205 %{_mandir}/man8/corosync-objctl.8*
206 %{_mandir}/man8/corosync-pload.8*
207 %{_mandir}/man8/corosync-quorumtool.8*
208 %dir %attr(700,root,root) /var/lib/corosync
209
210 %files libs
211 %defattr(644,root,root,755)
212 %attr(755,root,root) %{_libdir}/libcfg.so.4.*.*
213 %attr(755,root,root) %ghost %{_libdir}/libcfg.so.4
214 %attr(755,root,root) %{_libdir}/libconfdb.so.4.*.*
215 %attr(755,root,root) %ghost %{_libdir}/libconfdb.so.4
216 %attr(755,root,root) %{_libdir}/libcoroipcc.so.4.*.*
217 %attr(755,root,root) %ghost %{_libdir}/libcoroipcc.so.4
218 %attr(755,root,root) %{_libdir}/libcoroipcs.so.4.*.*
219 %attr(755,root,root) %ghost %{_libdir}/libcoroipcs.so.4
220 %attr(755,root,root) %{_libdir}/libcpg.so.4.*.*
221 %attr(755,root,root) %ghost %{_libdir}/libcpg.so.4
222 %attr(755,root,root) %{_libdir}/libevs.so.4.*.*
223 %attr(755,root,root) %ghost %{_libdir}/libevs.so.4
224 %attr(755,root,root) %{_libdir}/liblogsys.so.4.*.*
225 %attr(755,root,root) %ghost %{_libdir}/liblogsys.so.4
226 %attr(755,root,root) %{_libdir}/libpload.so.4.*.*
227 %attr(755,root,root) %ghost %{_libdir}/libpload.so.4
228 %attr(755,root,root) %{_libdir}/libsam.so.4.*.*
229 %attr(755,root,root) %ghost %{_libdir}/libsam.so.4
230 %attr(755,root,root) %{_libdir}/libquorum.so.4.*.*
231 %attr(755,root,root) %ghost %{_libdir}/libquorum.so.4
232 %attr(755,root,root) %{_libdir}/libtotem_pg.so.4.*.*
233 %attr(755,root,root) %ghost %{_libdir}/libtotem_pg.so.4
234 %attr(755,root,root) %{_libdir}/libvotequorum.so.4.*.*
235 %attr(755,root,root) %ghost %{_libdir}/libvotequorum.so.4
236 %dir %{_libdir}/lcrso
237
238 %files devel
239 %defattr(644,root,root,755)
240 %attr(755,root,root) %{_libdir}/libcfg.so
241 %attr(755,root,root) %{_libdir}/libconfdb.so
242 %attr(755,root,root) %{_libdir}/libcoroipcc.so
243 %attr(755,root,root) %{_libdir}/libcoroipcs.so
244 %attr(755,root,root) %{_libdir}/libcpg.so
245 %attr(755,root,root) %{_libdir}/libevs.so
246 %attr(755,root,root) %{_libdir}/liblogsys.so
247 %attr(755,root,root) %{_libdir}/libpload.so
248 %attr(755,root,root) %{_libdir}/libsam.so
249 %attr(755,root,root) %{_libdir}/libquorum.so
250 %attr(755,root,root) %{_libdir}/libtotem_pg.so
251 %attr(755,root,root) %{_libdir}/libvotequorum.so
252 %{_includedir}/corosync
253 %{_pkgconfigdir}/corosync.pc
254 %{_pkgconfigdir}/libcfg.pc
255 %{_pkgconfigdir}/libconfdb.pc
256 %{_pkgconfigdir}/libcoroipcc.pc
257 %{_pkgconfigdir}/libcoroipcs.pc
258 %{_pkgconfigdir}/libcpg.pc
259 %{_pkgconfigdir}/libevs.pc
260 %{_pkgconfigdir}/liblogsys.pc
261 %{_pkgconfigdir}/libpload.pc
262 %{_pkgconfigdir}/libquorum.pc
263 %{_pkgconfigdir}/libsam.pc
264 %{_pkgconfigdir}/libtotem_pg.pc
265 %{_pkgconfigdir}/libvotequorum.pc
266 %{_mandir}/man3/confdb_*.3*
267 %{_mandir}/man3/cpg_*.3*
268 %{_mandir}/man3/evs_*.3*
269 %{_mandir}/man3/sam_*.3*
270 %{_mandir}/man3/votequorum_*.3*
271 # should be man7...
272 %{_mandir}/man8/confdb_overview.8*
273 %{_mandir}/man8/coroipc_overview.8*
274 %{_mandir}/man8/corosync_overview.8*
275 %{_mandir}/man8/cpg_overview.8*
276 %{_mandir}/man8/evs_overview.8*
277 %{_mandir}/man8/logsys_overview.8*
278 %{_mandir}/man8/sam_overview.8*
279 %{_mandir}/man8/votequorum_overview.8*
280
281 %files static
282 %defattr(644,root,root,755)
283 %{_libdir}/libcfg.a
284 %{_libdir}/libconfdb.a
285 %{_libdir}/libcoroipcc.a
286 %{_libdir}/libcoroipcs.a
287 %{_libdir}/libcpg.a
288 %{_libdir}/libevs.a
289 %{_libdir}/liblcr.a
290 %{_libdir}/liblogsys.a
291 %{_libdir}/libpload.a
292 %{_libdir}/libsam.a
293 %{_libdir}/libquorum.a
294 %{_libdir}/libtotem_pg.a
295 %{_libdir}/libvotequorum.a
296
297 %if %{with snmp}
298 %files -n mibs-corosync
299 %defattr(644,root,root,755)
300 %{_datadir}/snmp/mibs/COROSYNC-MIB.txt
301 %endif
This page took 0.981173 seconds and 4 git commands to generate.