setools/setools.spec

142 lines
3.8 KiB
RPMSpec
Raw Normal View History

2019-09-30 11:16:53 -04:00
Name: setools
Version: 4.1.1
Release: 14
Summary: Policy Analysis Tools for SELinux
License: GPLv2
URL: https://github.com/SELinuxProject/setools/wiki
Source0: https://github.com/SELinuxProject/setools/archive/%{version}.tar.gz
Source1: setools.pam
Source2: apol.desktop
Patch1: 0001-Do-not-use-Werror-during-build.patch
Patch2: 0002-Do-not-export-use-setools.InfoFlowAnalysis-and-setoo.patch
Patch3: 0003-bswap_-macros-are-defined-in-byteswap.h.patch
Patch4: 0004-Add-support-for-SCTP-protocol.patch
Patch6000: iomemconquery-Fix-IomemconRange-import.patch
Patch6001: sediff-Fix-bug-in-rendering-modified-nodecons.patch
BuildRequires: flex bison glibc-devel gcc swig git python3-setuptools
BuildRequires: qt5-qtbase-devel python2-devel python2-setuptools python3-devel
BuildRequires: libsepol-devel >= 2.8-1 libsepol-static >= 2.8-1
Requires: python3-setools = %{version}-%{release}
Obsoletes: setools < 4.0.0, setools-devel < 4.0.0
%description
SETools consists of a number of SELinux policy analysis tools, both graphical
and command line.
%package console
Summary: Console packages for setools
License: GPLv2
Requires: python3-setools = %{version}-%{release} libselinux >= 2.8-1
%description console
Console packages for setools.
%package console-analyses
Summary: Analyses files for setools-console
License: GPLv2
Requires: python3-setools = %{version}-%{release}
Requires: libselinux >= 2.8-1 python3-networkx
%description console-analyses
Analyses files for setools-console.
%package -n python2-setools
Summary: Python2 package for setools
Requires: python2-enum34 python2-setuptools
Provides: setools-python = %{version}-%{release}
Obsoletes: setools-python < %{version}-%{release}
Recommends: python2-libselinux
%{?python_provide:%python_provide python2-setools}
%description -n python2-setools
Python2 package for setools
%package -n python3-setools
Summary: Python3 package for setools
Requires: python3-setuptools
Provides: setools-python3 = %{version}-%{release}
Obsoletes: setools-libs < 4.0.0
Obsoletes: setools-python3 < %{version}-%{release}
Recommends: libselinux-python3
%{?python_provide:%python_provide python3-setools}
%description -n python3-setools
Python3 package for setools.
%package gui
Summary: Gui packages for setools
Requires: python3-setools = %{version}-%{release}
Requires: python3-qt5 python3-networkx
%description gui
Gui packages for setools.
%package_help
%prep
%autosetup -n setools-%{version} -p1
cp -a ../setools-%{version} ../setools-%{version}-python2
%build
%{__python3} setup.py build
pushd ../setools-%{version}-python2
%{__python2} setup.py build
popd
%install
pushd ../setools-%{version}-python2
%{__python2} setup.py install --root %{buildroot}
popd
rm -rf %{buildroot}%{_bindir}
%{__python3} setup.py install --root %{buildroot}
%check
%if %{?_with_check:1}%{!?_with_check:0}
%{__python3} setup.py test
pushd ../setools-%{version}-python2
%{__python2} setup.py test
popd
%endif
%files
%files console
%defattr(-,root,root)
%{_bindir}/sediff
%{_bindir}/seinfo
%{_bindir}/sesearch
%files console-analyses
%defattr(-,root,root)
%{_bindir}/sedta
%{_bindir}/seinfoflow
%files -n python2-setools
%defattr(-,root,root)
%license COPYING COPYING.GPL COPYING.LGPL
%{python2_sitearch}/*
%files -n python3-setools
%defattr(-,root,root)
%license COPYING COPYING.GPL COPYING.LGPL
%{python3_sitearch}/setools
%{python3_sitearch}/setools-%{version}-*
%files gui
%defattr(-,root,root)
%{_bindir}/apol
%{python3_sitearch}/setoolsgui
%files help
%defattr(-,root,root)
%{_mandir}/man1/*
%changelog
* Tue Sep 17 2019 openEuler Buildteam <buildteam@openeuler.org> - 4.1.1-14
- Package init