forked from pool/libcap-ng
Accepting request 104166 from security
- Move libraries back to %{_libdir}, /usr merge project - cross-build workaround: make sure no attempt is made to build python stuff even if it's installed on the host system - Move libraries back to %{_libdir}, /usr merge project (forwarded request 104152 from elvigia) OBS-URL: https://build.opensuse.org/request/show/104166 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/libcap-ng?expand=0&rev=17
This commit is contained in:
commit
a75d2a7741
@ -1,3 +1,14 @@
|
||||
-------------------------------------------------------------------
|
||||
Sun Feb 12 17:25:23 UTC 2012 - crrodriguez@opensuse.org
|
||||
|
||||
- Move libraries back to %{_libdir}, /usr merge project
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Oct 5 15:06:00 UTC 2011 - uli@suse.com
|
||||
|
||||
- cross-build workaround: make sure no attempt is made to build
|
||||
python stuff even if it's installed on the host system
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Aug 31 01:49:59 UTC 2011 - crrodriguez@opensuse.org
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package libcap-ng-python
|
||||
#
|
||||
# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
||||
# Copyright (c) 2012 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,14 +20,14 @@
|
||||
%{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")}
|
||||
|
||||
Summary: An alternate POSIX capabilities library
|
||||
License: LGPL-2.1+
|
||||
Group: System/Libraries
|
||||
|
||||
Name: libcap-ng-python
|
||||
Version: 0.6.6
|
||||
Release: 1
|
||||
Release: 0
|
||||
%define soname 0
|
||||
%define rname libcap-ng
|
||||
License: LGPL-2.1+
|
||||
Group: System/Libraries
|
||||
Url: http://people.redhat.com/sgrubb/libcap-ng
|
||||
# http://people.redhat.com/sgrubb/libcap-ng/libcap-ng-%{version}.tar.gz
|
||||
Source0: libcap-ng-%{version}.tar.bz2
|
||||
@ -36,7 +36,9 @@ Source2: baselibs.conf
|
||||
Source99: libcap-ng.rpmlintrc
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
BuildRequires: kernel-headers >= 2.6.11
|
||||
BuildRequires: libattr-devel pkg-config python-base
|
||||
BuildRequires: libattr-devel
|
||||
BuildRequires: pkg-config
|
||||
BuildRequires: python-base
|
||||
|
||||
%description
|
||||
Libcap-ng is a library that makes using posix capabilities easier
|
||||
@ -82,7 +84,8 @@ lets you set the file system based capabilities.
|
||||
Summary: Python bindings for libcap-ng library
|
||||
License: LGPL-2.1+
|
||||
Group: Development/Libraries/Python
|
||||
BuildRequires: python-devel swig
|
||||
BuildRequires: python-devel
|
||||
BuildRequires: swig
|
||||
Requires: %{rname}%{soname} = %{version}
|
||||
%py_requires
|
||||
|
||||
@ -96,36 +99,23 @@ and can be used by python applications.
|
||||
%setup -q -n %{rname}-%{version}
|
||||
|
||||
%build
|
||||
%configure --libdir="/%{_lib}"
|
||||
%configure --disable-static --with-pic --with-python=yes
|
||||
%__make %{?_smp_mflags}
|
||||
|
||||
%install
|
||||
%__make DESTDIR="%{buildroot}" install
|
||||
|
||||
# Move the symlink
|
||||
%__rm -f "%{buildroot}/%{_lib}/%{rname}.so"
|
||||
%__mkdir_p "%{buildroot}%{_libdir}"
|
||||
VLIBNAME=$(/bin/ls -1 "%{buildroot}/%{_lib}/%{rname}.so".*.*.*)
|
||||
[ -n "$VLIBNAME" ] || { echo "ERROR: failed to find %{buildroot}/%{_lib}/%{rname}.so.*.*.*" >&2; exit 1; }
|
||||
LIBNAME=$(basename "$VLIBNAME")
|
||||
%__ln_s "../../%{_lib}/$LIBNAME" "%{buildroot}%{_libdir}/%{rname}.so"
|
||||
|
||||
# Move the pkgconfig file
|
||||
%__install -d "%{buildroot}%{_libdir}"
|
||||
%__mv "%{buildroot}/%{_lib}/pkgconfig" "%{buildroot}%{_libdir}/pkgconfig"
|
||||
|
||||
# Remove a couple things so they don't get picked up
|
||||
%__rm -f "%{buildroot}/%{_lib}/%{rname}".{a,la}
|
||||
%__rm -f "%{buildroot}%{python_sitearch}/_capng".{a,la}
|
||||
find %{buildroot} -type f -name "*.la" -print -delete
|
||||
|
||||
%if "%{name}" == "%{rname}-python"
|
||||
%__rm -f %{buildroot}/%{_lib}/lib*.so*
|
||||
%__rm -f %{buildroot}/%{_libdir}/lib*.so*
|
||||
%__rm -rf %{buildroot}/%{_libdir}/pkgconfig
|
||||
%__rm -rf %{buildroot}/%{_bindir}
|
||||
%__rm -rf %{buildroot}/%{_mandir}
|
||||
%__rm -rf %{buildroot}/%{_includedir}
|
||||
%__rm -rf %{buildroot}/%{_datadir}/aclocal
|
||||
%__rm -f %{buildroot}%{_libdir}/lib*.so*
|
||||
%__rm -f %{buildroot}%{_libdir}/lib*.so*
|
||||
%__rm -rf %{buildroot}%{_libdir}/pkgconfig
|
||||
%__rm -rf %{buildroot}%{_bindir}
|
||||
%__rm -rf %{buildroot}%{_mandir}
|
||||
%__rm -rf %{buildroot}%{_includedir}
|
||||
%__rm -rf %{buildroot}%{_datadir}/aclocal
|
||||
%endif
|
||||
|
||||
%clean
|
||||
@ -140,8 +130,8 @@ LIBNAME=$(basename "$VLIBNAME")
|
||||
%files -n %{name}%{soname}
|
||||
%defattr(-,root,root,-)
|
||||
%doc COPYING.LIB
|
||||
%attr(0755,root,root) /%{_lib}/%{rname}.so.%{soname}
|
||||
%attr(0755,root,root) /%{_lib}/%{rname}.so.%{soname}.*
|
||||
%attr(0755,root,root) %{_libdir}/%{rname}.so.%{soname}
|
||||
%attr(0755,root,root) %{_libdir}/%{rname}.so.%{soname}.*
|
||||
|
||||
%files devel
|
||||
%defattr(-,root,root,-)
|
||||
|
@ -1,3 +1,8 @@
|
||||
-------------------------------------------------------------------
|
||||
Sun Feb 12 17:24:55 UTC 2012 - crrodriguez@opensuse.org
|
||||
|
||||
- Move libraries back to %{_libdir}, /usr merge project
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Oct 5 15:06:00 UTC 2011 - uli@suse.com
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package libcap-ng
|
||||
#
|
||||
# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
||||
# Copyright (c) 2012 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,14 +20,14 @@
|
||||
%{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")}
|
||||
|
||||
Summary: An alternate POSIX capabilities library
|
||||
License: LGPL-2.1+
|
||||
Group: System/Libraries
|
||||
|
||||
Name: libcap-ng
|
||||
Version: 0.6.6
|
||||
Release: 1
|
||||
Release: 0
|
||||
%define soname 0
|
||||
%define rname libcap-ng
|
||||
License: LGPL-2.1+
|
||||
Group: System/Libraries
|
||||
Url: http://people.redhat.com/sgrubb/libcap-ng
|
||||
# http://people.redhat.com/sgrubb/libcap-ng/libcap-ng-%{version}.tar.gz
|
||||
Source0: libcap-ng-%{version}.tar.bz2
|
||||
@ -36,7 +36,9 @@ Source2: baselibs.conf
|
||||
Source99: libcap-ng.rpmlintrc
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
BuildRequires: kernel-headers >= 2.6.11
|
||||
BuildRequires: libattr-devel pkg-config python-base
|
||||
BuildRequires: libattr-devel
|
||||
BuildRequires: pkg-config
|
||||
BuildRequires: python-base
|
||||
|
||||
%description
|
||||
Libcap-ng is a library that makes using posix capabilities easier
|
||||
@ -82,7 +84,8 @@ lets you set the file system based capabilities.
|
||||
Summary: Python bindings for libcap-ng library
|
||||
License: LGPL-2.1+
|
||||
Group: Development/Libraries/Python
|
||||
BuildRequires: python-devel swig
|
||||
BuildRequires: python-devel
|
||||
BuildRequires: swig
|
||||
Requires: %{rname}%{soname} = %{version}
|
||||
%py_requires
|
||||
|
||||
@ -96,36 +99,23 @@ and can be used by python applications.
|
||||
%setup -q -n %{rname}-%{version}
|
||||
|
||||
%build
|
||||
%configure --libdir="/%{_lib}" --with-python=no
|
||||
%configure --disable-static --with-pic --with-python=no
|
||||
%__make %{?_smp_mflags}
|
||||
|
||||
%install
|
||||
%__make DESTDIR="%{buildroot}" install
|
||||
|
||||
# Move the symlink
|
||||
%__rm -f "%{buildroot}/%{_lib}/%{rname}.so"
|
||||
%__mkdir_p "%{buildroot}%{_libdir}"
|
||||
VLIBNAME=$(/bin/ls -1 "%{buildroot}/%{_lib}/%{rname}.so".*.*.*)
|
||||
[ -n "$VLIBNAME" ] || { echo "ERROR: failed to find %{buildroot}/%{_lib}/%{rname}.so.*.*.*" >&2; exit 1; }
|
||||
LIBNAME=$(basename "$VLIBNAME")
|
||||
%__ln_s "../../%{_lib}/$LIBNAME" "%{buildroot}%{_libdir}/%{rname}.so"
|
||||
|
||||
# Move the pkgconfig file
|
||||
%__install -d "%{buildroot}%{_libdir}"
|
||||
%__mv "%{buildroot}/%{_lib}/pkgconfig" "%{buildroot}%{_libdir}/pkgconfig"
|
||||
|
||||
# Remove a couple things so they don't get picked up
|
||||
%__rm -f "%{buildroot}/%{_lib}/%{rname}".{a,la}
|
||||
%__rm -f "%{buildroot}%{python_sitearch}/_capng".{a,la}
|
||||
find %{buildroot} -type f -name "*.la" -print -delete
|
||||
|
||||
%if "%{name}" == "%{rname}-python"
|
||||
%__rm -f %{buildroot}/%{_lib}/lib*.so*
|
||||
%__rm -f %{buildroot}/%{_libdir}/lib*.so*
|
||||
%__rm -rf %{buildroot}/%{_libdir}/pkgconfig
|
||||
%__rm -rf %{buildroot}/%{_bindir}
|
||||
%__rm -rf %{buildroot}/%{_mandir}
|
||||
%__rm -rf %{buildroot}/%{_includedir}
|
||||
%__rm -rf %{buildroot}/%{_datadir}/aclocal
|
||||
%__rm -f %{buildroot}%{_libdir}/lib*.so*
|
||||
%__rm -f %{buildroot}%{_libdir}/lib*.so*
|
||||
%__rm -rf %{buildroot}%{_libdir}/pkgconfig
|
||||
%__rm -rf %{buildroot}%{_bindir}
|
||||
%__rm -rf %{buildroot}%{_mandir}
|
||||
%__rm -rf %{buildroot}%{_includedir}
|
||||
%__rm -rf %{buildroot}%{_datadir}/aclocal
|
||||
%endif
|
||||
|
||||
%clean
|
||||
@ -140,8 +130,8 @@ LIBNAME=$(basename "$VLIBNAME")
|
||||
%files -n %{name}%{soname}
|
||||
%defattr(-,root,root,-)
|
||||
%doc COPYING.LIB
|
||||
%attr(0755,root,root) /%{_lib}/%{rname}.so.%{soname}
|
||||
%attr(0755,root,root) /%{_lib}/%{rname}.so.%{soname}.*
|
||||
%attr(0755,root,root) %{_libdir}/%{rname}.so.%{soname}
|
||||
%attr(0755,root,root) %{_libdir}/%{rname}.so.%{soname}.*
|
||||
|
||||
%files devel
|
||||
%defattr(-,root,root,-)
|
||||
|
Loading…
Reference in New Issue
Block a user