#============================================================================= # Overview of build options: # # End of build options #----------------------------------------------------------------------------- ##trace %global moduletype apps %global modulename gotosocial %global selinuxvariants targeted #%%global selinuxbooleans ... %global version 1.0 %global release 1 #============================================================================= # general #----------------------------------------------------------------------------- Name: gotosocial-selinux Version: %{version} Release: %{release}%{?dist} Summary: SELinux module for GoToSocial License: GPLv3 URL: https://github.com/lzap/gotosocial-selinux Source0: gotosocial-selinux.tar.gz BuildArch: noarch BuildRequires: selinux-policy-devel %{?selinux_requires} %description SELinux module for GoToSocial #============================================================================= # prep #----------------------------------------------------------------------------- %prep %autosetup -p1 -n %{name} #============================================================================= # build #----------------------------------------------------------------------------- %build for selinuxvariant in %selinuxvariants; do make NAME=${selinuxvariant} -f %{_datadir}/selinux/devel/Makefile mv %{modulename}.pp %{modulename}.pp.${selinuxvariant} make NAME=${selinuxvariant} -f %{_datadir}/selinux/devel/Makefile clean done #============================================================================= # install #----------------------------------------------------------------------------- %install for selinuxvariant in %selinuxvariants; do install -d %{buildroot}%{_datadir}/selinux/${selinuxvariant} install -p -m 644 %{modulename}.pp.${selinuxvariant} \ %{buildroot}%{_datadir}/selinux/${selinuxvariant}/%{modulename}.pp done #============================================================================= # post #----------------------------------------------------------------------------- %pre for selinuxvariant in %selinuxvariants; do %selinux_relabel_pre -s $selinuxvariant done %post for selinuxvariant in %selinuxvariants; do %selinux_modules_install -s $selinuxvariant %{_datadir}/selinux/${selinuxvariant}/%{modulename}.pp # %%selinux_set_booleans -s $selinuxvariant %%{selinuxbooleans} done %postun if [ $1 -eq 0 ]; then for selinuxvariant in %selinuxvariants; do %selinux_modules_uninstall -s $selinuxvariant %{modulename} #%%selinux_unset_booleans -s $selinuxvariant %%{selinuxbooleans} done fi %posttrans for selinuxvariant in %selinuxvariants; do %selinux_relabel_post -s $selinuxvariant done #============================================================================= # files #----------------------------------------------------------------------------- %files %defattr(-,root,root,-) %attr(0644,root,root) %{_datadir}/selinux/*/%{modulename}.pp #============================================================================= # changelog #----------------------------------------------------------------------------- %changelog * Sun Aug 27 2023 Patrick Laimbock - 1.0-1 - initial build for EL9