2 %bcond_without dlm_stonith # build without fencing helper
4 Summary: General-purpose distributed lock manager
5 Summary(pl.UTF-8): Zarządca rozproszonych blokad ogólnego przeznaczenia
9 License: LGPL v2.1+, GPL v2
11 Source0: http://people.redhat.com/teigland/%{name}-%{version}.tar.gz
12 # Source0-md5: cad4999d0c42000bf5898af34f587728
14 Source2: %{name}.sysconfig
15 Source3: %{name}.tmpfiles
17 Patch0: %{name}-link_order.patch
18 Patch1: %{name}-after_configfs.patch
19 Patch2: %{name}_stonith-build.patch
20 Patch3: %{name}-mem_init.patch
21 Patch4: %{name}-signals.patch
22 Patch5: 0003-dlm_controld-remove-fence_all-from-cli.patch
23 Patch6: dlm_stonith_reboot.patch
24 URL: http://sources.redhat.com/cluster/dlm/
25 BuildRequires: corosync-devel
26 %{?with_dlm_stonith:BuildRequires: pacemaker-devel >= 1.1}
27 BuildRequires: rpmbuild(macros) >= 1.644
28 Requires: %{name}-libs = %{version}-%{release}
30 Requires: systemd-units >= 38
31 Requires(post,preun): /sbin/chkconfig
32 Obsoletes: cluster-dlm
33 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
36 The DLM lock manager is a kernel-based VMS-like distributed lock
37 manager. It is general purpose and not specific to only GFS or CLVM.
38 Kernel and userspace locking API's are available.
40 %description -l pl.UTF-8
41 Zarządca blokad DLM to oparty na jądrze zarządca rozproszonych blokad
42 w stylu VMS. Jest ogólnego przeznaczenia, przeznaczonym nie tylko dla
43 GFS-a czy CLVM-a. Dostępne są API blokowania w jądrze i przestrzeni
47 Summary: DLM libraries
48 Summary(pl.UTF-8): Biblioteki DLM
49 Group: Development/Libraries
50 Obsoletes: cluster-dlm-libs
55 %description libs -l pl.UTF-8
59 Summary: Header files and development documentation for DLM
60 Summary(pl.UTF-8): Pliki nagłówkowe i dokumentacja programisty dla DLM-a
61 Group: Development/Libraries
62 Requires: %{name}-libs = %{version}-%{release}
63 Obsoletes: cluster-dlm-devel
66 Header files and development documentation for DLM.
68 %description devel -l pl.UTF-8
69 Pliki nagłówkowe i dokumentacja programisty dla DLM-a.
88 HDRDIR=%{_includedir} \
89 CC="%{__cc} %{rpmcflags} %{rpmcppflags} %{rpmldflags}"
91 %if %{with dlm_stonith}
98 HDRDIR=%{_includedir} \
99 CC="%{__cc} %{rpmcflags} %{rpmcppflags} %{rpmldflags}"
103 rm -rf $RPM_BUILD_ROOT
104 install -d $RPM_BUILD_ROOT{%{systemdunitdir},/etc/{rc.d/init.d,sysconfig}} \
105 $RPM_BUILD_ROOT%{_sysconfdir}/%{name} \
106 $RPM_BUILD_ROOT{/var/run/dlm,%{systemdtmpfilesdir}}
109 DESTDIR=$RPM_BUILD_ROOT \
115 HDRDIR=%{_includedir}
117 %if %{with dlm_stonith}
118 %{__make} -C fence install \
119 DESTDIR=$RPM_BUILD_ROOT \
125 HDRDIR=%{_includedir}
127 ln -s dlm_stonith $RPM_BUILD_ROOT%{_sbindir}/dlm_stonith_reboot
128 ln -s dlm_stonith $RPM_BUILD_ROOT%{_sbindir}/dlm_stonith_off
131 install init/%{name}.service $RPM_BUILD_ROOT%{systemdunitdir}
132 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
133 install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/%{name}
134 install %{SOURCE3} $RPM_BUILD_ROOT%{systemdtmpfilesdir}/%{name}.conf
135 install %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/%{name}.conf
138 rm -rf $RPM_BUILD_ROOT
141 %systemd_post %{name}.service
144 /sbin/chkconfig --add %{name}
145 %service %{name} restart
146 %systemd_preun %{name}.service
149 if [ "$1" = "0" ]; then
150 %service -q %{name} stop
151 /sbin/chkconfig --del %{name}
155 %post libs -p /sbin/ldconfig
156 %postun libs -p /sbin/ldconfig
159 %defattr(644,root,root,755)
161 %attr(755,root,root) %{_sbindir}/*
162 %dir %{_sysconfdir}/%{name}
163 %verify(not md5 mtime size) %config(noreplace) %{_sysconfdir}/%{name}/%{name}.conf
164 /lib/udev/rules.d/51-dlm.rules
165 %attr(754,root,root) /etc/rc.d/init.d/%{name}
166 %verify(not md5 mtime size) %config(noreplace) /etc/sysconfig/%{name}
168 %{_mandir}/man5/dlm.conf.5*
169 %{systemdunitdir}/%{name}.service
170 %{systemdtmpfilesdir}/%{name}.conf
174 %defattr(644,root,root,755)
175 %ghost %{_libdir}/libdlm.so.3
176 %attr(755,root,root) %{_libdir}/libdlm.so.3.*
177 %ghost %{_libdir}/libdlm_lt.so.3
178 %attr(755,root,root) %{_libdir}/libdlm_lt.so.3.*
179 %ghost %{_libdir}/libdlmcontrol.so.3
180 %attr(755,root,root) %{_libdir}/libdlmcontrol.so.3.*
183 %defattr(644,root,root,755)
184 %attr(755,root,root) %{_libdir}/libdlm.so
185 %attr(755,root,root) %{_libdir}/libdlm_lt.so
186 %attr(755,root,root) %{_libdir}/libdlmcontrol.so
187 %{_includedir}/libdlm.h
188 %{_includedir}/libdlmcontrol.h
189 %{_mandir}/man3/dlm_*.3*
190 %{_mandir}/man3/libdlm.3*
191 %{_pkgconfigdir}/libdlm.pc
192 %{_pkgconfigdir}/libdlm_lt.pc