Sophie

Sophie

distrib > Mageia > 3 > i586 > media > core-release-src > by-pkgid > 37fad466e70d025d69b6d548868d461f > files > 2

lockdev-1.0.4-0.120111007git.5.mga3.src.rpm

%define	major	1
%define libname	%mklibname lockdev %{major}

%define _with_perl 0

# Where lock files are stored
%global _lockdir /run/lock/lockdev

%global checkout 20111007git
%global co_date  2011-10-07

Summary:	A library for locking devices
Name:		lockdev
Version:	1.0.4
Release:	%mkrel 0.1%{checkout}.5
License:	LGPLv2
Group:		System/Libraries
URL:		ftp://ftp.debian.org/debian/pool/main/l/lockdev/
# This is a nightly snapshot downloaded via
# https://alioth.debian.org/snapshots.php?group_id=100443
Source0:        lockdev-%{version}.%{checkout}.tar.gz
BuildRequires:	chrpath 
%if %_with_perl
BuildRequires:  perl-devel
%endif
Requires(pre):  rpm-helper
Provides:       %name-baudboy = %version-%release
Obsoletes:      %name-baudboy < 1.0.4

%description
Lockdev provides a reliable way to put an exclusive lock to devices using both
FSSTND and SVr4 methods.

%package -n	%{libname}
Summary:	A library for locking devices
Group:		System/Libraries

%description -n	%{libname}
Lockdev provides a reliable way to put an exclusive lock to devices using both
FSSTND and SVr4 methods.

%package -n	%{libname}-devel
Summary:	The Static lockdev library and header files for the lockdev library
Group:		Development/C
Requires:	%{libname} = %{version}-%{release}
Provides:	lib%{name}-devel = %{version}-%{release}
Provides:	%{name}-devel = %{version}-%{release}

%description -n	%{libname}-devel
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
static development library and headers.

%if %_with_perl
%package -n	perl-LockDev
Summary:	LockDev - Perl extension to manage device lockfiles
Group:		Development/Perl
Requires:	%{libname} = %{version}-%{release}

%description -n	perl-LockDev
The LockDev methods act on device locks normally located in /var/lock. The lock
is acquired creating a pair of files hardlinked between them and named after
the device name (as mandated by FSSTND) and the device's major and minor
numbers (as in SVr4 locks). This permits to circumvent a problem using only the
FSSTND lock method when the same device exists under different names (for
convenience or when a device must be accessible by more than one group of
users).

The lock file names are typically in the form LCK..ttyS1 and LCK.004.065, and
their content is the pid of the process who owns the lock.
%endif

%prep

%setup -q -n lockdev-scm-%{co_date}

%build
# Generate version information from git release tag
./scripts/git-version > VERSION

# To satisfy automake
touch ChangeLog
mkdir -p m4

# Bootstrap autotools
autoreconf --verbose --force --install

CFLAGS="${RPM_OPT_FLAGS} -D_PATH_LOCK=\\\"%{_lockdir}\\\"" \
%configure --disable-static --enable-helper

%make

%if %_with_perl
pushd LockDev
    perl Makefile.PL INSTALLDIRS=vendor
    make OPTIMIZE="%{optflags}"
popd
%endif

%install
# Fix upstream permission bug #3053
chmod 644 docs/LSB.991201
%makeinstall_std

rm -f $RPM_BUILD_ROOT/%{_libdir}/*.la

%pre
%_pre_groupadd lock

%if %_with_perl
# nuke rpath
chrpath -d %{buildroot}%{perl_vendorarch}/auto/LockDev/*.so
%endif

%files 
%attr(2755,root,lock) %{_sbindir}/lockdev
%{_mandir}/man8/*

%files -n %{libname}
%doc AUTHORS ChangeLog ChangeLog.old README.debug docs/LSB.991201
%attr(0755,root,root) %{_libdir}/lib*.so.*

%files -n %{libname}-devel
%attr(0755,root,root) %{_libdir}/*.so
%attr(0644,root,root) %{_includedir}/*.h
%attr(0644,root,root) %{_mandir}/man3/lockdev.3*
%{_libdir}/pkgconfig/lockdev.pc

%if %_with_perl
%files -n perl-LockDev
%{perl_vendorarch}/LockDev.pm
%dir %{perl_vendorarch}/auto/LockDev
%attr(0755,root,root) %{perl_vendorarch}/auto/LockDev/*.so
%{_mandir}/man3/LockDev.3*
%endif


%changelog

* Sat Jan 12 2013 umeabot <umeabot> 1.0.4-0.120111007git.5.mga3
+ Revision: 358920
- Mass Rebuild - https://wiki.mageia.org/en/Feature:Mageia3MassRebuild

* Wed Jan 09 2013 cjw <cjw> 1.0.4-0.120111007git.4.mga3
+ Revision: 344352
- fix build with current autotools

* Wed Aug 08 2012 colin <colin> 1.0.4-0.120111007git.3.mga3
+ Revision: 279997
- Don't package the /var/lock/lockdev folder. It's created via systemd's tmpfiles.d already

* Thu Jan 26 2012 dmorgan <dmorgan> 1.0.4-0.120111007git.2.mga2
+ Revision: 201842
- Add rpm-helper as Requires in (pre)

* Tue Jan 17 2012 dmorgan <dmorgan> 1.0.4-0.120111007git.1.mga2
+ Revision: 197437
- Update to fedora 1.0.4 snapshot
- Remove merged/useless patches
- Create lock group
- Create %%{_localstatedir}/lock/lockdev ( needed for systemd )
- Disable perl binding ( do not build for the moment )

* Mon Dec 05 2011 barjac <barjac> 1.0.3-15.mga2
+ Revision: 177043
- Fix permissions on doc file (bug #3053)

* Sun Jun 12 2011 sander85 <sander85> 1.0.3-14.mga2
+ Revision: 104768
- Rebuild for perl 5.14

* Wed Jan 19 2011 jquelin <jquelin> 1.0.3-13.mga1
+ Revision: 23774
- rebuild

* Sat Jan 15 2011 blino <blino> 1.0.3-12.mga1
+ Revision: 18868
- remove old ldconfig scriptlets
- imported package lockdev