2018-12-10 22:42:31 +01:00
|
|
|
#
|
|
|
|
# spec file for package libselinux-bindings
|
|
|
|
#
|
|
|
|
# Copyright (c) 2018 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/
|
|
|
|
#
|
|
|
|
|
|
|
|
|
|
|
|
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
|
|
|
|
2018-12-12 09:31:21 +01:00
|
|
|
%define libsepol_ver 2.8
|
2018-12-10 22:42:31 +01:00
|
|
|
|
|
|
|
Name: libselinux-bindings
|
2018-12-12 09:31:21 +01:00
|
|
|
Version: 2.8
|
2018-12-10 22:42:31 +01:00
|
|
|
Release: 0
|
|
|
|
Summary: SELinux runtime library and simple utilities
|
2018-12-12 09:31:21 +01:00
|
|
|
License: GPL-2.0-only AND SUSE-Public-Domain
|
2018-12-10 22:42:31 +01:00
|
|
|
Group: Development/Libraries/C and C++
|
|
|
|
Url: https://github.com/SELinuxProject/selinux/wiki/Releases
|
|
|
|
|
|
|
|
# embedded is the MD5
|
2018-12-12 09:31:21 +01:00
|
|
|
Source: https://github.com/SELinuxProject/selinux/archive/libselinux-%{version}.tar.gz
|
2018-12-10 22:42:31 +01:00
|
|
|
Source1: selinux-ready
|
|
|
|
Source2: baselibs.conf
|
2018-12-12 09:31:21 +01:00
|
|
|
Patch3: python3.patch
|
2018-12-10 22:42:31 +01:00
|
|
|
# PATCH-FIX-UPSTREAM Include <sys/uio.h> for readv prototype
|
|
|
|
Patch4: readv-proto.patch
|
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
|
|
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
|
|
|
|
Summary: Python bindings for the SELinux runtime library
|
|
|
|
License: SUSE-Public-Domain
|
|
|
|
Group: Development/Libraries/Python
|
|
|
|
%define oldpython python
|
|
|
|
%ifpython2
|
|
|
|
Obsoletes: %{oldpython}-selinux < %{version}
|
|
|
|
Provides: %{oldpython}-selinux = %{version}
|
|
|
|
%endif
|
|
|
|
Requires: libselinux1 = %{version}
|
|
|
|
Requires: python3
|
|
|
|
|
|
|
|
%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
|
|
|
|
License: SUSE-Public-Domain
|
|
|
|
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}
|
2018-12-12 09:31:21 +01:00
|
|
|
%patch3 -p1
|
2018-12-10 22:42:31 +01:00
|
|
|
%patch4 -p1
|
|
|
|
|
|
|
|
%build
|
2018-12-12 09:31:21 +01:00
|
|
|
make %{?_smp_mflags} LIBDIR="%{_libdir}" CFLAGS="$RPM_OPT_FLAGS" -C src V=1
|
|
|
|
make %{?_smp_mflags} LIBDIR="%{_libdir}" CFLAGS="$RPM_OPT_FLAGS" -C src swigify V=1
|
|
|
|
make %{?_smp_mflags} LIBDIR="%{_libdir}" CFLAGS="$RPM_OPT_FLAGS" -C src pywrap V=1
|
|
|
|
make %{?_smp_mflags} LIBDIR="%{_libdir}" CFLAGS="$RPM_OPT_FLAGS" -C src rubywrap V=1
|
2018-12-10 22:42:31 +01:00
|
|
|
|
|
|
|
%install
|
2018-12-12 09:31:21 +01:00
|
|
|
make DESTDIR="$RPM_BUILD_ROOT" LIBDIR="%{_libdir}" \
|
|
|
|
SHLIBDIR="/%{_lib}" LIBSEPOLA=%{_libdir}/libsepol.a \
|
|
|
|
-C src install V=1
|
|
|
|
make DESTDIR="$RPM_BUILD_ROOT" LIBDIR="%{_libdir}" \
|
|
|
|
SHLIBDIR="/%{_lib}" LIBSEPOLA=%{_libdir}/libsepol.a \
|
|
|
|
-C src install-pywrap V=1
|
|
|
|
make DESTDIR="$RPM_BUILD_ROOT" LIBDIR="%{_libdir}" \
|
|
|
|
SHLIBDIR="/%{_lib}" LIBSEPOLA=%{_libdir}/libsepol.a \
|
|
|
|
-C src install-rubywrap V=1
|
|
|
|
rm -rf $RPM_BUILD_ROOT/%{_lib} $RPM_BUILD_ROOT%{_libdir}/libselinux.* \
|
|
|
|
$RPM_BUILD_ROOT%{_libdir}/pkgconfig
|
2018-12-10 22:42:31 +01:00
|
|
|
|
|
|
|
%files -n python3-selinux
|
|
|
|
%defattr(-,root,root,-)
|
2018-12-12 09:31:21 +01:00
|
|
|
%{python3_sitearch}/*selinux*
|
2018-12-10 22:42:31 +01:00
|
|
|
|
|
|
|
%files -n ruby-selinux
|
|
|
|
%defattr(-,root,root,-)
|
|
|
|
%{_libdir}/ruby/vendor_ruby/%{rb_ver}/%{rb_arch}/selinux.so
|
|
|
|
|
|
|
|
%changelog
|