Sophie

Sophie

distrib > Mageia > 7 > x86_64 > by-pkgid > 68cb63efe52ff68b8dbd931d303dc5d4 > files > 3

lockdev-1.0.4-0.120111007git.13.mga7.src.rpm

%define	major	1
%define libname	%mklibname lockdev %{major}
%define devname %mklibname lockdev -d

%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}.13
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
Patch2:		0001-major-and-minor-functions-moved-to-sysmacros.h.patch
BuildRequires:	chrpath
%if %_with_perl
BuildRequires:	perl-devel
%endif
Requires:	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	%{devname}
Summary:	The development files and headers for the lockdev library
Group:		Development/C
Requires:	%{libname} = %{version}-%{release}
Provides:	lib%{name}-devel = %{version}-%{release}
Provides:	%{name}-devel = %{version}-%{release}
Obsoletes:	%{_lib}lockdev1-devel < 1.0.4-0.120111007git.6

%description -n	%{devname}
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}
%autopatch -p1

%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}\\\"" \
%configure2_5x --disable-static --enable-helper

%make_build

%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
%make_install

find %{buildroot} -name "*.la" -delete

# (tmb) hack around deps ordering
%posttrans
%_pre_groupadd lock
chown root:lock %{_sbindir}/lockdev

%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%{name}.so.%{major}
%attr(0755,root,root) %{_libdir}/lib%{name}.so.%{major}.*

%files -n %{devname}
%attr(0755,root,root) %{_libdir}/lib%{name}.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
* Fri Sep 28 2018 daviddavid <daviddavid> 1.0.4-0.120111007git.13.mga7
  (not released yet)
+ Revision: 1309349
- add patch to fix build with new glibc
+ umeabot <umeabot>
- Mageia 7 Mass Rebuild

* Fri Feb 12 2016 umeabot <umeabot> 1.0.4-0.120111007git.12.mga6
+ Revision: 956047
- Mageia 6 Mass Rebuild

* Fri Aug 21 2015 tmb <tmb> 1.0.4-0.120111007git.11.mga6
+ Revision: 867619
- rebuild for new gcc

* Wed Oct 15 2014 umeabot <umeabot> 1.0.4-0.120111007git.10.mga5
+ Revision: 745552
- Second Mageia 5 Mass Rebuild

* Tue Sep 16 2014 umeabot <umeabot> 1.0.4-0.120111007git.9.mga5
+ Revision: 681977
- Mageia 5 Mass Rebuild

* Thu Oct 31 2013 tmb <tmb> 1.0.4-0.120111007git.8.mga4
+ Revision: 548712
- hack around deps ordering issues

* Sat Oct 19 2013 umeabot <umeabot> 1.0.4-0.120111007git.7.mga4
+ Revision: 532445
- Mageia 4 Mass Rebuild

* Tue Aug 20 2013 wally <wally> 1.0.4-0.120111007git.6.mga4
+ Revision: 468440
- drop major from devel pkg name
- clean .spec a bit

* 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


* Sun Aug 01 2010 Funda Wang <fwang@mandriva.org> 1.0.3-11mdv2011.0
+ Revision: 564299
- rebuild for perl 5.12.1

* Sat Jul 24 2010 Jérôme Quelin <jquelin@mandriva.org> 1.0.3-10mdv2011.0
+ Revision: 558101
- perl 5.12 rebuild

* Mon Mar 15 2010 Oden Eriksson <oeriksson@mandriva.com> 1.0.3-9mdv2010.1
+ Revision: 520146
- rebuilt for 2010.1

* Wed Sep 02 2009 Christophe Fergeau <cfergeau@mandriva.com> 1.0.3-8mdv2010.0
+ Revision: 426001
- rebuild

* Fri Jan 09 2009 Frederic Crozat <fcrozat@mandriva.com> 1.0.3-7mdv2009.1
+ Revision: 327544
- lockdev is now setgid dialout (and no longer uucp)

* Tue Jun 17 2008 Thierry Vignaud <tv@mandriva.org> 1.0.3-6mdv2009.0
+ Revision: 223121
- rebuild

  + Pixel <pixel@mandriva.com>
    - do not call ldconfig in %%post/%%postun, it is now handled by filetriggers

* Sun Mar 02 2008 Olivier Blin <oblin@mandriva.com> 1.0.3-5mdv2008.1
+ Revision: 177814
- revert requiring the lockdev helper in the library package
  (it's only used by programs including baudboy.h actually)

* Sun Mar 02 2008 Olivier Blin <oblin@mandriva.com> 1.0.3-4mdv2008.1
+ Revision: 177809
- add back PLD hunk linking helper with shared library (instead of static)
- require the lockdev helper in the library package
- split patches based on RH (instead of the monolitic PLD patch)
- split perl Makefile patch

  + Thierry Vignaud <tv@mandriva.org>
    - fix summary-not-capitalized

* Mon Jan 21 2008 Thierry Vignaud <tv@mandriva.org> 1.0.3-2mdv2008.1
+ Revision: 155699
- add BR on perl-devel
- rebuild for new perl
- kill re-definition of %%buildroot on Pixel's request

  + Olivier Blin <oblin@mandriva.com>
    - restore BuildRoot

  + Oden Eriksson <oeriksson@mandriva.com>
    - Import lockdev



* Wed Jul 26 2006 Oden Eriksson <oeriksson@mandriva.com> 1.0.3-1mdk
- initial Mandriva package (PLD import)