liblockdev/liblockdev.spec

126 lines
3.8 KiB
RPMSpec
Raw Normal View History

%define tty_groupid 4
%define majver %(echo %version | cut -d_ -f1)
%define minver %(echo %version | cut -d_ -f2)
Name: liblockdev
Version: 1.0.3_1.6
Release: 2mamba
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
Patch6: liblockdev-1.0.3_1.6-gcc-11.0.patch
License: LGPL
## AUTOBUILDREQ-BEGIN
BuildRequires: glibc-devel
## AUTOBUILDREQ-END
%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.
%debug_package
%prep
%setup -q -n lockdev-%{majver}
%patch0 -p1
#%patch1 -p1
#%patch2 -p1
#%patch3 -p1
#%patch4 -p1
#%patch5 -p1
%patch6 -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}
mv %{buildroot}%{_libdir}/liblockdev.%{majver}.so %{buildroot}%{_libdir}/liblockdev.so.%{majver}
ln -s liblockdev.so.%{majver} %{buildroot}%{_libdir}/liblockdev.so.1
ln -s liblockdev.so.%{majver} %{buildroot}%{_libdir}/liblockdev.so
install -d %{buildroot}/var/lock/subsys
chmod +x %{buildroot}%{_libdir}/liblockdev.so.%{majver}
%clean
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
%post
/sbin/ldconfig
if [ $1 -ge 1 ]; then
groupadd tty -g %{tty_groupid} 2>/dev/null || true
fi
:
%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
* Tue Aug 24 2021 Silvan Calarco <silvan.calarco@mambasoft.it> 1.0.3_1.6-2mamba
- rebuilt with ttylock.h fixes and other specfile fixes
* Sun Nov 16 2014 Silvan Calarco <silvan.calarco@mambasoft.it> 1.0.3_1.6-1mamba
- update to 1.0.3_1.6
* 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