checkpolicy/checkpolicy.spec
Vítězslav Čížek 1c1b89d210 Accepting request 642650 from home:jsegitz:branches:security:SELinux
- Update to version 2.8 (bsc#1111732)
- Dropped checkpolicy-build.patch, not necessary anymore
- Removed BuildRequires for byacc. It builds without and this blocks
  building on SLE 15

OBS-URL: https://build.opensuse.org/request/show/642650
OBS-URL: https://build.opensuse.org/package/show/security:SELinux/checkpolicy?expand=0&rev=41
2018-10-23 12:14:10 +00:00

92 lines
2.9 KiB
RPMSpec

#
# spec file for package checkpolicy
#
# 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/
#
%define libsepol_ver 2.8
Name: checkpolicy
Version: 2.8
Release: 0
Summary: SELinux policy compiler
License: GPL-2.0-or-later
Group: Productivity/Security
Url: https://github.com/SELinuxProject/selinux
Source0: https://raw.githubusercontent.com/wiki/SELinuxProject/selinux/files/releases/20170804/%{name}-%{version}.tar.gz
Source1: checkpolicy-tests.tar.gz
BuildRequires: bison
BuildRequires: flex
BuildRequires: libselinux-devel
BuildRequires: libsepol-devel-static => %{libsepol_ver}
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
checkpolicy is the SELinux policy compiler. It uses libsepol to
generate the binary policy.
(Security-enhanced Linux is a feature of the kernel and some
utilities that implement mandatory access control policies, such as
Type Enforcement, Role-based Access Control and Multi-Level
Security.)
%package devel
Summary: Development files for SELinux policy compiler
Group: Development/Libraries/C and C++
Requires: %{name} = %{version}
%description devel
checkpolicy is the SELinux policy compiler. It uses libsepol to
generate the binary policy.
This package contains the development files, which are
necessary to develop your own software using checkpolicy.
%package -n python3-%{name}
Summary: Python bindings for SELinux policy compiler
Group: Development/Libraries/Python
Requires: %{name} = %{version}
%description -n python3-%{name}
checkpolicy is the SELinux policy compiler. It uses libsepol to
generate the binary policy.
This package contains the Python bindindgs, which are necessary
to use checkpolicy from Python.
%prep
%setup -q
%build
make clean
make LIBDIR="%{_libdir}" CFLAGS="%{optflags}" LDFLAGS="$RPM_LD_FLAGS"
(cd test
make LIBDIR="%{_libdir}" CFLAGS="%{optflags}" LDFLAGS="$RPM_LD_FLAGS" )
%install
mkdir -p ${RPM_BUILD_ROOT}%{_bindir}
make LIBDIR="%{_libdir}" DESTDIR="${RPM_BUILD_ROOT}" install
install test/dismod ${RPM_BUILD_ROOT}%{_bindir}/sedismod
install test/dispol ${RPM_BUILD_ROOT}%{_bindir}/sedispol
%files
%defattr(-,root,root)
%{_bindir}/checkpolicy
%{_bindir}/checkmodule
%{_bindir}/sedismod
%{_bindir}/sedispol
%{_mandir}/man8/check*.*%{ext_man}
%changelog