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 # formerly https://git.fedorahosted.org/cgit/dlm.git/snapshot/%{name}-%{version}.tar.gz
13 # in the future http://releases.pagure.org/dlm/%{name}-%{release}.tar.gz (4.0.7 is repacked)
14 Source0: %{name}-%{version}.tar.gz
15 # Source0-md5: a16563a92198ca57064b270d43452e47
17 Source2: %{name}.sysconfig
18 Source3: %{name}.tmpfiles
20 Patch0: old_udev_dir.patch
21 URL: http://sources.redhat.com/cluster/dlm/
22 BuildRequires: corosync-devel >= 2.0
23 %{?with_dlm_stonith:BuildRequires: libxml2-devel >= 2.0}
24 %{?with_dlm_stonith:BuildRequires: pacemaker-devel >= 1.1}
25 BuildRequires: pkgconfig
26 BuildRequires: rpmbuild(macros) >= 1.644
27 BuildRequires: systemd-devel
28 Requires: %{name}-libs = %{version}-%{release}
30 Requires: systemd-units >= 208-8
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
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.
82 HDRDIR=%{_includedir} \
83 CC="%{__cc} %{rpmcflags} %{rpmcppflags} %{rpmldflags}"
85 %if %{with dlm_stonith}
92 HDRDIR=%{_includedir} \
93 CC="%{__cc} %{rpmcflags} %{rpmcppflags} %{rpmldflags}"
97 rm -rf $RPM_BUILD_ROOT
98 install -d $RPM_BUILD_ROOT{%{systemdunitdir},/etc/{rc.d/init.d,sysconfig}} \
99 $RPM_BUILD_ROOT%{_sysconfdir}/%{name} \
100 $RPM_BUILD_ROOT{/var/run/dlm,%{systemdtmpfilesdir}}
103 DESTDIR=$RPM_BUILD_ROOT \
109 HDRDIR=%{_includedir}
111 %if %{with dlm_stonith}
112 %{__make} -C fence install \
113 DESTDIR=$RPM_BUILD_ROOT \
119 HDRDIR=%{_includedir}
122 cp -p init/%{name}.service $RPM_BUILD_ROOT%{systemdunitdir}
123 install -p %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
124 cp -p %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/%{name}
125 cp -p %{SOURCE3} $RPM_BUILD_ROOT%{systemdtmpfilesdir}/%{name}.conf
126 cp -p %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/%{name}.conf
129 rm -rf $RPM_BUILD_ROOT
132 /sbin/chkconfig --add %{name}
133 %service %{name} restart
134 %systemd_post %{name}.service
137 if [ "$1" = "0" ]; then
138 %service -q %{name} stop
139 /sbin/chkconfig --del %{name}
141 %systemd_preun %{name}.service
146 %post libs -p /sbin/ldconfig
147 %postun libs -p /sbin/ldconfig
150 %defattr(644,root,root,755)
152 %{?with_dlm_stonith:%attr(755,root,root) %{_sbindir}/dlm_controld}
153 %attr(755,root,root) %{_sbindir}/dlm_stonith
154 %attr(755,root,root) %{_sbindir}/dlm_tool
155 %dir %{_sysconfdir}/%{name}
156 %verify(not md5 mtime size) %config(noreplace) %{_sysconfdir}/%{name}/%{name}.conf
157 /lib/udev/rules.d/51-dlm.rules
158 %attr(754,root,root) /etc/rc.d/init.d/%{name}
159 %verify(not md5 mtime size) %config(noreplace) /etc/sysconfig/%{name}
160 %{_mandir}/man8/dlm_*.8*
161 %{_mandir}/man5/dlm.conf.5*
162 %{systemdunitdir}/%{name}.service
163 %{systemdtmpfilesdir}/%{name}.conf
167 %defattr(644,root,root,755)
168 %attr(755,root,root) %{_libdir}/libdlm.so.3.*
169 %attr(755,root,root) %ghost %{_libdir}/libdlm.so.3
170 %attr(755,root,root) %{_libdir}/libdlm_lt.so.3.*
171 %attr(755,root,root) %ghost %{_libdir}/libdlm_lt.so.3
172 %attr(755,root,root) %{_libdir}/libdlmcontrol.so.3.*
173 %attr(755,root,root) %ghost %{_libdir}/libdlmcontrol.so.3
176 %defattr(644,root,root,755)
177 %attr(755,root,root) %{_libdir}/libdlm.so
178 %attr(755,root,root) %{_libdir}/libdlm_lt.so
179 %attr(755,root,root) %{_libdir}/libdlmcontrol.so
180 %{_includedir}/libdlm.h
181 %{_includedir}/libdlmcontrol.h
182 %{_mandir}/man3/dlm_*.3*
183 %{_mandir}/man3/libdlm.3*
184 %{_pkgconfigdir}/libdlm.pc
185 %{_pkgconfigdir}/libdlm_lt.pc