]> git.pld-linux.org Git - packages/dlm.git/blobdiff - dlm.spec
- updated to 4.0.9; fence is now unconditional
[packages/dlm.git] / dlm.spec
index da7d2719d8afed4969e652800346b494d374c377..553dd4a24dc1e5c27cb779f76b7422efc9a4f310 100644 (file)
--- a/dlm.spec
+++ b/dlm.spec
@@ -1,15 +1,29 @@
 Summary:       General-purpose distributed lock manager
 Summary(pl.UTF-8):     Zarządca rozproszonych blokad ogólnego przeznaczenia
 Name:          dlm
-Version:       3.99.5
-Release:       0.1
+Version:       4.0.9
+Release:       1
 License:       LGPL v2.1+, GPL v2
 Group:         Libraries
-Source0:       http://people.redhat.com/teigland/%{name}-%{version}.tar.gz
-# Source0-md5: cad4999d0c42000bf5898af34f587728
-Patch0:                %{name}-link_order.patch
-URL:           http://sources.redhat.com/cluster/dlm/
-BuildRequires: corosync-devel
+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
@@ -26,8 +40,8 @@ użytkownika.
 %package libs
 Summary:       DLM libraries
 Summary(pl.UTF-8):     Biblioteki DLM
-Group:         Development/Libraries
-Requires:      %{name} = %{version}-%{release}
+Group:         Libraries
+Obsoletes:     cluster-dlm-libs
 
 %description libs
 DLM libraries.
@@ -40,6 +54,7 @@ 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}-libs = %{version}-%{release}
+Obsoletes:     cluster-dlm-devel
 
 %description devel
 Header files and development documentation for DLM.
@@ -51,6 +66,10 @@ Pliki nagłówkowe i dokumentacja programisty dla DLM-a.
 %setup -q
 %patch0 -p1
 
+%if "%{cc_version}" < "8"
+%{__sed} -i -e 's/-fstack-clash-protection//' {dlm_controld,dlm_tool,fence,libdlm}/Makefile
+%endif
+
 %build
 %{__make} \
        PREFIX=%{_prefix} \
@@ -63,6 +82,10 @@ Pliki nagłówkowe i dokumentacja programisty dla DLM-a.
 
 %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 \
        PREFIX=%{_prefix} \
@@ -70,31 +93,60 @@ rm -rf $RPM_BUILD_ROOT
        BINDIR=%{_sbindir} \
        LIBDIR=%{_libdir} \
        MANDIR=%{_mandir} \
-       HDRDIR=%{_includedir} 
+       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)
 %doc README.license
-%attr(755,root,root) %{_sbindir}/*
+%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
-%{_mandir}/man8/*.8*
-%{_mandir}/man5/dlm.conf.5.gz
+%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 libs
 %defattr(644,root,root,755)
-%ghost %{_libdir}/libdlm.so.3
 %attr(755,root,root) %{_libdir}/libdlm.so.3.*
-%ghost %{_libdir}/libdlm_lt.so.3
+%attr(755,root,root) %ghost %{_libdir}/libdlm.so.3
 %attr(755,root,root) %{_libdir}/libdlm_lt.so.3.*
-%ghost %{_libdir}/libdlmcontrol.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 devel
 %defattr(644,root,root,755)
@@ -103,8 +155,8 @@ rm -rf $RPM_BUILD_ROOT
 %attr(755,root,root) %{_libdir}/libdlmcontrol.so
 %{_includedir}/libdlm.h
 %{_includedir}/libdlmcontrol.h
-%{_mandir}/man3/dlm_*.3*
-%{_mandir}/man3/libdlm.3*
 %{_pkgconfigdir}/libdlm.pc
 %{_pkgconfigdir}/libdlm_lt.pc
-
+%{_pkgconfigdir}/libdlmcontrol.pc
+%{_mandir}/man3/dlm_*.3*
+%{_mandir}/man3/libdlm.3*
This page took 0.104371 seconds and 4 git commands to generate.