Name: mini-tps Version: 0.1 Release: 145%{?dist} Summary: Mini TPS - Test Package Sanity License: GPLv2 URL: https://gitlab.cee.redhat.com/osci/mini-tps Source0: %{name}.tar.gz Requires: yum-utils # List of packages for wich do not run 'remove' test. Requires: openssh-server yum BuildArch: noarch %if 0%{?rhel} > 7 # bug: https://bugzilla.redhat.com/show_bug.cgi?id=1641631 Requires: rpm-plugin-selinux Requires: dnf-plugins-core Requires: libselinux-utils %endif %description Light version of TPS %prep %setup -n %{name} %build %if 0%{?fedora} # there is no platform-python in Fedora sed -i 's|^#!/usr/libexec/platform-python$|#!/usr/bin/python3|g' mtps-mutils %endif %install mkdir -p %{buildroot}%{_prefix}/local/bin/ cp -rfp mtps* %{buildroot}%{_prefix}/local/bin/ mkdir -p %{buildroot}%{_sysconfdir}/dnf/protected.d cp -pf mini-tps.conf %{buildroot}%{_sysconfdir}/dnf/protected.d/ %if 0%{?fedora} # repo files mkdir -p %{buildroot}%{_datarootdir}/mini-tps/profiles/fedora/repos/ cp -rfp profiles/fedora/repos/*.repo %{buildroot}%{_datarootdir}/mini-tps/profiles/fedora/repos/ # prepare script mkdir -p %{buildroot}%{_libexecdir}/mini-tps/fedora/ cp -rfp profiles/fedora/prepare-system %{buildroot}%{_libexecdir}/mini-tps/fedora/prepare-system %else # repo files mkdir -p %{buildroot}%{_datarootdir}/mini-tps/profiles/{rhel,centos}/repos/ cp -rfp profiles/rhel/repos/*.repo %{buildroot}%{_datarootdir}/mini-tps/profiles/rhel/repos/ cp -rfp profiles/centos/repos/*.repo %{buildroot}%{_datarootdir}/mini-tps/profiles/centos/repos/ # prepare script mkdir -p %{buildroot}%{_libexecdir}/mini-tps/{rhel,centos}/ cp -rfp profiles/rhel/prepare-system %{buildroot}%{_libexecdir}/mini-tps/rhel/prepare-system cp -rfp profiles/centos/prepare-system %{buildroot}%{_libexecdir}/mini-tps/centos/prepare-system %endif %files %{_prefix}/local/bin/mtps* %{_sysconfdir}/dnf/protected.d/mini-tps.conf %{_datarootdir}/mini-tps/* %{_libexecdir}/mini-tps/* %changelog * Tue Aug 23 2022 Michal Srb - 0.1-140 - Update spec for multi-os support. * Thu Jun 25 2020 Andrei Stepanov - 0.1-139 - Build with the latest merged PRs.