2011-05-23 16:20:28 +02:00
|
|
|
#
|
|
|
|
# spec file for package python-semanage
|
|
|
|
#
|
2018-03-09 08:25:24 +01:00
|
|
|
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
|
2011-05-23 16:20:28 +02:00
|
|
|
#
|
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
# published by the Open Source Initiative.
|
|
|
|
|
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
|
|
|
#
|
|
|
|
|
2011-05-24 13:33:19 +02:00
|
|
|
|
2017-09-28 09:52:04 +02:00
|
|
|
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
2016-07-13 09:19:36 +02:00
|
|
|
Name: python-semanage
|
2018-03-09 08:25:24 +01:00
|
|
|
Version: 2.7
|
2016-07-13 09:19:36 +02:00
|
|
|
Release: 0
|
2016-07-26 14:14:00 +02:00
|
|
|
Summary: Python bindings for SELinux's policy management library
|
2018-03-09 08:25:24 +01:00
|
|
|
License: LGPL-2.1-only
|
2016-07-13 09:19:36 +02:00
|
|
|
Group: Development/Languages/Python
|
|
|
|
Url: https://github.com/SELinuxProject/selinux
|
2018-03-09 08:25:24 +01:00
|
|
|
Source: https://raw.githubusercontent.com/wiki/SELinuxProject/selinux/files/releases/20170804/libsemanage-%{version}.tar.gz
|
2016-07-13 09:19:36 +02:00
|
|
|
Source1: baselibs.conf
|
2016-07-14 16:27:12 +02:00
|
|
|
Patch0: suse_path.patch
|
2017-09-28 09:52:04 +02:00
|
|
|
BuildRequires: %{python_module devel}
|
2013-11-07 11:20:19 +01:00
|
|
|
BuildRequires: audit-devel
|
2011-05-23 16:20:28 +02:00
|
|
|
BuildRequires: bison
|
|
|
|
BuildRequires: flex
|
2012-10-23 12:01:57 +02:00
|
|
|
BuildRequires: libbz2-devel
|
2012-10-25 09:25:37 +02:00
|
|
|
BuildRequires: libselinux-devel
|
2012-08-01 09:57:49 +02:00
|
|
|
BuildRequires: libsepol-devel
|
2011-05-23 16:20:28 +02:00
|
|
|
BuildRequires: libustr-devel
|
2017-09-28 09:52:04 +02:00
|
|
|
BuildRequires: python-rpm-macros
|
2011-05-23 16:20:28 +02:00
|
|
|
BuildRequires: swig
|
2016-07-26 14:14:00 +02:00
|
|
|
# Ensure same version
|
2011-05-23 16:20:28 +02:00
|
|
|
Requires: libsemanage1 = %{version}
|
2016-07-13 09:19:36 +02:00
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
2017-09-28 09:52:04 +02:00
|
|
|
%python_subpackages
|
2011-05-23 16:20:28 +02:00
|
|
|
|
|
|
|
%description
|
2016-07-26 14:14:00 +02:00
|
|
|
This package contains the Python bindings for developing
|
|
|
|
SELinux policy management applications.
|
2011-05-23 16:20:28 +02:00
|
|
|
|
|
|
|
%prep
|
2011-05-23 16:26:25 +02:00
|
|
|
%setup -q -n libsemanage-%{version}
|
2017-09-28 09:52:04 +02:00
|
|
|
%patch0
|
2011-05-23 16:20:28 +02:00
|
|
|
|
|
|
|
%build
|
2016-07-13 09:19:36 +02:00
|
|
|
make %{?_smp_mflags} clean
|
2017-09-28 09:52:04 +02:00
|
|
|
%{python_expand # loop over possible pythons
|
|
|
|
make -j1 PYTHON=$python CFLAGS="%{optflags}" swigify
|
|
|
|
make -j1 PYTHON=$python CFLAGS="%{optflags}" \
|
|
|
|
LIBDIR="%{_libdir}" \
|
|
|
|
LIBEXECDIR="%{_libexecdir}" \
|
|
|
|
SHLIBDIR="%{_lib}" \
|
|
|
|
all pywrap
|
|
|
|
}
|
2011-05-23 16:20:28 +02:00
|
|
|
|
|
|
|
%install
|
|
|
|
mkdir -p %{buildroot}/%{_lib}
|
|
|
|
mkdir -p %{buildroot}%{_libdir}
|
|
|
|
mkdir -p %{buildroot}%{_includedir}
|
2017-09-28 09:52:04 +02:00
|
|
|
%{python_expand # loop over possible pythons
|
|
|
|
make PYTHON=$python DESTDIR=%{buildroot} \
|
|
|
|
LIBDIR="%{buildroot}%{_libdir}" \
|
|
|
|
LIBEXECDIR="%{buildroot}%{_libexecdir}" \
|
|
|
|
SHLIBDIR="%{buildroot}/%{_lib}" \
|
|
|
|
install install-pywrap
|
|
|
|
}
|
2011-05-23 16:32:05 +02:00
|
|
|
|
|
|
|
# remove files contained in other packages
|
|
|
|
rm -rf %{buildroot}%{_sysconfdir}
|
2016-07-13 09:19:36 +02:00
|
|
|
%if "%{_lib}" == "lib64"
|
|
|
|
rm -rf %{buildroot}%{_libexecdir}
|
|
|
|
%else
|
|
|
|
rm -rf %{buildroot}%{_libexecdir}/selinux
|
|
|
|
%endif
|
2011-05-23 16:32:05 +02:00
|
|
|
rm -rf %{buildroot}%{_includedir}
|
|
|
|
rm -f %{buildroot}%{_libdir}/libsemanage.*
|
|
|
|
rm -rf %{buildroot}%{_libdir}/pkgconfig
|
|
|
|
rm -rf %{buildroot}%{_mandir}
|
2011-05-23 16:20:28 +02:00
|
|
|
|
2017-09-28 09:52:04 +02:00
|
|
|
%files %{python_files}
|
2011-05-23 16:20:28 +02:00
|
|
|
%defattr(-,root,root)
|
2011-05-23 16:32:05 +02:00
|
|
|
%{python_sitearch}/*
|
2011-05-23 16:20:28 +02:00
|
|
|
|
|
|
|
%changelog
|