- Version bupm to 0.7.4

- Cleanup with spec-cleaner
- Remove useless specification of attributes
- Really split the two spec files instead of copying them to avoid
  the huge ifdefing.
  + more readable
  - version must be edited in two places when bumping


- Version bupm to 0.7.4
- Cleanup with spec-cleaner
- Remove useless specification of attributes
- Really split the two spec files instead of copying them to avoid
  the huge ifdefing.
  + more readable
  - version must be edited in two places when bumping

OBS-URL: https://build.opensuse.org/package/show/security/libcap-ng?expand=0&rev=22
This commit is contained in:
Tomáš Chvátal 2014-05-15 13:27:52 +00:00 committed by Git OBS Bridge
parent 4ce2a19c83
commit a589176c40
7 changed files with 72 additions and 203 deletions

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:5ca441c8d3a1e4cfe8a8151907977662679457311ccaa7eaac91447c33a35bb1
size 392613

3
libcap-ng-0.7.4.tar.gz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:48a2083276f9820cb92dcb05d001b30733bcbf48c14c230303cac3cd08b45b6b
size 407007

View File

@ -1,5 +1,16 @@
------------------------------------------------------------------- -------------------------------------------------------------------
Thu Mar 14 09:30:13 UTC 2013 - meissner@suse.com Thu May 15 13:19:57 UTC 2014 - tchvatal@suse.com
- Version bupm to 0.7.4
- Cleanup with spec-cleaner
- Remove useless specification of attributes
- Really split the two spec files instead of copying them to avoid
the huge ifdefing.
+ more readable
- version must be edited in two places when bumping
-------------------------------------------------------------------
Thu Mar 14 09:30:04 UTC 2013 - meissner@suse.com
- use source url - use source url

View File

@ -1,7 +1,7 @@
# #
# spec file for package libcap-ng-python # spec file for package libcap-ng-python
# #
# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany. # Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
# #
# All modifications and additions to the file contributed by third parties # All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed # remain the property of their copyright owners, unless otherwise agreed
@ -16,146 +16,56 @@
# #
%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")} %define soname 0
%{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")} Name: libcap-ng-python
Version: 0.7.4
Release: 0
Summary: An alternate POSIX capabilities library Summary: An alternate POSIX capabilities library
License: LGPL-2.1+ License: LGPL-2.1+
Group: System/Libraries Group: System/Libraries
Name: libcap-ng-python
Version: 0.7.3
Release: 0
%define soname 0
%define rname libcap-ng
Url: http://people.redhat.com/sgrubb/libcap-ng Url: http://people.redhat.com/sgrubb/libcap-ng
Source0: http://people.redhat.com/sgrubb/libcap-ng/libcap-ng-%{version}.tar.gz Source0: http://people.redhat.com/sgrubb/libcap-ng/libcap-ng-%{version}.tar.gz
Source1: pre_checkin.sh Source1: baselibs.conf
Source2: baselibs.conf
Source99: libcap-ng.rpmlintrc Source99: libcap-ng.rpmlintrc
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: kernel-headers >= 2.6.11 BuildRequires: kernel-headers >= 2.6.11
BuildRequires: libattr-devel BuildRequires: libattr-devel
BuildRequires: pkg-config BuildRequires: pkg-config
BuildRequires: python-base BuildRequires: python-base
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description %description
Libcap-ng is a library that makes using posix capabilities easier Libcap-ng is a library that makes using posix capabilities easier
%if "%{name}" == "%{rname}"
%package -n %{name}%{soname}
Summary: An alternate POSIX capabilities library
License: LGPL-2.1+
Group: System/Libraries
%description -n %{name}%{soname}
Libcap-ng is a library that makes using posix capabilities easier
%package devel
Summary: Header files for libcap-ng library
License: LGPL-2.1+
Group: Development/Libraries/C and C++
Requires: %{name}%{soname} = %{version}
Requires: kernel-headers >= 2.6.11
Requires: pkgconfig
%description devel
The libcap-ng-devel package contains the files needed for developing
applications that need to use the libcap-ng library.
%package utils
Summary: Utilities for analysing and setting file capabilities
License: GPL-2.0+
Group: System/Base
%description utils
The libcap-ng-utils package contains applications to analyse the
posix capabilities of all the program running on a system. It also
lets you set the file system based capabilities.
%else
%package -n python-capng %package -n python-capng
Summary: Python bindings for libcap-ng library Summary: Python bindings for libcap-ng library
License: LGPL-2.1+
Group: Development/Libraries/Python Group: Development/Libraries/Python
BuildRequires: libcap-ng-devel = %{version}
BuildRequires: python-devel BuildRequires: python-devel
BuildRequires: swig BuildRequires: swig
Requires: %{rname}%{soname} = %{version} Requires: libcap-ng%{soname} = %{version}
%py_requires %{py_requires}
%description -n python-capng %description -n python-capng
The libcap-ng-python package contains the bindings so that libcap-ng The libcap-ng-python package contains the bindings so that libcap-ng
and can be used by python applications. and can be used by python applications.
%endif
%prep %prep
%setup -q -n %{rname}-%{version} %setup -q -n libcap-ng-%{version}
%build %build
%configure --disable-static --with-pic --with-python=yes %configure \
%__make %{?_smp_mflags} --disable-static \
--with-pic \
--with-python
make %{?_smp_mflags}
%install %install
%__make DESTDIR="%{buildroot}" install make DESTDIR=%{buildroot} install %{?_smp_mflags} -C bindings/python
find %{buildroot} -type f -name "*.la" -delete -print
# Remove a couple things so they don't get picked up
find %{buildroot} -type f -name "*.la" -print -delete
%if "%{name}" == "%{rname}-python"
%__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
%{?buildroot:%__rm -rf "%{buildroot}"}
%if "%{name}" == "%{rname}"
%post -n %{name}%{soname} -p /sbin/ldconfig
%postun -n %{name}%{soname} -p /sbin/ldconfig
%files -n %{name}%{soname}
%defattr(-,root,root,-)
%doc COPYING.LIB
%attr(0755,root,root) %{_libdir}/%{rname}.so.%{soname}
%attr(0755,root,root) %{_libdir}/%{rname}.so.%{soname}.*
%files devel
%defattr(-,root,root,-)
%attr(0644,root,root) %{_mandir}/man3/*.3%{ext_man}
%attr(0644,root,root) %{_includedir}/cap-ng.h
%attr(0755,root,root) %{_libdir}/%{rname}.so
%attr(0644,root,root) %{_datadir}/aclocal/cap-ng.m4
%{_libdir}/pkgconfig/%{rname}.pc
%files utils
%defattr(-,root,root,-)
%doc COPYING
%attr(0755,root,root) %{_bindir}/captest
%attr(0755,root,root) %{_bindir}/filecap
%attr(0755,root,root) %{_bindir}/netcap
%attr(0755,root,root) %{_bindir}/pscap
%attr(0644,root,root) %{_mandir}/man8/*.8%{ext_man}
%else
%files -n python-capng %files -n python-capng
%defattr(-,root,root,-) %defattr(-,root,root,-)
%attr(755,root,root) %{python_sitearch}/_capng.so %{python_sitearch}/_capng.so
%{python_sitearch}/capng.py* %{python_sitearch}/capng.py*
%endif
%changelog %changelog

View File

@ -1,3 +1,14 @@
-------------------------------------------------------------------
Thu May 15 13:19:57 UTC 2014 - tchvatal@suse.com
- Version bupm to 0.7.4
- Cleanup with spec-cleaner
- Remove useless specification of attributes
- Really split the two spec files instead of copying them to avoid
the huge ifdefing.
+ more readable
- version must be edited in two places when bumping
------------------------------------------------------------------- -------------------------------------------------------------------
Thu Mar 14 09:30:04 UTC 2013 - meissner@suse.com Thu Mar 14 09:30:04 UTC 2013 - meissner@suse.com

View File

@ -1,7 +1,7 @@
# #
# spec file for package libcap-ng # spec file for package libcap-ng
# #
# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany. # Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
# #
# All modifications and additions to the file contributed by third parties # All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed # remain the property of their copyright owners, unless otherwise agreed
@ -16,36 +16,26 @@
# #
%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")} %define soname 0
%{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")} Name: libcap-ng
Version: 0.7.4
Release: 0
Summary: An alternate POSIX capabilities library Summary: An alternate POSIX capabilities library
License: LGPL-2.1+ License: LGPL-2.1+
Group: System/Libraries Group: System/Libraries
Name: libcap-ng
Version: 0.7.3
Release: 0
%define soname 0
%define rname libcap-ng
Url: http://people.redhat.com/sgrubb/libcap-ng Url: http://people.redhat.com/sgrubb/libcap-ng
Source0: http://people.redhat.com/sgrubb/libcap-ng/libcap-ng-%{version}.tar.gz Source0: http://people.redhat.com/sgrubb/libcap-ng/libcap-ng-%{version}.tar.gz
Source1: pre_checkin.sh Source1: baselibs.conf
Source2: baselibs.conf
Source99: libcap-ng.rpmlintrc Source99: libcap-ng.rpmlintrc
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: kernel-headers >= 2.6.11 BuildRequires: kernel-headers >= 2.6.11
BuildRequires: libattr-devel BuildRequires: libattr-devel
BuildRequires: pkg-config BuildRequires: pkg-config
BuildRequires: python-base BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description %description
Libcap-ng is a library that makes using posix capabilities easier Libcap-ng is a library that makes using posix capabilities easier
%if "%{name}" == "%{rname}"
%package -n %{name}%{soname} %package -n %{name}%{soname}
Summary: An alternate POSIX capabilities library Summary: An alternate POSIX capabilities library
License: LGPL-2.1+ License: LGPL-2.1+
Group: System/Libraries Group: System/Libraries
@ -54,7 +44,6 @@ Group: System/Libraries
Libcap-ng is a library that makes using posix capabilities easier Libcap-ng is a library that makes using posix capabilities easier
%package devel %package devel
Summary: Header files for libcap-ng library Summary: Header files for libcap-ng library
License: LGPL-2.1+ License: LGPL-2.1+
Group: Development/Libraries/C and C++ Group: Development/Libraries/C and C++
@ -67,7 +56,6 @@ The libcap-ng-devel package contains the files needed for developing
applications that need to use the libcap-ng library. applications that need to use the libcap-ng library.
%package utils %package utils
Summary: Utilities for analysing and setting file capabilities Summary: Utilities for analysing and setting file capabilities
License: GPL-2.0+ License: GPL-2.0+
Group: System/Base Group: System/Base
@ -77,50 +65,19 @@ The libcap-ng-utils package contains applications to analyse the
posix capabilities of all the program running on a system. It also posix capabilities of all the program running on a system. It also
lets you set the file system based capabilities. lets you set the file system based capabilities.
%else
%package -n python-capng
Summary: Python bindings for libcap-ng library
License: LGPL-2.1+
Group: Development/Libraries/Python
BuildRequires: python-devel
BuildRequires: swig
Requires: %{rname}%{soname} = %{version}
%py_requires
%description -n python-capng
The libcap-ng-python package contains the bindings so that libcap-ng
and can be used by python applications.
%endif
%prep %prep
%setup -q -n %{rname}-%{version} %setup -q
%build %build
%configure --disable-static --with-pic --with-python=no %configure \
%__make %{?_smp_mflags} --disable-static \
--with-pic \
--without-python
make %{?_smp_mflags}
%install %install
%__make DESTDIR="%{buildroot}" install make DESTDIR=%{buildroot} install %{?_smp_mflags}
find %{buildroot} -type f -name "*.la" -delete -print
# Remove a couple things so they don't get picked up
find %{buildroot} -type f -name "*.la" -print -delete
%if "%{name}" == "%{rname}-python"
%__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
%{?buildroot:%__rm -rf "%{buildroot}"}
%if "%{name}" == "%{rname}"
%post -n %{name}%{soname} -p /sbin/ldconfig %post -n %{name}%{soname} -p /sbin/ldconfig
@ -129,33 +86,24 @@ find %{buildroot} -type f -name "*.la" -print -delete
%files -n %{name}%{soname} %files -n %{name}%{soname}
%defattr(-,root,root,-) %defattr(-,root,root,-)
%doc COPYING.LIB %doc COPYING.LIB
%attr(0755,root,root) %{_libdir}/%{rname}.so.%{soname} %{_libdir}/%{name}.so.%{soname}
%attr(0755,root,root) %{_libdir}/%{rname}.so.%{soname}.* %{_libdir}/%{name}.so.%{soname}.*
%files devel %files devel
%defattr(-,root,root,-) %defattr(-,root,root,-)
%attr(0644,root,root) %{_mandir}/man3/*.3%{ext_man} %{_mandir}/man3/*.3%{ext_man}
%attr(0644,root,root) %{_includedir}/cap-ng.h %{_includedir}/cap-ng.h
%attr(0755,root,root) %{_libdir}/%{rname}.so %{_libdir}/%{name}.so
%attr(0644,root,root) %{_datadir}/aclocal/cap-ng.m4 %{_datadir}/aclocal/cap-ng.m4
%{_libdir}/pkgconfig/%{rname}.pc %{_libdir}/pkgconfig/%{name}.pc
%files utils %files utils
%defattr(-,root,root,-) %defattr(-,root,root,-)
%doc COPYING %doc COPYING
%attr(0755,root,root) %{_bindir}/captest %{_bindir}/captest
%attr(0755,root,root) %{_bindir}/filecap %{_bindir}/filecap
%attr(0755,root,root) %{_bindir}/netcap %{_bindir}/netcap
%attr(0755,root,root) %{_bindir}/pscap %{_bindir}/pscap
%attr(0644,root,root) %{_mandir}/man8/*.8%{ext_man} %{_mandir}/man8/*.8%{ext_man}
%else
%files -n python-capng
%defattr(-,root,root,-)
%attr(755,root,root) %{python_sitearch}/_capng.so
%{python_sitearch}/capng.py*
%endif
%changelog %changelog

View File

@ -1,11 +0,0 @@
#!/bin/bash
echo -n "Generating python spec "
cp libcap-ng.spec libcap-ng-python.spec
cp libcap-ng.changes libcap-ng-python.changes
perl -pi -e "s/^Name:.*libcap-ng$/Name: libcap-ng-python/" libcap-ng-python.spec
echo "Done."