forked from pool/libcap
Accepting request 285938 from home:posophe:branches:Base:System
Update and fix OBS-URL: https://build.opensuse.org/request/show/285938 OBS-URL: https://build.opensuse.org/package/show/Base:System/libcap?expand=0&rev=20
This commit is contained in:
44
libcap.spec
44
libcap.spec
@@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package libcap
|
||||
#
|
||||
# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
||||
# Copyright (c) 2015 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
@@ -20,17 +20,14 @@ Name: libcap
|
||||
Summary: Library for Capabilities (linux-privs) Support
|
||||
License: BSD-3-Clause and GPL-2.0
|
||||
Group: System/Libraries
|
||||
Version: 2.22
|
||||
Version: 2.24
|
||||
Release: 0
|
||||
Source: ftp://ftp.de.kernel.org/pub/linux/libs/security/linux-privs/libcap2/libcap-%{version}.tar.bz2
|
||||
Source: https://www.kernel.org/pub/linux/libs/security/linux-privs/libcap2/libcap-%{version}.tar.xz
|
||||
Source2: baselibs.conf
|
||||
Url: https://sites.google.com/site/fullycapable/
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
Patch0: libcap-nolibattr.patch
|
||||
%if 0%{?suse_version} > 1030
|
||||
BuildRequires: fdupes
|
||||
%endif
|
||||
%define debug_package_requires libcap2 = %{version}-%{release}
|
||||
BuildRequires: pkg-config
|
||||
|
||||
%description
|
||||
Capabilities are a measure to limit the omnipotence of the superuser.
|
||||
@@ -40,8 +37,6 @@ control. Without kernel patches, you can use this library to drop
|
||||
capabilities within setuid binaries. If you use patches, this can be
|
||||
done automatically by the kernel.
|
||||
|
||||
|
||||
|
||||
%package -n libcap2
|
||||
Summary: Library for Capabilities (linux-privs) Support
|
||||
Group: System/Libraries
|
||||
@@ -72,8 +67,6 @@ draft 15 capabilities.
|
||||
Install libcap-devel if you want to develop or compile applications
|
||||
using libcap.
|
||||
|
||||
|
||||
|
||||
%package progs
|
||||
Summary: Libcap utility programs
|
||||
Group: System/Filesystems
|
||||
@@ -82,26 +75,26 @@ Group: System/Filesystems
|
||||
This package contains utility programs handling capabilities via
|
||||
libcap.
|
||||
|
||||
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
%patch0 -p1
|
||||
%build
|
||||
# lib=%{_lib} make %{?_smp_mflags} COPTFLAG="$RPM_OPT_FLAGS"
|
||||
lib=%{_lib} make %{?_smp_mflags} DEBUG="-g $RPM_OPT_FLAGS"
|
||||
make prefix=%{_prefix} lib=%{_lib} LIBDIR=%{_libdir} SBINDIR=%{_sbindir} \
|
||||
INCDIR=%{_includedir} MANDIR=%{_mandir} DEBUG="-g %{optflags}"
|
||||
|
||||
%install
|
||||
make install DESTDIR=$RPM_BUILD_ROOT LIBDIR=$RPM_BUILD_ROOT/%{_lib} MANDIR=$RPM_BUILD_ROOT%{_mandir} RAISE_SETFCAP=no
|
||||
make install RAISE_SETFCAP=no \
|
||||
DESTDIR=%{buildroot} \
|
||||
LIBDIR=%{buildroot}/%{_libdir} \
|
||||
SBINDIR=%{buildroot}/%{_sbindir} \
|
||||
INCDIR=%{buildroot}/%{_includedir} \
|
||||
MANDIR=%{buildroot}/%{_mandir}/ \
|
||||
PKGCONFIGDIR=%{buildroot}/%{_libdir}/pkgconfig/
|
||||
mkdir -p %{buildroot}/%{_mandir}/man{2,3,8}
|
||||
mv -f doc/*.3 %{buildroot}/%{_mandir}/man3/
|
||||
# remove unneeded files
|
||||
rm -f $RPM_BUILD_ROOT/%{_lib}/*.*a
|
||||
# move *.so file to libdir and relink
|
||||
rm -f $RPM_BUILD_ROOT/%{_lib}/*.so
|
||||
mkdir -p $RPM_BUILD_ROOT%{_libdir}
|
||||
ln -s /%{_lib}/libcap.so.2 $RPM_BUILD_ROOT%{_libdir}/libcap.so
|
||||
%if 0%{?suse_version} > 1030
|
||||
rm -f $RPM_BUILD_ROOT/%{_libdir}/*.*a
|
||||
%fdupes -s $RPM_BUILD_ROOT
|
||||
%endif
|
||||
|
||||
%post -n libcap2 -p /sbin/ldconfig
|
||||
|
||||
@@ -109,19 +102,20 @@ ln -s /%{_lib}/libcap.so.2 $RPM_BUILD_ROOT%{_libdir}/libcap.so
|
||||
|
||||
%files -n libcap2
|
||||
%defattr(-,root,root)
|
||||
%attr(755,root,root) /%{_lib}/libcap.so.*
|
||||
%attr(755,root,root)%{_libdir}/libcap.so.*
|
||||
|
||||
%files progs
|
||||
%defattr(-,root,root)
|
||||
%{_mandir}/man1/*
|
||||
%{_mandir}/man8/*
|
||||
/sbin/*
|
||||
%{_sbindir}/*
|
||||
|
||||
%files devel
|
||||
%defattr(-,root,root)
|
||||
%doc License README CHANGELOG
|
||||
%{_includedir}/sys/capability.h
|
||||
%{_libdir}/*.so
|
||||
%{_libdir}/pkgconfig/%{name}.pc
|
||||
%{_mandir}/man3/*
|
||||
|
||||
%changelog
|
||||
|
Reference in New Issue
Block a user