diff --git a/lockdev.spec b/lockdev.spec index 11b7943..3c16619 100644 --- a/lockdev.spec +++ b/lockdev.spec @@ -1,7 +1,10 @@ +# Where lock files are stored +%global _lockdir %{_localstatedir}/lock/lockdev + Summary: A library for locking devices Name: lockdev Version: 1.0.3 -Release: 5%{?dist} +Release: 6%{?dist} License: LGPLv2 Group: System Environment/Libraries URL: http://packages.debian.org/unstable/source/lockdev @@ -19,6 +22,7 @@ Patch6: lockdev-1.0.3-man8.patch Requires(pre): shadow-utils Requires(post): glibc Requires(postun): glibc +Requires: systemd-units >= 13 BuildRequires: perl BuildRequires: perl(ExtUtils::MakeMaker) @@ -38,13 +42,6 @@ The lockdev library provides a reliable way to put an exclusive lock on devices using both FSSTND and SVr4 methods. The lockdev-devel package contains the development headers. -%package static -Summary: Static library for lockdev -Group: Development/Libraries -Requires: %{name}-devel = %{version}-%{release} - -%description static -This package contains the static version of the lockdev library. %prep %setup -q @@ -59,7 +56,7 @@ This package contains the static version of the lockdev library. cp %SOURCE1 ./docs %build -make "CFLAGS=${RPM_OPT_FLAGS} -fPIC -D_PATH_LOCK=\\\"/var/lock/lockdev\\\"" +make "CFLAGS=${RPM_OPT_FLAGS} -fPIC -D_PATH_LOCK=\\\"%{_lockdir}\\\"" %install rm -fr $RPM_BUILD_ROOT @@ -71,7 +68,14 @@ make \ install /sbin/ldconfig -n $RPM_BUILD_ROOT/%{_libdir} -mkdir -p $RPM_BUILD_ROOT/var/lock/lockdev +rm -f ${RPM_BUILD_ROOT}%{_libdir}/liblockdev.a + +mkdir -p $RPM_BUILD_ROOT%{_lockdir} +# install /etc/tmpfiles.d/lockdev.conf +mkdir -p ${RPM_BUILD_ROOT}%{_sysconfdir}/tmpfiles.d +cat > ${RPM_BUILD_ROOT}%{_sysconfdir}/tmpfiles.d/lockdev.conf </dev/null || groupadd -g 54 -r -f lock @@ -86,7 +90,8 @@ rm -fr $RPM_BUILD_ROOT %files %defattr(-,root,root) %doc LICENSE AUTHORS ChangeLog ChangeLog.old -%dir %attr(0775,root,lock) /var/lock/lockdev +%dir %attr(0775,root,lock) %{_lockdir} +%{_sysconfdir}/tmpfiles.d/lockdev.conf %attr(2711,root,lock) %{_sbindir}/lockdev %{_libdir}/*.so.* %{_mandir}/man8/* @@ -97,11 +102,11 @@ rm -fr $RPM_BUILD_ROOT %{_mandir}/man3/* %{_includedir}/* -%files static -%defattr(-,root,root,-) -%{_libdir}/*.a - %changelog +* Mon Apr 19 2010 Jiri Popelka - 1.0.3-6 +- add /etc/tmpfiles.d/lockdev.conf to enable lock directory on tmpfs (#656614) +- don't ship static library at all + * Mon Apr 19 2010 Jiri Popelka - 1.0.3-5 - Change directory for lock files from /var/lock to /var/lock/lockdev (#581884)