3 %bcond_without dlm_stonith # build without fencing helper
5 Summary: General-purpose distributed lock manager
6 Summary(pl.UTF-8): Zarządca rozproszonych blokad ogólnego przeznaczenia
10 License: LGPL v2.1+, GPL v2
12 Source0: https://git.fedorahosted.org/cgit/dlm.git/snapshot/%{name}-%{version}.tar.bz2
13 # Source0-md5: 87703eae3fb4a3312c10cc1b58f064b8
15 Source2: %{name}.sysconfig
16 Source3: %{name}.tmpfiles
18 Patch0: %{name}-systemd-configfs.patch
19 Patch1: fix_status_printing.patch
20 URL: http://sources.redhat.com/cluster/dlm/
21 BuildRequires: corosync-devel >= 2.0
22 %{?with_dlm_stonith:BuildRequires: libxml2-devel >= 2.0}
23 %{?with_dlm_stonith:BuildRequires: pacemaker-devel >= 1.1}
24 BuildRequires: pkgconfig
25 BuildRequires: rpmbuild(macros) >= 1.644
26 BuildRequires: systemd-devel
27 Requires: %{name}-libs = %{version}-%{release}
29 Requires: systemd-units >= 208-8
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.
83 HDRDIR=%{_includedir} \
84 CC="%{__cc} %{rpmcflags} %{rpmcppflags} %{rpmldflags}"
86 %if %{with dlm_stonith}
93 HDRDIR=%{_includedir} \
94 CC="%{__cc} %{rpmcflags} %{rpmcppflags} %{rpmldflags}"
98 rm -rf $RPM_BUILD_ROOT
99 install -d $RPM_BUILD_ROOT{%{systemdunitdir},/etc/{rc.d/init.d,sysconfig}} \
100 $RPM_BUILD_ROOT%{_sysconfdir}/%{name} \
101 $RPM_BUILD_ROOT{/var/run/dlm,%{systemdtmpfilesdir}}
104 DESTDIR=$RPM_BUILD_ROOT \
110 HDRDIR=%{_includedir}
112 %if %{with dlm_stonith}
113 %{__make} -C fence install \
114 DESTDIR=$RPM_BUILD_ROOT \
120 HDRDIR=%{_includedir}
123 install init/%{name}.service $RPM_BUILD_ROOT%{systemdunitdir}
124 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
125 install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/%{name}
126 install %{SOURCE3} $RPM_BUILD_ROOT%{systemdtmpfilesdir}/%{name}.conf
127 install %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/%{name}.conf
130 rm -rf $RPM_BUILD_ROOT
133 %systemd_post %{name}.service
136 /sbin/chkconfig --add %{name}
137 %service %{name} restart
138 %systemd_preun %{name}.service
141 if [ "$1" = "0" ]; then
142 %service -q %{name} stop
143 /sbin/chkconfig --del %{name}
147 %post libs -p /sbin/ldconfig
148 %postun libs -p /sbin/ldconfig
151 %defattr(644,root,root,755)
153 %{?with_dlm_stonith:%attr(755,root,root) %{_sbindir}/dlm_controld}
154 %attr(755,root,root) %{_sbindir}/dlm_stonith
155 %attr(755,root,root) %{_sbindir}/dlm_tool
156 %dir %{_sysconfdir}/%{name}
157 %verify(not md5 mtime size) %config(noreplace) %{_sysconfdir}/%{name}/%{name}.conf
158 /lib/udev/rules.d/51-dlm.rules
159 %attr(754,root,root) /etc/rc.d/init.d/%{name}
160 %verify(not md5 mtime size) %config(noreplace) /etc/sysconfig/%{name}
161 %{_mandir}/man8/dlm_controld.8*
162 %{_mandir}/man8/dlm_tool.8*
163 %{_mandir}/man5/dlm.conf.5*
164 %{systemdunitdir}/%{name}.service
165 %{systemdtmpfilesdir}/%{name}.conf
169 %defattr(644,root,root,755)
170 %attr(755,root,root) %{_libdir}/libdlm.so.3.*
171 %attr(755,root,root) %ghost %{_libdir}/libdlm.so.3
172 %attr(755,root,root) %{_libdir}/libdlm_lt.so.3.*
173 %attr(755,root,root) %ghost %{_libdir}/libdlm_lt.so.3
174 %attr(755,root,root) %{_libdir}/libdlmcontrol.so.3.*
175 %attr(755,root,root) %ghost %{_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