%global selinuxtype targeted %global modulename mysql Name: mysql-selinux Version: 1.0.7 Release: 1 License: GPLv3 URL: https://github.com/devexp-db/mysql-selinux Summary: SELinux policies for product Source0: https://github.com/devexp-db/mysql-selinux/archive/%{version}/%{name}-%{version}.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} -p1 %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 * Wed Oct 25 2023 yaoxin - 1.0.7-1 - Upgrade to 1.0.7 * 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