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: dlm_stonith-build.patch
19 URL: http://sources.redhat.com/cluster/dlm/
20 BuildRequires: corosync-devel
21 %{?with_dlm_stonith:BuildRequires: corosync-devel}
22 Requires: %{name}-libs = %{version}-%{release}
23 Obsoletes: cluster-dlm
24 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
27 The DLM lock manager is a kernel-based VMS-like distributed lock
28 manager. It is general purpose and not specific to only GFS or CLVM.
29 Kernel and userspace locking API's are available.
31 %description -l pl.UTF-8
32 Zarządca blokad DLM to oparty na jądrze zarządca rozproszonych blokad
33 w stylu VMS. Jest ogólnego przeznaczenia, przeznaczonym nie tylko dla
34 GFS-a czy CLVM-a. Dostępne są API blokowania w jądrze i przestrzeni
38 Summary: DLM libraries
39 Summary(pl.UTF-8): Biblioteki DLM
40 Group: Development/Libraries
41 Obsoletes: cluster-dlm-libs
46 %description libs -l pl.UTF-8
50 Summary: Header files and development documentation for DLM
51 Summary(pl.UTF-8): Pliki nagłówkowe i dokumentacja programisty dla DLM-a
52 Group: Development/Libraries
53 Obsoletes: cluster-dlm-devel
54 Requires: %{name}-libs = %{version}-%{release}
57 Header files and development documentation for DLM.
59 %description devel -l pl.UTF-8
60 Pliki nagłówkowe i dokumentacja programisty dla DLM-a.
75 HDRDIR=%{_includedir} \
76 CC="%{__cc} %{rpmcflags} %{rpmcppflags} %{rpmldflags}"
78 %if %{with dlm_stonith}
85 HDRDIR=%{_includedir} \
86 CC="%{__cc} %{rpmcflags} %{rpmcppflags} %{rpmldflags}"
90 rm -rf $RPM_BUILD_ROOT
91 install -d $RPM_BUILD_ROOT{%{systemdunitdir},/etc/{rc.d/init.d,sysconfig}} \
92 $RPM_BUILD_ROOT{/var/run/dlm,%{systemdtmpfilesdir}}
95 DESTDIR=$RPM_BUILD_ROOT \
101 HDRDIR=%{_includedir}
103 %if %{with dlm_stonith}
104 %{__make} -C fence install \
105 DESTDIR=$RPM_BUILD_ROOT \
111 HDRDIR=%{_includedir}
114 install init/%{name}.service $RPM_BUILD_ROOT%{systemdunitdir}
115 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
116 install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/%{name}
117 install %{SOURCE3} $RPM_BUILD_ROOT%{systemdtmpfilesdir}/%{name}.conf
120 rm -rf $RPM_BUILD_ROOT
123 %systemd_post %{name}.service
126 /sbin/chkconfig --add %{name}
127 %service %{name} restart
128 %systemd_preun %{name}.service
131 if [ "$1" = "0" ]; then
132 %service -q %{name} stop
133 /sbin/chkconfig --del %{name}
137 %post libs -p /sbin/ldconfig
138 %postun libs -p /sbin/ldconfig
141 %defattr(644,root,root,755)
143 %attr(755,root,root) %{_sbindir}/*
144 /lib/udev/rules.d/51-dlm.rules
145 %attr(754,root,root) /etc/rc.d/init.d/%{name}
146 %verify(not md5 mtime size) %config(noreplace) /etc/sysconfig/%{name}
148 %{_mandir}/man5/dlm.conf.5*
149 %{systemdunitdir}/%{name}.service
150 %{systemdtmpfilesdir}/%{name}.conf
154 %defattr(644,root,root,755)
155 %ghost %{_libdir}/libdlm.so.3
156 %attr(755,root,root) %{_libdir}/libdlm.so.3.*
157 %ghost %{_libdir}/libdlm_lt.so.3
158 %attr(755,root,root) %{_libdir}/libdlm_lt.so.3.*
159 %ghost %{_libdir}/libdlmcontrol.so.3
160 %attr(755,root,root) %{_libdir}/libdlmcontrol.so.3.*
163 %defattr(644,root,root,755)
164 %attr(755,root,root) %{_libdir}/libdlm.so
165 %attr(755,root,root) %{_libdir}/libdlm_lt.so
166 %attr(755,root,root) %{_libdir}/libdlmcontrol.so
167 %{_includedir}/libdlm.h
168 %{_includedir}/libdlmcontrol.h
169 %{_mandir}/man3/dlm_*.3*
170 %{_mandir}/man3/libdlm.3*
171 %{_pkgconfigdir}/libdlm.pc
172 %{_pkgconfigdir}/libdlm_lt.pc