mv libraries to /usr/lib*

add getpcaps man page
spec file cleanup
fix URL of tarball
This commit is contained in:
Karsten Hopp 2013-05-14 13:58:22 +02:00
parent 889762dced
commit 092440402b

View File

@ -1,14 +1,17 @@
Name: libcap
Version: 2.22
Release: 4%{?dist}
Release: 5%{?dist}
Summary: Library for getting and setting POSIX.1e capabilities
Source: http://www.kernel.org/pub/linux/libs/security/linux-privs/kernel-2.6/%{name}-%{version}.tar.bz2
# Original tarball should be here, but got deleted:
#Source: http://www.kernel.org/pub/linux/libs/security/linux-privs/kernel-2.6/libcap-2.22.tar.bz2
Source: http://mirror.linux.org.au/linux/libs/security/linux-privs/libcap2/%{name}-%{version}.tar.bz2
# http://manned.org/getpcaps/299a4949/src:
Source1: getpcaps.8
Patch0: libcap-2.22-signed-sizeof-compare.patch
URL: http://ftp.kernel.org/pub/linux/libs/security/linux-privs/kernel-2.6/
License: LGPLv2+
Group: System Environment/Libraries
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: libattr-devel pam-devel
%description
@ -35,49 +38,54 @@ libcap.
%build
# libcap can not be build with _smp_mflags:
make PREFIX=%{_prefix} LIBDIR=%{_lib} SBINDIR=%{_sbindir} \
INCDIR=%{_includedir} MANDIR=%{_mandir} COPTFLAG="$RPM_OPT_FLAGS"
make PREFIX=%{_prefix} LIBDIR=%{_libdir} SBINDIR=%{_sbindir} \
INCDIR=%{_includedir} MANDIR=%{_mandir} COPTFLAG="%{optflags}"
%install
rm -rf ${RPM_BUILD_ROOT}
make install RAISE_SETFCAP=no \
DESTDIR=${RPM_BUILD_ROOT} \
LIBDIR=${RPM_BUILD_ROOT}/%{_lib} \
SBINDIR=${RPM_BUILD_ROOT}/%{_sbindir} \
INCDIR=${RPM_BUILD_ROOT}/%{_includedir} \
MANDIR=${RPM_BUILD_ROOT}/%{_mandir}/ \
COPTFLAG="$RPM_OPT_FLAGS"
mkdir -p ${RPM_BUILD_ROOT}/%{_mandir}/man{2,3,8}
#mv -f doc/*.2 ${RPM_BUILD_ROOT}/%{_mandir}/man2/
mv -f doc/*.3 ${RPM_BUILD_ROOT}/%{_mandir}/man3/
DESTDIR=%{buildroot} \
LIBDIR=%{buildroot}/%{_libdir} \
SBINDIR=%{buildroot}/%{_sbindir} \
INCDIR=%{buildroot}/%{_includedir} \
MANDIR=%{buildroot}/%{_mandir}/ \
COPTFLAG="%{optflags}"
mkdir -p %{buildroot}/%{_mandir}/man{2,3,8}
mv -f doc/*.3 %{buildroot}/%{_mandir}/man3/
cp -f %{SOURCE1} %{buildroot}/%{_mandir}/man8/
# remove static lib
rm -f ${RPM_BUILD_ROOT}/%{_lib}/libcap.a
rm -f %{buildroot}/%{_libdir}/libcap.a
chmod +x ${RPM_BUILD_ROOT}/%{_lib}/*.so.*
chmod +x %{buildroot}/%{_libdir}/*.so.*
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%files
%defattr(-,root,root,-)
/%{_lib}/*.so.*
/%{_libdir}/*.so.*
%{_sbindir}/*
%{_mandir}/man1/*
%{_mandir}/man8/*
/%{_lib}/security/pam_cap.so
/%{_libdir}/security/pam_cap.so
%doc doc/capability.notes License
%files devel
%defattr(-,root,root,-)
%{_includedir}/*
/%{_lib}/*.so
/%{_libdir}/*.so
%{_mandir}/man3/*
%clean
rm -rf ${RPM_BUILD_ROOT}
rm -rf %{buildroot}
%changelog
* Tue May 14 2013 Karsten Hopp <karsten@redhat.com> 2.22-5
- mv libraries to /usr/lib*
- add getpcaps man page
- spec file cleanup
- fix URL of tarball
* Tue May 14 2013 Karsten Hopp <karsten@redhat.com> 2.22-4
- add patch from Mark Wielaard to fix use of uninitialized memory in _fcaps_load
rhbz #911878