2018-12-10 22:42:31 +01:00
|
|
|
|
#
|
|
|
|
|
# spec file for package libselinux-bindings
|
|
|
|
|
#
|
2020-03-05 11:13:39 +01:00
|
|
|
|
# Copyright (c) 2020 SUSE LLC
|
2018-12-10 22:42:31 +01: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.
|
|
|
|
|
|
2019-04-26 09:36:49 +02:00
|
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2018-12-10 22:42:31 +01:00
|
|
|
|
#
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
2020-07-14 16:13:39 +02:00
|
|
|
|
%define libsepol_ver 3.1
|
2018-12-10 22:42:31 +01:00
|
|
|
|
Name: libselinux-bindings
|
2020-07-14 16:13:39 +02:00
|
|
|
|
Version: 3.1
|
2018-12-10 22:42:31 +01:00
|
|
|
|
Release: 0
|
|
|
|
|
Summary: SELinux runtime library and simple utilities
|
2019-05-24 14:37:42 +02:00
|
|
|
|
License: SUSE-Public-Domain
|
2018-12-10 22:42:31 +01:00
|
|
|
|
Group: Development/Libraries/C and C++
|
2018-12-12 10:16:33 +01:00
|
|
|
|
URL: https://github.com/SELinuxProject/selinux/wiki/Releases
|
2018-12-10 22:42:31 +01:00
|
|
|
|
# embedded is the MD5
|
2018-12-12 10:53:37 +01:00
|
|
|
|
Source: libselinux-%{version}.tar.gz
|
2018-12-10 22:42:31 +01:00
|
|
|
|
Source1: selinux-ready
|
|
|
|
|
Source2: baselibs.conf
|
|
|
|
|
# PATCH-FIX-UPSTREAM Include <sys/uio.h> for readv prototype
|
|
|
|
|
Patch4: readv-proto.patch
|
2019-11-11 08:03:37 +01:00
|
|
|
|
# PATCH-FIX-UPSTREAM python3.8-compat.patch mcepl@suse.com
|
|
|
|
|
# Make linking working even when default pkg-config doesn’t provide -lpython<ver>
|
|
|
|
|
Patch5: python3.8-compat.patch
|
2019-12-16 17:05:46 +01:00
|
|
|
|
Patch6: swig4_moduleimport.patch
|
2018-12-10 22:42:31 +01:00
|
|
|
|
BuildRequires: libsepol-devel-static >= %{libsepol_ver}
|
|
|
|
|
BuildRequires: pcre-devel
|
|
|
|
|
BuildRequires: python-rpm-macros
|
|
|
|
|
BuildRequires: python3-devel
|
|
|
|
|
BuildRequires: ruby-devel
|
|
|
|
|
BuildRequires: swig
|
|
|
|
|
|
|
|
|
|
%description
|
|
|
|
|
libselinux provides an interface to get and set process and file
|
|
|
|
|
security contexts and to obtain security policy decisions.
|
|
|
|
|
|
|
|
|
|
%package -n python3-selinux
|
2018-12-12 10:16:33 +01:00
|
|
|
|
%define oldpython python
|
2018-12-10 22:42:31 +01:00
|
|
|
|
Summary: Python bindings for the SELinux runtime library
|
|
|
|
|
Group: Development/Libraries/Python
|
2018-12-12 10:16:33 +01:00
|
|
|
|
Requires: libselinux1 = %{version}
|
|
|
|
|
Requires: python3
|
2018-12-10 22:42:31 +01:00
|
|
|
|
%ifpython2
|
|
|
|
|
Obsoletes: %{oldpython}-selinux < %{version}
|
|
|
|
|
Provides: %{oldpython}-selinux = %{version}
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%description -n python3-selinux
|
|
|
|
|
libselinux provides an interface to get and set process and file
|
|
|
|
|
security contexts and to obtain security policy decisions.
|
|
|
|
|
|
|
|
|
|
This subpackage contains Python extensions to use SELinux from that
|
|
|
|
|
language.
|
|
|
|
|
|
|
|
|
|
%package -n ruby-selinux
|
|
|
|
|
Summary: Ruby bindings for the SELinux runtime library
|
|
|
|
|
Group: Development/Languages/Ruby
|
|
|
|
|
Requires: libselinux1 = %{version}
|
|
|
|
|
Requires: ruby
|
|
|
|
|
|
|
|
|
|
%description -n ruby-selinux
|
|
|
|
|
libselinux provides an interface to get and set process and file
|
|
|
|
|
security contexts and to obtain security policy decisions.
|
|
|
|
|
|
|
|
|
|
This subpackage contains Ruby extensions to use SELinux from that
|
|
|
|
|
language.
|
|
|
|
|
|
|
|
|
|
%prep
|
|
|
|
|
%setup -q -n libselinux-%{version}
|
2019-11-11 08:03:37 +01:00
|
|
|
|
%autopatch -p1
|
2018-12-10 22:42:31 +01:00
|
|
|
|
|
|
|
|
|
%build
|
2019-06-12 11:33:33 +02:00
|
|
|
|
%define _lto_cflags %{nil}
|
2020-07-14 16:13:39 +02:00
|
|
|
|
make %{?_smp_mflags} LIBDIR="%{_libdir}" CFLAGS="%{optflags} -fno-semantic-interposition" -C src V=1
|
|
|
|
|
make %{?_smp_mflags} LIBDIR="%{_libdir}" CFLAGS="%{optflags} -fno-semantic-interposition" -C src swigify V=1
|
|
|
|
|
make %{?_smp_mflags} LIBDIR="%{_libdir}" CFLAGS="%{optflags} -fno-semantic-interposition" -C src pywrap V=1
|
|
|
|
|
make %{?_smp_mflags} LIBDIR="%{_libdir}" CFLAGS="%{optflags} -fno-semantic-interposition" -C src rubywrap V=1
|
2018-12-10 22:42:31 +01:00
|
|
|
|
|
|
|
|
|
%install
|
2020-06-02 17:31:13 +02:00
|
|
|
|
make DESTDIR=%{buildroot} LIBDIR="%{_libdir}" SHLIBDIR="/%{_lib}" LIBSEPOLA=%{_libdir}/libsepol.a -C src install V=1
|
|
|
|
|
make DESTDIR=%{buildroot} LIBDIR="%{_libdir}" SHLIBDIR="/%{_lib}" LIBSEPOLA=%{_libdir}/libsepol.a -C src install-pywrap V=1
|
|
|
|
|
make DESTDIR=%{buildroot} LIBDIR="%{_libdir}" SHLIBDIR="/%{_lib}" LIBSEPOLA=%{_libdir}/libsepol.a -C src install-rubywrap V=1
|
|
|
|
|
rm -rf %{buildroot}/%{_lib} %{buildroot}%{_libdir}/libselinux.* %{buildroot}%{_libdir}/pkgconfig
|
2018-12-10 22:42:31 +01:00
|
|
|
|
|
|
|
|
|
%files -n python3-selinux
|
2018-12-12 09:31:21 +01:00
|
|
|
|
%{python3_sitearch}/*selinux*
|
2018-12-10 22:42:31 +01:00
|
|
|
|
|
|
|
|
|
%files -n ruby-selinux
|
|
|
|
|
%{_libdir}/ruby/vendor_ruby/%{rb_ver}/%{rb_arch}/selinux.so
|
|
|
|
|
|
|
|
|
|
%changelog
|