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
16 Patch0: %{name}-link_order.patch
17 Patch1: %{name}-after_configfs.patch
18 Patch2: %{name}_stonith-build.patch
19 Patch3: %{name}-mem_init.patch
20 Patch4: %{name}-signals.patch
21 Patch5: 0003-dlm_controld-remove-fence_all-from-cli.patch
22 Patch6: dlm_stonith_reboot.patch
23 URL: http://sources.redhat.com/cluster/dlm/
24 BuildRequires: corosync-devel
25 %{?with_dlm_stonith:BuildRequires: corosync-devel}
26 BuildRequires: rpmbuild(macros) >= 1.644
27 Requires: %{name}-libs = %{version}-%{release}
29 Requires: systemd-units >= 38
30 Requires(post,preun): /sbin/chkconfig
31 Obsoletes: cluster-dlm
32 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
35 The DLM lock manager is a kernel-based VMS-like distributed lock
36 manager. It is general purpose and not specific to only GFS or CLVM.
37 Kernel and userspace locking API's are available.
39 %description -l pl.UTF-8
40 Zarządca blokad DLM to oparty na jądrze zarządca rozproszonych blokad
41 w stylu VMS. Jest ogólnego przeznaczenia, przeznaczonym nie tylko dla
42 GFS-a czy CLVM-a. Dostępne są API blokowania w jądrze i przestrzeni
46 Summary: DLM libraries
47 Summary(pl.UTF-8): Biblioteki DLM
48 Group: Development/Libraries
49 Obsoletes: cluster-dlm-libs
54 %description libs -l pl.UTF-8
58 Summary: Header files and development documentation for DLM
59 Summary(pl.UTF-8): Pliki nagłówkowe i dokumentacja programisty dla DLM-a
60 Group: Development/Libraries
61 Requires: %{name}-libs = %{version}-%{release}
62 Obsoletes: cluster-dlm-devel
65 Header files and development documentation for DLM.
67 %description devel -l pl.UTF-8
68 Pliki nagłówkowe i dokumentacja programisty dla DLM-a.
87 HDRDIR=%{_includedir} \
88 CC="%{__cc} %{rpmcflags} %{rpmcppflags} %{rpmldflags}"
90 %if %{with dlm_stonith}
97 HDRDIR=%{_includedir} \
98 CC="%{__cc} %{rpmcflags} %{rpmcppflags} %{rpmldflags}"
102 rm -rf $RPM_BUILD_ROOT
103 install -d $RPM_BUILD_ROOT{%{systemdunitdir},/etc/{rc.d/init.d,sysconfig}} \
104 $RPM_BUILD_ROOT{/var/run/dlm,%{systemdtmpfilesdir}}
107 DESTDIR=$RPM_BUILD_ROOT \
113 HDRDIR=%{_includedir}
115 %if %{with dlm_stonith}
116 %{__make} -C fence install \
117 DESTDIR=$RPM_BUILD_ROOT \
123 HDRDIR=%{_includedir}
125 ln -s dlm_stonith $RPM_BUILD_ROOT%{_sbindir}/dlm_stonith_reboot
126 ln -s dlm_stonith $RPM_BUILD_ROOT%{_sbindir}/dlm_stonith_off
129 install init/%{name}.service $RPM_BUILD_ROOT%{systemdunitdir}
130 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
131 install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/%{name}
132 install %{SOURCE3} $RPM_BUILD_ROOT%{systemdtmpfilesdir}/%{name}.conf
135 rm -rf $RPM_BUILD_ROOT
138 %systemd_post %{name}.service
141 /sbin/chkconfig --add %{name}
142 %service %{name} restart
143 %systemd_preun %{name}.service
146 if [ "$1" = "0" ]; then
147 %service -q %{name} stop
148 /sbin/chkconfig --del %{name}
152 %post libs -p /sbin/ldconfig
153 %postun libs -p /sbin/ldconfig
156 %defattr(644,root,root,755)
158 %attr(755,root,root) %{_sbindir}/*
159 /lib/udev/rules.d/51-dlm.rules
160 %attr(754,root,root) /etc/rc.d/init.d/%{name}
161 %verify(not md5 mtime size) %config(noreplace) /etc/sysconfig/%{name}
163 %{_mandir}/man5/dlm.conf.5*
164 %{systemdunitdir}/%{name}.service
165 %{systemdtmpfilesdir}/%{name}.conf
169 %defattr(644,root,root,755)
170 %ghost %{_libdir}/libdlm.so.3
171 %attr(755,root,root) %{_libdir}/libdlm.so.3.*
172 %ghost %{_libdir}/libdlm_lt.so.3
173 %attr(755,root,root) %{_libdir}/libdlm_lt.so.3.*
174 %ghost %{_libdir}/libdlmcontrol.so.3
175 %attr(755,root,root) %{_libdir}/libdlmcontrol.so.3.*
178 %defattr(644,root,root,755)
179 %attr(755,root,root) %{_libdir}/libdlm.so
180 %attr(755,root,root) %{_libdir}/libdlm_lt.so
181 %attr(755,root,root) %{_libdir}/libdlmcontrol.so
182 %{_includedir}/libdlm.h
183 %{_includedir}/libdlmcontrol.h
184 %{_mandir}/man3/dlm_*.3*
185 %{_mandir}/man3/libdlm.3*
186 %{_pkgconfigdir}/libdlm.pc
187 %{_pkgconfigdir}/libdlm_lt.pc