%global selinuxtype targeted %global moduletype contrib %global modulename mysql Name: mysql-selinux Version: 1.0.0 Release: 2 License: GPLv3 URL: https://github.com/kubco2/mysql-selinux Summary: SELinux policies for product Source0: https://github.com/kubco2/mysql-selinux/archive/1.0.0.tar.gz BuildArch: noarch BuildRequires: selinux-policy-devel systemd Requires(post): policycoreutils %{?selinux_requires} %description SELinux policy modules for product. %prep %autosetup -n %{name}-%{version} %pre %selinux_relabel_pre -s %{selinuxtype} %build make %install install -d %{buildroot}%{_datadir}/selinux/packages install -m 0644 %{modulename}.pp.bz2 %{buildroot}%{_datadir}/selinux/packages %check %post %selinux_modules_install -s %{selinuxtype} %{_datadir}/selinux/packages/%{modulename}.pp.bz2 || : %postun if [ $1 -eq 0 ]; then %selinux_modules_uninstall -s %{selinuxtype} %{modulename} || : fi %posttrans %selinux_relabel_post -s %{selinuxtype} || : %files %defattr(-,root,root,0755) %attr(0644,root,root) %{_datadir}/selinux/packages/%{modulename}.pp.bz2 %ghost %{_sharedstatedir}/selinux/%{selinuxtype}/active/modules/200/%{modulename} %license COPYING %changelog * Sun Jun 6 2021 zhaoyao - 1.0.0-2 - fixs error: pkgconfig(systemd) is needed by mysql-selinux. * Tue Jul 21 2020 zhangjiapeng - 1.0.0-1 - package init