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: 2db31a9728ede91a202ff6f3e5accf8d
14 Source2: %{name}.sysconfig
15 Source3: %{name}.tmpfiles
17 Patch0: %{name}-perms.patch
18 URL: http://sources.redhat.com/cluster/dlm/
19 BuildRequires: corosync-devel >= 2.0
20 %{?with_dlm_stonith:BuildRequires: pacemaker-devel >= 1.1}
21 BuildRequires: rpmbuild(macros) >= 1.644
22 BuildRequires: systemd-devel
23 Requires: %{name}-libs = %{version}-%{release}
25 Requires: systemd-units >= 38
26 Requires(post,preun): /sbin/chkconfig
27 Obsoletes: cluster-dlm
28 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
31 The DLM lock manager is a kernel-based VMS-like distributed lock
32 manager. It is general purpose and not specific to only GFS or CLVM.
33 Kernel and userspace locking API's are available.
35 %description -l pl.UTF-8
36 Zarządca blokad DLM to oparty na jądrze zarządca rozproszonych blokad
37 w stylu VMS. Jest ogólnego przeznaczenia, przeznaczonym nie tylko dla
38 GFS-a czy CLVM-a. Dostępne są API blokowania w jądrze i przestrzeni
42 Summary: DLM libraries
43 Summary(pl.UTF-8): Biblioteki DLM
44 Group: Development/Libraries
45 Obsoletes: cluster-dlm-libs
50 %description libs -l pl.UTF-8
54 Summary: Header files and development documentation for DLM
55 Summary(pl.UTF-8): Pliki nagłówkowe i dokumentacja programisty dla DLM-a
56 Group: Development/Libraries
57 Requires: %{name}-libs = %{version}-%{release}
58 Obsoletes: cluster-dlm-devel
61 Header files and development documentation for DLM.
63 %description devel -l pl.UTF-8
64 Pliki nagłówkowe i dokumentacja programisty dla DLM-a.
77 HDRDIR=%{_includedir} \
78 CC="%{__cc} %{rpmcflags} %{rpmcppflags} %{rpmldflags}"
80 %if %{with dlm_stonith}
87 HDRDIR=%{_includedir} \
88 CC="%{__cc} %{rpmcflags} %{rpmcppflags} %{rpmldflags}"
92 rm -rf $RPM_BUILD_ROOT
93 install -d $RPM_BUILD_ROOT{%{systemdunitdir},/etc/{rc.d/init.d,sysconfig}} \
94 $RPM_BUILD_ROOT%{_sysconfdir}/%{name} \
95 $RPM_BUILD_ROOT{/var/run/dlm,%{systemdtmpfilesdir}}
98 DESTDIR=$RPM_BUILD_ROOT \
104 HDRDIR=%{_includedir}
106 %if %{with dlm_stonith}
107 %{__make} -C fence install \
108 DESTDIR=$RPM_BUILD_ROOT \
114 HDRDIR=%{_includedir}
117 install init/%{name}.service $RPM_BUILD_ROOT%{systemdunitdir}
118 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
119 install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/%{name}
120 install %{SOURCE3} $RPM_BUILD_ROOT%{systemdtmpfilesdir}/%{name}.conf
121 install %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/%{name}.conf
124 rm -rf $RPM_BUILD_ROOT
127 %systemd_post %{name}.service
130 /sbin/chkconfig --add %{name}
131 %service %{name} restart
132 %systemd_preun %{name}.service
135 if [ "$1" = "0" ]; then
136 %service -q %{name} stop
137 /sbin/chkconfig --del %{name}
141 %post libs -p /sbin/ldconfig
142 %postun libs -p /sbin/ldconfig
145 %defattr(644,root,root,755)
147 %attr(755,root,root) %{_sbindir}/*
148 %dir %{_sysconfdir}/%{name}
149 %verify(not md5 mtime size) %config(noreplace) %{_sysconfdir}/%{name}/%{name}.conf
150 /lib/udev/rules.d/51-dlm.rules
151 %attr(754,root,root) /etc/rc.d/init.d/%{name}
152 %verify(not md5 mtime size) %config(noreplace) /etc/sysconfig/%{name}
154 %{_mandir}/man5/dlm.conf.5*
155 %{systemdunitdir}/%{name}.service
156 %{systemdtmpfilesdir}/%{name}.conf
160 %defattr(644,root,root,755)
161 %ghost %{_libdir}/libdlm.so.3
162 %attr(755,root,root) %{_libdir}/libdlm.so.3.*
163 %ghost %{_libdir}/libdlm_lt.so.3
164 %attr(755,root,root) %{_libdir}/libdlm_lt.so.3.*
165 %ghost %{_libdir}/libdlmcontrol.so.3
166 %attr(755,root,root) %{_libdir}/libdlmcontrol.so.3.*
169 %defattr(644,root,root,755)
170 %attr(755,root,root) %{_libdir}/libdlm.so
171 %attr(755,root,root) %{_libdir}/libdlm_lt.so
172 %attr(755,root,root) %{_libdir}/libdlmcontrol.so
173 %{_includedir}/libdlm.h
174 %{_includedir}/libdlmcontrol.h
175 %{_mandir}/man3/dlm_*.3*
176 %{_mandir}/man3/libdlm.3*
177 %{_pkgconfigdir}/libdlm.pc
178 %{_pkgconfigdir}/libdlm_lt.pc