Initial import (#782220)

This commit is contained in:
Fabio M. Di Nitto 2012-02-01 08:13:13 +01:00
parent 9b742c3817
commit be2324057f
3 changed files with 101 additions and 0 deletions

1
.gitignore vendored
View File

@ -0,0 +1 @@
/dlm-3.99.0.tar.gz

99
dlm.spec Normal file
View File

@ -0,0 +1,99 @@
Name: dlm
Version: 3.99.0
Release: 1%{?dist}
License: GPLv2 and GPLv2+ and LGPLv2+
# For a breakdown of the licensing, see README.license
Group: System Environment/Kernel
Summary: Cluster control daemon and tool
URL: https://fedorahosted.org/cluster
BuildRequires: glibc-kernheaders
BuildRequires: corosynclib-devel
BuildRequires: systemd-units
Requires: %{name}-lib = %{version}-%{release}
Source0: http://people.redhat.com/teigland/%{name}-%{version}.tar.gz
BuildRequires: corosync >= 1.99.0
Requires(post): systemd-units
Requires(preun): systemd-units
Requires(postun): systemd-units
%description
The kernel dlm requires a user daemon to control cluster membership.
%prep
%setup -q
%build
# upstream does not require configure
# upstream does not support _smp_mflags
CFLAGS=$RPM_OPT_FLAGS make
%install
rm -rf $RPM_BUILD_ROOT
make install LIBDIR=%{_libdir} DESTDIR=$RPM_BUILD_ROOT
install -Dm 0644 init/dlm.service %{buildroot}%{_unitdir}/dlm.service
%post
if [ $1 -eq 1 ] ; then
/bin/systemctl daemon-reload >/dev/null 2>&1 || :
fi
%preun
if [ $1 -eq 0 ] ; then
/bin/systemctl --no-reload disable dlm.service > /dev/null 2>&1 || :
/bin/systemctl stop dlm.service > /dev/null 2>&1 || :
fi
%postun
/bin/systemctl daemon-reload >/dev/null 2>&1 || :
if [ $1 -ge 1 ] ; then
/bin/systemctl try-restart dlm.service >/dev/null 2>&1 || :
fi
%files
%defattr(-,root,root,-)
%doc README.license
%{_unitdir}/dlm.service
%{_sbindir}/dlm_controld
%{_sbindir}/dlm_tool
%{_mandir}/man8/dlm*
%{_mandir}/man3/*dlm*
%package lib
Summary: Library for %{name}
Group: System Environment/Libraries
%description lib
The %{name}-lib package contains the libraries needed to use the dlm
from userland applications.
%post lib -p /sbin/ldconfig
%postun lib -p /sbin/ldconfig
%files lib
%defattr(-,root,root,-)
/lib/udev/rules.d/*-dlm.rules
%{_libdir}/libdlm*.so.*
%package devel
Summary: Development files for %{name}
Group: Development/Libraries
Requires: %{name}-lib = %{version}-%{release}
%description devel
The %{name}-devel package contains libraries and header files for
developing applications that use %{name}.
%files devel
%defattr(-,root,root,-)
%{_libdir}/libdlm*.so
%{_includedir}/libdlm*.h
%{_libdir}/pkgconfig/*.pc
%changelog
* Tue Jan 24 2012 David Teigland <teigland@redhat.com> - 3.99.0-1
- initial package

View File

@ -0,0 +1 @@
4cd371abe5d977b386796d8d0b9066d0 dlm-3.99.0.tar.gz