Merge #5 Spec file cleanup

This commit is contained in:
Steve Grubb 2021-01-26 17:01:48 +00:00
commit 5a74f8832e

View File

@ -1,13 +1,14 @@
Summary: An alternate posix capabilities library Summary: Alternate posix capabilities library
Name: libcap-ng Name: libcap-ng
Version: 0.8.2 Version: 0.8.2
Release: 2%{?dist} Release: 2%{?dist}
License: LGPLv2+ License: LGPLv2+
URL: http://people.redhat.com/sgrubb/libcap-ng URL: https://people.redhat.com/sgrubb/libcap-ng/
Source0: http://people.redhat.com/sgrubb/libcap-ng/%{name}-%{version}.tar.gz Source0: https://people.redhat.com/sgrubb/libcap-ng/%{name}-%{version}.tar.gz
# This patch can be removed when 1899540 is resolved # This patch can be removed when 1899540 is resolved
Patch1: libcap-ng-0.8.2-apply-disable.patch Patch1: libcap-ng-0.8.2-apply-disable.patch
BuildRequires: gcc BuildRequires: gcc
BuildRequires: make
BuildRequires: kernel-headers >= 2.6.11 BuildRequires: kernel-headers >= 2.6.11
BuildRequires: libattr-devel BuildRequires: libattr-devel
@ -18,7 +19,7 @@ Libcap-ng is a library that makes using posix capabilities easier
Summary: Header files for libcap-ng library Summary: Header files for libcap-ng library
License: LGPLv2+ License: LGPLv2+
Requires: kernel-headers >= 2.6.11 Requires: kernel-headers >= 2.6.11
Requires: %{name} = %{version}-%{release} Requires: %{name}%{?_isa} = %{version}-%{release}
Requires: pkgconfig Requires: pkgconfig
%description devel %description devel
@ -30,7 +31,7 @@ Summary: Python3 bindings for libcap-ng library
License: LGPLv2+ License: LGPLv2+
BuildRequires: python3-devel swig BuildRequires: python3-devel swig
BuildRequires: make BuildRequires: make
Requires: %{name} = %{version}-%{release} Requires: %{name}%{?_isa} = %{version}-%{release}
%description python3 %description python3
The libcap-ng-python3 package contains the bindings so that libcap-ng The libcap-ng-python3 package contains the bindings so that libcap-ng
@ -39,7 +40,7 @@ and can be used by python3 applications.
%package utils %package utils
Summary: Utilities for analyzing and setting file capabilities Summary: Utilities for analyzing and setting file capabilities
License: GPLv2+ License: GPLv2+
Requires: %{name} = %{version}-%{release} Requires: %{name}%{?_isa} = %{version}-%{release}
%description utils %description utils
The libcap-ng-utils package contains applications to analyze the The libcap-ng-utils package contains applications to analyze the
@ -52,18 +53,18 @@ lets you set the file system based capabilities.
%build %build
%configure --libdir=%{_libdir} --with-python=no --with-python3 %configure --libdir=%{_libdir} --with-python=no --with-python3
make CFLAGS="%{optflags}" %{?_smp_mflags} %make_build CFLAGS="%{optflags}"
%install %install
make DESTDIR="${RPM_BUILD_ROOT}" INSTALL='install -p' install %make_install
# Remove a couple things so they don't get picked up # Remove a couple things so they don't get picked up
rm -f $RPM_BUILD_ROOT/%{_libdir}/libcap-ng.la rm -f $RPM_BUILD_ROOT%{_libdir}/libcap-ng.la
rm -f $RPM_BUILD_ROOT/%{_libdir}/libcap-ng.a rm -f $RPM_BUILD_ROOT%{_libdir}/libcap-ng.a
rm -f $RPM_BUILD_ROOT/%{_libdir}/libdrop_ambient.la rm -f $RPM_BUILD_ROOT%{_libdir}/libdrop_ambient.la
rm -f $RPM_BUILD_ROOT/%{_libdir}/libdrop_ambient.a rm -f $RPM_BUILD_ROOT%{_libdir}/libdrop_ambient.a
rm -f $RPM_BUILD_ROOT/%{_libdir}/python?.?/site-packages/_capng.a rm -f $RPM_BUILD_ROOT%{_libdir}/python?.?/site-packages/_capng.a
rm -f $RPM_BUILD_ROOT/%{_libdir}/python?.?/site-packages/_capng.la rm -f $RPM_BUILD_ROOT%{_libdir}/python?.?/site-packages/_capng.la
%check %check
make check make check
@ -71,10 +72,9 @@ make check
%ldconfig_scriptlets %ldconfig_scriptlets
%files %files
%{!?_licensedir:%global license %%doc}
%license COPYING.LIB %license COPYING.LIB
/%{_libdir}/libcap-ng.so.* %{_libdir}/libcap-ng.so.*
/%{_libdir}/libdrop_ambient.so.* %{_libdir}/libdrop_ambient.so.*
%attr(0644,root,root) %{_mandir}/man7/* %attr(0644,root,root) %{_mandir}/man7/*
%files devel %files devel
@ -90,7 +90,6 @@ make check
%{python3_sitearch}/capng.py* %{python3_sitearch}/capng.py*
%files utils %files utils
%{!?_licensedir:%global license %%doc}
%license COPYING %license COPYING
%attr(0755,root,root) %{_bindir}/* %attr(0755,root,root) %{_bindir}/*
%attr(0644,root,root) %{_mandir}/man8/* %attr(0644,root,root) %{_mandir}/man8/*