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 URL: http://sources.redhat.com/cluster/dlm/
19 BuildRequires: corosync-devel >= 2.0
20 %{?with_dlm_stonith:BuildRequires: libxml2-devel >= 2.0}
21 %{?with_dlm_stonith:BuildRequires: pacemaker-devel >= 1.1}
22 BuildRequires: pkgconfig
23 BuildRequires: rpmbuild(macros) >= 1.644
24 BuildRequires: systemd-devel
25 Requires: %{name}-libs = %{version}-%{release}
27 Requires: systemd-units >= 38
28 Requires(post,preun): /sbin/chkconfig
29 Obsoletes: cluster-dlm
30 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
33 The DLM lock manager is a kernel-based VMS-like distributed lock
34 manager. It is general purpose and not specific to only GFS or CLVM.
35 Kernel and userspace locking API's are available.
37 %description -l pl.UTF-8
38 Zarządca blokad DLM to oparty na jądrze zarządca rozproszonych blokad
39 w stylu VMS. Jest ogólnego przeznaczenia, przeznaczonym nie tylko dla
40 GFS-a czy CLVM-a. Dostępne są API blokowania w jądrze i przestrzeni
44 Summary: DLM libraries
45 Summary(pl.UTF-8): Biblioteki DLM
46 Group: Development/Libraries
47 Obsoletes: cluster-dlm-libs
52 %description libs -l pl.UTF-8
56 Summary: Header files and development documentation for DLM
57 Summary(pl.UTF-8): Pliki nagłówkowe i dokumentacja programisty dla DLM-a
58 Group: Development/Libraries
59 Requires: %{name}-libs = %{version}-%{release}
60 Obsoletes: cluster-dlm-devel
63 Header files and development documentation for DLM.
65 %description devel -l pl.UTF-8
66 Pliki nagłówkowe i dokumentacja programisty dla DLM-a.
78 HDRDIR=%{_includedir} \
79 CC="%{__cc} %{rpmcflags} %{rpmcppflags} %{rpmldflags}"
81 %if %{with dlm_stonith}
88 HDRDIR=%{_includedir} \
89 CC="%{__cc} %{rpmcflags} %{rpmcppflags} %{rpmldflags}"
93 rm -rf $RPM_BUILD_ROOT
94 install -d $RPM_BUILD_ROOT{%{systemdunitdir},/etc/{rc.d/init.d,sysconfig}} \
95 $RPM_BUILD_ROOT%{_sysconfdir}/%{name} \
96 $RPM_BUILD_ROOT{/var/run/dlm,%{systemdtmpfilesdir}}
99 DESTDIR=$RPM_BUILD_ROOT \
105 HDRDIR=%{_includedir}
107 %if %{with dlm_stonith}
108 %{__make} -C fence install \
109 DESTDIR=$RPM_BUILD_ROOT \
115 HDRDIR=%{_includedir}
118 install init/%{name}.service $RPM_BUILD_ROOT%{systemdunitdir}
119 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
120 install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/%{name}
121 install %{SOURCE3} $RPM_BUILD_ROOT%{systemdtmpfilesdir}/%{name}.conf
122 install %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/%{name}.conf
125 rm -rf $RPM_BUILD_ROOT
128 %systemd_post %{name}.service
131 /sbin/chkconfig --add %{name}
132 %service %{name} restart
133 %systemd_preun %{name}.service
136 if [ "$1" = "0" ]; then
137 %service -q %{name} stop
138 /sbin/chkconfig --del %{name}
142 %post libs -p /sbin/ldconfig
143 %postun libs -p /sbin/ldconfig
146 %defattr(644,root,root,755)
148 %{?with_dlm_stonith:%attr(755,root,root) %{_sbindir}/dlm_controld}
149 %attr(755,root,root) %{_sbindir}/dlm_stonith
150 %attr(755,root,root) %{_sbindir}/dlm_tool
151 %dir %{_sysconfdir}/%{name}
152 %verify(not md5 mtime size) %config(noreplace) %{_sysconfdir}/%{name}/%{name}.conf
153 /lib/udev/rules.d/51-dlm.rules
154 %attr(754,root,root) /etc/rc.d/init.d/%{name}
155 %verify(not md5 mtime size) %config(noreplace) /etc/sysconfig/%{name}
156 %{_mandir}/man8/dlm_controld.8*
157 %{_mandir}/man8/dlm_tool.8*
158 %{_mandir}/man5/dlm.conf.5*
159 %{systemdunitdir}/%{name}.service
160 %{systemdtmpfilesdir}/%{name}.conf
164 %defattr(644,root,root,755)
165 %attr(755,root,root) %{_libdir}/libdlm.so.3.*
166 %attr(755,root,root) %ghost %{_libdir}/libdlm.so.3
167 %attr(755,root,root) %{_libdir}/libdlm_lt.so.3.*
168 %attr(755,root,root) %ghost %{_libdir}/libdlm_lt.so.3
169 %attr(755,root,root) %{_libdir}/libdlmcontrol.so.3.*
170 %attr(755,root,root) %ghost %{_libdir}/libdlmcontrol.so.3
173 %defattr(644,root,root,755)
174 %attr(755,root,root) %{_libdir}/libdlm.so
175 %attr(755,root,root) %{_libdir}/libdlm_lt.so
176 %attr(755,root,root) %{_libdir}/libdlmcontrol.so
177 %{_includedir}/libdlm.h
178 %{_includedir}/libdlmcontrol.h
179 %{_mandir}/man3/dlm_*.3*
180 %{_mandir}/man3/libdlm.3*
181 %{_pkgconfigdir}/libdlm.pc
182 %{_pkgconfigdir}/libdlm_lt.pc