Name: mcstrans Version: 0.3.3 Release: %mkrel 4 Summary: SELinux Translation Daemon License: GPL+ Group: System/Servers Source: http://fedora.redhat.com/projects/%{name}-%{version}.tgz Source1: mcstransd.service Patch0: mcstrans-0.3.2-writepid.patch BuildRequires: selinux-devel >= 1.30.3-1 BuildRequires: libcap-devel BuildRequires: pcre-devel BuildRequires: sepol-devel BuildRequires: sepol-static-devel BuildRequires: systemd-units Requires: pcre Requires(pre): systemd-units Requires(post): systemd-units Provides: setransd = %{version}-%{release} Obsoletes: 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 %setup -q %patch0 -p1 -b .writepid %build %make clean %make LIBDIR="%{_libdir}" CFLAGS="-g %{optflags}" %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 DESTDIR="%{buildroot}" LIBDIR="%{buildroot}%{_libdir}" SHLIBDIR="%{buildroot}/%{_lib}" install rm -f %{buildroot}%{_sbindir}/* rm -f %{buildroot}%{_libdir}/*.a cp -r share/* %{buildroot}%{_usr}/share/mcstrans/ # Systemd mkdir -p %{buildroot}%{_unitdir} install -m644 %{SOURCE1} %{buildroot}%{_unitdir} rm -rf %{buildroot}/%{_sysconfdir}/rc.d/init.d/mcstrans %post if [ $1 -eq 1 ] ; then /usr/bin/systemctl daemon-reload >/dev/null 2>&1 || : fi %preun if [ $1 -eq 0 ]; then /usr/bin/systemctl --no-reload mcstransd.service >/dev/null 2>&1 || : /usr/bin/systemctl stop mcstransd.service > /dev/null 2>&1 || : fi %postun /usr/bin/systemctl daemon-reload >/dev/null 2>&1 || : if [ $1 -ge 1 ]; then /usr/bin/systemctl try-restart mcstransd.service >/dev/null 2>&1 || : fi %files %{_sysconfdir}/selinux/mls/setrans.d /sbin/mcstransd %{_unitdir}/mcstransd.service %{_datadir}/mcstrans/examples/* %{_datadir}/mcstrans/util/* %{_mandir}/man8/mcs.8.* %{_mandir}/man8/mcstransd.8.* %{_mandir}/man8/setrans.conf.8.* %changelog * Sat Jan 12 2013 umeabot <umeabot> 0.3.3-4.mga3 + Revision: 359860 - Mass Rebuild - https://wiki.mageia.org/en/Feature:Mageia3MassRebuild * Sat Dec 01 2012 fwang <fwang> 0.3.3-3.mga3 + Revision: 323808 - rebuild for new pcre * Sun Sep 09 2012 spuhler <spuhler> 0.3.3-2.mga3 + Revision: 291518 - added Provides: setransd bumped release * Sun Sep 09 2012 spuhler <spuhler> 0.3.3-1.mga3 + Revision: 291413 - cleaned up spec file and adjusted to mga - SIELENT added file from fedora - SIELENT added file from fedora - imported package mcstrans