2024-01-06 04:59:16 +01:00
|
|
|
%define tty_groupid 4
|
|
|
|
%define majver %(echo %version | cut -d_ -f1)
|
|
|
|
%define minver %(echo %version | cut -d_ -f2)
|
|
|
|
Name: liblockdev
|
2024-01-06 04:59:16 +01:00
|
|
|
Version: 1.0.3_1.6
|
2024-01-06 04:59:16 +01:00
|
|
|
Release: 1mamba
|
|
|
|
Summary: A library to put an exclusive lock to devices
|
|
|
|
Group: System/Kernel and Hardware
|
|
|
|
Vendor: openmamba
|
|
|
|
Distribution: openmamba
|
|
|
|
Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
|
|
|
|
URL: http://ftp.debian.org/debian/pool/main/l/lockdev
|
|
|
|
Source: http://ftp.debian.org/debian/pool/main/l/lockdev/lockdev_%{majver}.orig.tar.gz
|
|
|
|
Patch0: http://ftp.debian.org/debian/pool/main/l/lockdev/lockdev_%{majver}-%{minver}.diff.gz
|
|
|
|
Patch1: %{name}-1.0.0-rh.patch
|
|
|
|
Patch2: %{name}-1.0.0-shared.patch
|
|
|
|
Patch3: %{name}-1.0.0-signal.patch
|
|
|
|
Patch4: %{name}-1.0.0-cli.patch
|
|
|
|
Patch5: %{name}-1.0.1-checkname.patch
|
|
|
|
License: LGPL
|
2024-01-06 04:59:16 +01:00
|
|
|
## AUTOBUILDREQ-BEGIN
|
|
|
|
## AUTOBUILDREQ-END
|
2024-01-06 04:59:16 +01:00
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-root
|
|
|
|
|
|
|
|
%description
|
|
|
|
Lockdev provides a reliable way to put an exclusive lock to devices using _both_ FSSTND and SVr4 methods.
|
|
|
|
|
|
|
|
%package devel
|
|
|
|
Summary: Devel package for liblockdev
|
|
|
|
Group: Development/Libraries
|
|
|
|
Requires: %{name} = %{?epoch:%epoch:}%{version}-%{release}
|
|
|
|
|
|
|
|
%description devel
|
|
|
|
Lockdev provides a reliable way to put an exclusive lock to devices using _both_ FSSTND and SVr4 methods.
|
|
|
|
This package contains static libraries and header files need for development.
|
|
|
|
|
|
|
|
%prep
|
|
|
|
%setup -q -n lockdev-%{majver}
|
|
|
|
%patch0 -p1
|
|
|
|
#%patch1 -p1
|
|
|
|
#%patch2 -p1
|
|
|
|
#%patch3 -p1
|
|
|
|
#%patch4 -p1
|
|
|
|
#%patch5 -p1
|
|
|
|
|
|
|
|
%build
|
|
|
|
%make basedir=%{_prefix} CFLAGS="%{optflags} -fPIC" CC="%{_host}-gcc" \
|
|
|
|
%if "%{stage1}" == "1"
|
|
|
|
shared static
|
|
|
|
%endif
|
|
|
|
|
|
|
|
%install
|
|
|
|
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
|
|
|
|
make install basedir=%{buildroot}%{_prefix} libdir=%{buildroot}%{_libdir}
|
|
|
|
|
|
|
|
ln -s liblockdev.so.1.0.1 %{buildroot}%{_libdir}/liblockdev.so.1
|
|
|
|
install -d %{buildroot}/var/lock/subsys
|
|
|
|
|
|
|
|
%clean
|
|
|
|
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
|
|
|
|
|
|
|
|
%post
|
|
|
|
/sbin/ldconfig
|
2024-01-06 04:59:16 +01:00
|
|
|
if [ $1 -ge 1 ]; then
|
|
|
|
groupadd tty -g %{tty_groupid} 2>/dev/null || true
|
|
|
|
fi
|
2024-01-06 04:59:16 +01:00
|
|
|
:
|
|
|
|
|
|
|
|
%postun -p /sbin/ldconfig
|
|
|
|
|
|
|
|
%files
|
|
|
|
%defattr(-,root,root)
|
|
|
|
#%attr(2755,root,tty) %{_sbindir}/lockdev
|
|
|
|
%attr(1775,root,tty) %dir %{_localstatedir}/lock
|
|
|
|
%{_libdir}/liblockdev.so.*
|
|
|
|
|
|
|
|
%files devel
|
|
|
|
%defattr(-,root,root)
|
|
|
|
%{_includedir}/*.h
|
|
|
|
%{_libdir}/*.a
|
|
|
|
%{_libdir}/*.so
|
|
|
|
%{_mandir}/man3/*
|
|
|
|
|
|
|
|
%changelog
|
2024-01-06 04:59:16 +01:00
|
|
|
* Sun Nov 16 2014 Silvan Calarco <silvan.calarco@mambasoft.it> 1.0.3_1.6-1mamba
|
|
|
|
- update to 1.0.3_1.6
|
|
|
|
|
2024-01-06 04:59:16 +01:00
|
|
|
* Sat Apr 27 2013 Automatic Build System <autodist@mambasoft.it> 1.0.3_1.5-1mamba
|
|
|
|
- update to 1.0.3_1.5
|
|
|
|
|
|
|
|
* Sun Dec 27 2009 Silvan Calarco <silvan.calarco@mambasoft.it> 1.0.3-2mamba
|
|
|
|
- rebuilt to remove executable requirements
|
|
|
|
|
|
|
|
* Mon Jan 05 2009 Silvan Calarco <silvan.calarco@mambasoft.it> 1.0.3-1mamba
|
|
|
|
- automatic update by autodist
|
|
|
|
|
|
|
|
* Fri Jan 19 2007 Davide Madrisan <davide.madrisan@qilinux.it> 1.0.1-6qilnx
|
|
|
|
- rebuild library with fPIC
|
|
|
|
|
|
|
|
* Fri Feb 10 2006 Silvan Calarco <silvan.calarco@mambasoft.it> 1.0.1-5qilnx
|
|
|
|
- create tty group
|
|
|
|
|
|
|
|
* Wed Jan 18 2006 Davide Madrisan <davide.madrisan@qilinux.it> 1.0.1-4qilnx
|
|
|
|
- specfile fixed
|
|
|
|
|
|
|
|
* Thu Apr 29 2004 Silvan Calarco <silvan.calarco@mambasoft.it> 1.0.1-3qilnx
|
|
|
|
- /var/lock directory moved here from filesystem
|
|
|
|
|
|
|
|
* Tue Apr 13 2004 Silvan Calarco <silvan.calarco@mambasoft.it> 1.0.1-2qilnx
|
|
|
|
- redhat patches added
|
|
|
|
|
|
|
|
* Fri Apr 09 2004 Silvan Calarco <silvan.calarco@mambasoft.it> 1.0.1-1qilnx
|
|
|
|
- first build
|