forked from pool/libsemanage
Accepting request 528990 from devel:languages:python:singlespec-staging
- build both python2 and python3 version of the semanage binding with the singlespec machinery OBS-URL: https://build.opensuse.org/request/show/528990 OBS-URL: https://build.opensuse.org/package/show/security:SELinux/libsemanage?expand=0&rev=61
This commit is contained in:
parent
30ba64d8e9
commit
fa71176da9
@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# spec file for package libsemanage
|
# spec file for package libsemanage
|
||||||
#
|
#
|
||||||
# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
|
# Copyright (c) 2017 SUSE LINUX 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
|
||||||
|
@ -1,3 +1,9 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Sep 27 15:51:27 UTC 2017 - jmatejek@suse.com
|
||||||
|
|
||||||
|
- build both python2 and python3 version of the semanage binding
|
||||||
|
with the singlespec machinery
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Sun Jul 17 15:21:03 UTC 2016 - jengelh@inai.de
|
Sun Jul 17 15:21:03 UTC 2016 - jengelh@inai.de
|
||||||
|
|
||||||
@ -171,3 +177,4 @@ Tue Jul 15 16:58:47 CEST 2008 - prusnak@suse.cz
|
|||||||
- initial version 2.0.25
|
- initial version 2.0.25
|
||||||
* based on Fedora package by Dan Walsh <dwalsh@redhat.com>
|
* based on Fedora package by Dan Walsh <dwalsh@redhat.com>
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# spec file for package python-semanage
|
# spec file for package python-semanage
|
||||||
#
|
#
|
||||||
# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
|
# Copyright (c) 2017 SUSE LINUX 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,6 +16,7 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
|
|
||||||
|
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
||||||
Name: python-semanage
|
Name: python-semanage
|
||||||
Version: 2.5
|
Version: 2.5
|
||||||
Release: 0
|
Release: 0
|
||||||
@ -26,6 +27,7 @@ Url: https://github.com/SELinuxProject/selinux
|
|||||||
Source: https://raw.githubusercontent.com/wiki/SELinuxProject/selinux/files/releases/20160223/libsemanage-%{version}.tar.gz
|
Source: https://raw.githubusercontent.com/wiki/SELinuxProject/selinux/files/releases/20160223/libsemanage-%{version}.tar.gz
|
||||||
Source1: baselibs.conf
|
Source1: baselibs.conf
|
||||||
Patch0: suse_path.patch
|
Patch0: suse_path.patch
|
||||||
|
BuildRequires: %{python_module devel}
|
||||||
BuildRequires: audit-devel
|
BuildRequires: audit-devel
|
||||||
BuildRequires: bison
|
BuildRequires: bison
|
||||||
BuildRequires: flex
|
BuildRequires: flex
|
||||||
@ -33,11 +35,12 @@ BuildRequires: libbz2-devel
|
|||||||
BuildRequires: libselinux-devel
|
BuildRequires: libselinux-devel
|
||||||
BuildRequires: libsepol-devel
|
BuildRequires: libsepol-devel
|
||||||
BuildRequires: libustr-devel
|
BuildRequires: libustr-devel
|
||||||
BuildRequires: python-devel
|
BuildRequires: python-rpm-macros
|
||||||
BuildRequires: swig
|
BuildRequires: swig
|
||||||
# Ensure same version
|
# Ensure same version
|
||||||
Requires: libsemanage1 = %{version}
|
Requires: libsemanage1 = %{version}
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||||
|
%python_subpackages
|
||||||
|
|
||||||
%description
|
%description
|
||||||
This package contains the Python bindings for developing
|
This package contains the Python bindings for developing
|
||||||
@ -45,18 +48,30 @@ SELinux policy management applications.
|
|||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n libsemanage-%{version}
|
%setup -q -n libsemanage-%{version}
|
||||||
%patch0 -p0
|
%patch0
|
||||||
|
|
||||||
%build
|
%build
|
||||||
make %{?_smp_mflags} clean
|
make %{?_smp_mflags} clean
|
||||||
make -j1 CFLAGS="%{optflags}" swigify
|
%{python_expand # loop over possible pythons
|
||||||
make -j1 CFLAGS="%{optflags}" LIBDIR="%{_libdir}" LIBEXECDIR="%{_libexecdir}" SHLIBDIR="%{_lib}" all pywrap
|
make -j1 PYTHON=$python CFLAGS="%{optflags}" swigify
|
||||||
|
make -j1 PYTHON=$python CFLAGS="%{optflags}" \
|
||||||
|
LIBDIR="%{_libdir}" \
|
||||||
|
LIBEXECDIR="%{_libexecdir}" \
|
||||||
|
SHLIBDIR="%{_lib}" \
|
||||||
|
all pywrap
|
||||||
|
}
|
||||||
|
|
||||||
%install
|
%install
|
||||||
mkdir -p %{buildroot}/%{_lib}
|
mkdir -p %{buildroot}/%{_lib}
|
||||||
mkdir -p %{buildroot}%{_libdir}
|
mkdir -p %{buildroot}%{_libdir}
|
||||||
mkdir -p %{buildroot}%{_includedir}
|
mkdir -p %{buildroot}%{_includedir}
|
||||||
make DESTDIR=%{buildroot} LIBDIR="%{buildroot}%{_libdir}" LIBEXECDIR="%{buildroot}%{_libexecdir}" SHLIBDIR="%{buildroot}/%{_lib}" install install-pywrap
|
%{python_expand # loop over possible pythons
|
||||||
|
make PYTHON=$python DESTDIR=%{buildroot} \
|
||||||
|
LIBDIR="%{buildroot}%{_libdir}" \
|
||||||
|
LIBEXECDIR="%{buildroot}%{_libexecdir}" \
|
||||||
|
SHLIBDIR="%{buildroot}/%{_lib}" \
|
||||||
|
install install-pywrap
|
||||||
|
}
|
||||||
|
|
||||||
# remove files contained in other packages
|
# remove files contained in other packages
|
||||||
rm -rf %{buildroot}%{_sysconfdir}
|
rm -rf %{buildroot}%{_sysconfdir}
|
||||||
@ -70,7 +85,7 @@ rm -f %{buildroot}%{_libdir}/libsemanage.*
|
|||||||
rm -rf %{buildroot}%{_libdir}/pkgconfig
|
rm -rf %{buildroot}%{_libdir}/pkgconfig
|
||||||
rm -rf %{buildroot}%{_mandir}
|
rm -rf %{buildroot}%{_mandir}
|
||||||
|
|
||||||
%files
|
%files %{python_files}
|
||||||
%defattr(-,root,root)
|
%defattr(-,root,root)
|
||||||
%{python_sitearch}/*
|
%{python_sitearch}/*
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user