mcstrans/mcstrans.spec

96 lines
2.9 KiB
RPMSpec
Raw Permalink Normal View History

2012-02-01 21:59:52 +00:00
Summary: SELinux Translation Daemon
Name: mcstrans
Version: 3.7
Release: 1%{?dist}
License: GPL-2.0-or-later
Url: https://github.com/SELinuxProject/selinux/wiki
Source0: https://github.com/SELinuxProject/selinux/releases/download/3.7/mcstrans-3.7.tar.gz
Source1: https://github.com/SELinuxProject/selinux/releases/download/3.7/mcstrans-3.7.tar.gz.asc
Source2: https://github.com/bachradsusi.gpg
Source3: secolor.conf.8
2021-10-22 13:39:49 +00:00
# fedora-selinux/selinux: git format-patch -N 3.3 -- mcstrans
# i=1; for j in 00*patch; do printf "Patch%04d: %s\n" $i $j; i=$((i+1));done
# Patch list start
# Patch list end
BuildRequires: gcc
2020-12-14 11:13:05 +00:00
BuildRequires: make
BuildRequires: libselinux-devel >= %{version}
BuildRequires: libcap-devel pcre2-devel libsepol-devel libsepol-static
BuildRequires: systemd
BuildRequires: gnupg2
Requires: pcre2
%{?systemd_requires}
2012-02-01 21:59:52 +00:00
Provides: setransd
Provides: libsetrans
%description
Security-enhanced Linux is a feature of the Linux® kernel and a number
of utilities with enhanced security functionality designed to add
mandatory access controls to Linux. The Security-enhanced Linux
kernel contains new architectural components originally developed to
improve the security of the Flask operating system. These
architectural components provide general support for the enforcement
of many kinds of mandatory access control policies, including those
based on the concepts of Type Enforcement®, Role-based Access
Control, and Multi-level Security.
mcstrans provides an translation daemon to translate SELinux categories
from internal representations to user defined representation.
%prep
%{gpgverify} --keyring='%{SOURCE2}' --signature='%{SOURCE1}' --data='%{SOURCE0}'
2023-12-14 17:25:07 +00:00
%autosetup -p 2 -n mcstrans-%{version}
2012-02-01 21:59:52 +00:00
%build
2019-03-11 16:51:04 +00:00
%set_build_flags
%make_build LIBDIR="%{_libdir}"
2012-02-01 21:59:52 +00:00
%install
rm -rf %{buildroot}
mkdir -p %{buildroot}/%{_lib}
mkdir -p %{buildroot}/%{_libdir}
mkdir -p %{buildroot}%{_usr}/share/mcstrans
mkdir -p %{buildroot}%{_sysconfdir}/selinux/mls/setrans.d
%make_install LIBDIR="%{_libdir}" SHLIBDIR="%{_lib}" SBINDIR="%{_sbindir}"
2012-02-01 21:59:52 +00:00
rm -f %{buildroot}%{_libdir}/*.a
cp -r share/* %{buildroot}%{_usr}/share/mcstrans/
# Systemd
mkdir -p %{buildroot}%{_unitdir}
2023-01-16 15:38:49 +00:00
ln -s mcstrans.service %{buildroot}/%{_unitdir}/mcstransd.service
2012-02-01 21:59:52 +00:00
rm -rf %{buildroot}/%{_sysconfdir}/rc.d/init.d/mcstrans
install -m644 %{SOURCE3} %{buildroot}%{_mandir}/man8/
2012-02-01 21:59:52 +00:00
%post
%systemd_post mcstransd.service
2012-02-01 21:59:52 +00:00
%preun
%systemd_preun mcstransd.service
2012-02-01 21:59:52 +00:00
%postun
%systemd_postun mcstransd.service
2012-02-01 21:59:52 +00:00
%files
%{_mandir}/man8/mcs.8.gz
%{_mandir}/man8/mcstransd.8.gz
%{_mandir}/man5/setrans.conf.5.gz
%{_mandir}/man8/secolor.conf.8.gz
/usr/sbin/mcstransd
%{_unitdir}/mcstrans.service
2012-02-01 21:59:52 +00:00
%{_unitdir}/mcstransd.service
%dir %{_sysconfdir}/selinux/mls/setrans.d
%dir %{_usr}/share/mcstrans
%defattr(0644,root,root,0755)
%dir %{_usr}/share/mcstrans/util
%dir %{_usr}/share/mcstrans/examples
%{_usr}/share/mcstrans/examples/*
%defattr(0755,root,root,0755)
%{_usr}/share/mcstrans/util/*
%changelog
%autochangelog