SHA256
1
0
forked from pool/libsemanage
libsemanage/python-semanage.spec
Johannes Segitz 3c227b83de Accepting request 408533 from home:jsegitz:branches:security:SELinux
- Without bug number no submit to SLE 12 SP2 is possible, so to make
  sle-changelog-checker happy: bsc#988977

- Added suse_path.patch to fix path to hll compiler

OBS-URL: https://build.opensuse.org/request/show/408533
OBS-URL: https://build.opensuse.org/package/show/security:SELinux/libsemanage?expand=0&rev=55
2016-07-14 14:27:12 +00:00

77 lines
2.5 KiB
RPMSpec

#
# spec file for package python-semanage
#
# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
#
# 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/
#
Name: python-semanage
Version: 2.5
Release: 0
Summary: Python bindings for libsemanage
License: LGPL-2.1
Group: Development/Languages/Python
Url: https://github.com/SELinuxProject/selinux
Source: https://raw.githubusercontent.com/wiki/SELinuxProject/selinux/files/releases/20160223/libsemanage-%{version}.tar.gz
Source1: baselibs.conf
Patch0: suse_path.patch
BuildRequires: audit-devel
BuildRequires: bison
BuildRequires: flex
BuildRequires: libbz2-devel
BuildRequires: libselinux-devel
BuildRequires: libsepol-devel
BuildRequires: libustr-devel
BuildRequires: python-devel
BuildRequires: swig
Requires: libsemanage1 = %{version}
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
This package contains the python bindings for developing
SELinux management applications.
%prep
%setup -q -n libsemanage-%{version}
%patch0 -p0
%build
make %{?_smp_mflags} clean
make -j1 CFLAGS="%{optflags}" swigify
make -j1 CFLAGS="%{optflags}" LIBDIR="%{_libdir}" LIBEXECDIR="%{_libexecdir}" SHLIBDIR="%{_lib}" all pywrap
%install
mkdir -p %{buildroot}/%{_lib}
mkdir -p %{buildroot}%{_libdir}
mkdir -p %{buildroot}%{_includedir}
make DESTDIR=%{buildroot} LIBDIR="%{buildroot}%{_libdir}" LIBEXECDIR="%{buildroot}%{_libexecdir}" SHLIBDIR="%{buildroot}/%{_lib}" install install-pywrap
# remove files contained in other packages
rm -rf %{buildroot}%{_sysconfdir}
%if "%{_lib}" == "lib64"
rm -rf %{buildroot}%{_libexecdir}
%else
rm -rf %{buildroot}%{_libexecdir}/selinux
%endif
rm -rf %{buildroot}%{_includedir}
rm -f %{buildroot}%{_libdir}/libsemanage.*
rm -rf %{buildroot}%{_libdir}/pkgconfig
rm -rf %{buildroot}%{_mandir}
%files
%defattr(-,root,root)
%{python_sitearch}/*
%changelog