X-Git-Url: http://git.pld-linux.org/?a=blobdiff_plain;f=dlm.spec;h=553dd4a24dc1e5c27cb779f76b7422efc9a4f310;hb=HEAD;hp=eece309a412fb76807485465888a39ff984687d5;hpb=a1e5b0df08abe5a0fb8e986be938707ed2f1c76c;p=packages%2Fdlm.git diff --git a/dlm.spec b/dlm.spec index eece309..553dd4a 100644 --- a/dlm.spec +++ b/dlm.spec @@ -1,16 +1,29 @@ -# -# Conditional build: -Summary: general-purpose distributed lock manager +Summary: General-purpose distributed lock manager +Summary(pl.UTF-8): Zarządca rozproszonych blokad ogólnego przeznaczenia Name: dlm -%define snap 20040625 -Version: 0.0.0.%{snap}.1 +Version: 4.0.9 Release: 1 -License: GPL +License: LGPL v2.1+, GPL v2 Group: Libraries -Source0: %{name}.tar.gz -# Source0-md5: 2aad29664265c6d2b4ab43276d4a45fd -Patch0: %{name}-DESTDIR.patch -URL: http://sources.redhat.com/cluster/ +Source0: https://releases.pagure.org/dlm/%{name}-%{version}.tar.gz +# Source0-md5: b05551993126679926a432ea5bdf9689 +Source1: %{name}.init +Source2: %{name}.sysconfig +Source3: %{name}.tmpfiles +Source4: %{name}.conf +Patch0: old_udev_dir.patch +URL: http://www.sourceware.org/cluster/dlm/ +BuildRequires: corosync-devel >= 2.0 +BuildRequires: libxml2-devel >= 2.0 +BuildRequires: pacemaker-devel >= 1.1 +BuildRequires: pkgconfig +BuildRequires: rpmbuild(macros) >= 1.644 +BuildRequires: systemd-devel +Requires: %{name}-libs = %{version}-%{release} +Requires: rc-scripts +Requires: systemd-units >= 208-8 +Requires(post,preun): /sbin/chkconfig +Obsoletes: cluster-dlm BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) %description @@ -18,59 +31,132 @@ The DLM lock manager is a kernel-based VMS-like distributed lock manager. It is general purpose and not specific to only GFS or CLVM. Kernel and userspace locking API's are available. +%description -l pl.UTF-8 +Zarządca blokad DLM to oparty na jądrze zarządca rozproszonych blokad +w stylu VMS. Jest ogólnego przeznaczenia, przeznaczonym nie tylko dla +GFS-a czy CLVM-a. Dostępne są API blokowania w jądrze i przestrzeni +użytkownika. + +%package libs +Summary: DLM libraries +Summary(pl.UTF-8): Biblioteki DLM +Group: Libraries +Obsoletes: cluster-dlm-libs + +%description libs +DLM libraries. + +%description libs -l pl.UTF-8 +Biblioteki DLM. + %package devel -Summary: Header files and development documentation for %{name} +Summary: Header files and development documentation for DLM +Summary(pl.UTF-8): Pliki nagłówkowe i dokumentacja programisty dla DLM-a Group: Development/Libraries -Requires: %{name} = %{epoch}:%{version}-%{release} +Requires: %{name}-libs = %{version}-%{release} +Obsoletes: cluster-dlm-devel %description devel -Header files and development documentation for %{name}. - -%package static -Summary: Static %{name} library -Group: Development/Libraries -Requires: %{name}-devel = %{epoch}:%{version}-%{release} +Header files and development documentation for DLM. -%description static -Static %{name} library. +%description devel -l pl.UTF-8 +Pliki nagłówkowe i dokumentacja programisty dla DLM-a. %prep -%setup -q -n %{name} +%setup -q %patch0 -p1 +%if "%{cc_version}" < "8" +%{__sed} -i -e 's/-fstack-clash-protection//' {dlm_controld,dlm_tool,fence,libdlm}/Makefile +%endif + %build -./configure \ - --incdir=%{_includedir} \ - --kernel_src=%{_kernelsrcdir} \ - --libdir=%{_libdir} \ - --mandir=%{_mandir} \ - --prefix=%{_prefix} \ - --sbindir=%{_sbindir} %{__make} \ - CC="%{__cc}" + PREFIX=%{_prefix} \ + LIBNUM=%{_lib} \ + BINDIR=%{_sbindir} \ + LIBDIR=%{_libdir} \ + MANDIR=%{_mandir} \ + HDRDIR=%{_includedir} \ + CC="%{__cc} %{rpmcflags} %{rpmcppflags} %{rpmldflags}" %install rm -rf $RPM_BUILD_ROOT +install -d $RPM_BUILD_ROOT{%{systemdunitdir},/etc/{rc.d/init.d,sysconfig}} \ + $RPM_BUILD_ROOT%{_sysconfdir}/%{name} \ + $RPM_BUILD_ROOT{/var/run/dlm,%{systemdtmpfilesdir}} %{__make} install \ - DESTDIR=$RPM_BUILD_ROOT + DESTDIR=$RPM_BUILD_ROOT \ + PREFIX=%{_prefix} \ + LIBNUM=%{_lib} \ + BINDIR=%{_sbindir} \ + LIBDIR=%{_libdir} \ + MANDIR=%{_mandir} \ + HDRDIR=%{_includedir} + +cp -p init/%{name}.service $RPM_BUILD_ROOT%{systemdunitdir} +install -p %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name} +cp -p %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/%{name} +cp -p %{SOURCE3} $RPM_BUILD_ROOT%{systemdtmpfilesdir}/%{name}.conf +cp -p %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/%{name}.conf %clean rm -rf $RPM_BUILD_ROOT -%post -p /sbin/ldconfig -%postun -p /sbin/ldconfig +%post +/sbin/chkconfig --add %{name} +%service %{name} restart +%systemd_post %{name}.service + +%preun +if [ "$1" = "0" ]; then + %service -q %{name} stop + /sbin/chkconfig --del %{name} +fi +%systemd_preun %{name}.service + +%postun +%systemd_reload + +%post libs -p /sbin/ldconfig +%postun libs -p /sbin/ldconfig %files %defattr(644,root,root,755) -%attr(755,root,root) %{_libdir}/*.so.* +%doc README.license +%attr(755,root,root) %{_sbindir}/dlm_controld +%attr(755,root,root) %{_sbindir}/dlm_stonith +%attr(755,root,root) %{_sbindir}/dlm_tool +%dir %{_sysconfdir}/%{name} +%verify(not md5 mtime size) %config(noreplace) %{_sysconfdir}/%{name}/%{name}.conf +/lib/udev/rules.d/51-dlm.rules +%attr(754,root,root) /etc/rc.d/init.d/%{name} +%verify(not md5 mtime size) %config(noreplace) /etc/sysconfig/%{name} +%{_mandir}/man8/dlm_*.8* +%{_mandir}/man5/dlm.conf.5* +%{systemdunitdir}/%{name}.service +%{systemdtmpfilesdir}/%{name}.conf +%dir /var/run/dlm -%files devel +%files libs %defattr(644,root,root,755) -%doc doc/*.txt -%{_includedir}/*.h -%attr(755,root,root) %{_libdir}/*.so +%attr(755,root,root) %{_libdir}/libdlm.so.3.* +%attr(755,root,root) %ghost %{_libdir}/libdlm.so.3 +%attr(755,root,root) %{_libdir}/libdlm_lt.so.3.* +%attr(755,root,root) %ghost %{_libdir}/libdlm_lt.so.3 +%attr(755,root,root) %{_libdir}/libdlmcontrol.so.3.* +%attr(755,root,root) %ghost %{_libdir}/libdlmcontrol.so.3 -%files static +%files devel %defattr(644,root,root,755) -%{_libdir}/*.a +%attr(755,root,root) %{_libdir}/libdlm.so +%attr(755,root,root) %{_libdir}/libdlm_lt.so +%attr(755,root,root) %{_libdir}/libdlmcontrol.so +%{_includedir}/libdlm.h +%{_includedir}/libdlmcontrol.h +%{_pkgconfigdir}/libdlm.pc +%{_pkgconfigdir}/libdlm_lt.pc +%{_pkgconfigdir}/libdlmcontrol.pc +%{_mandir}/man3/dlm_*.3* +%{_mandir}/man3/libdlm.3*