diff --git a/freeipa-healthcheck.spec b/freeipa-healthcheck.spec index f7b27d9..f735cc4 100644 --- a/freeipa-healthcheck.spec +++ b/freeipa-healthcheck.spec @@ -1,38 +1,36 @@ %if 0%{?rhel} -%global project ipa -%global projectname IPA -%global alt_project freeipa +%global prefix ipa +%global productname IPA +%global alt_prefix freeipa %else # Fedora -%global project freeipa -%global projectname FreeIPA -%global alt_project ipa +%global prefix freeipa +%global productname FreeIPA +%global alt_prefix ipa %endif -%global shortname healthcheck -%global longname ipa%{shortname} %global debug_package %{nil} %global python3dir %{_builddir}/python3-%{name}-%{version}-%{release} %{!?python3_sitelib: %global python3_sitelib %(%{__python3} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")} -%global alt_name %{alt_project}-%{shortname} +%global alt_name %{alt_prefix}-healthcheck %bcond_without tests -Name: %{project}-%{shortname} +Name: %{prefix}-healthcheck Version: 0.8 Release: 5%{?dist} -Summary: Health check tool for %{projectname} +Summary: Health check tool for %{productname} BuildArch: noarch License: GPLv3 URL: https://github.com/freeipa/freeipa-healthcheck Source0: https://github.com/freeipa/freeipa-healthcheck/archive/%{version}.tar.gz -Source1: %{longname}.conf +Source1: ipahealthcheck.conf Patch0001: 0001-Remove-ipaclustercheck.patch Patch0002: 0002-Handle-slight-different-in-exception-output-in-Pytho.patch Patch0003: 0003-Failed-expected-group-should-be-a-string-not-a-list.patch Requires: %{name}-core = %{version}-%{release} -Requires: %{project}-server +Requires: %{prefix}-server Requires: python3-ipalib Requires: python3-ipaserver Requires: python3-lib389 >= 1.4.2.14-1 @@ -79,7 +77,7 @@ Core files %prep -%autosetup -p1 -n freeipa-%{shortname}-%{version} +%autosetup -p1 -n freeipa-healthcheck-%{version} %build @@ -89,25 +87,25 @@ Core files %install %py3_install -mkdir -p %{buildroot}%{_sysconfdir}/%{longname} -install -m644 %{SOURCE1} %{buildroot}%{_sysconfdir}/%{longname} +mkdir -p %{buildroot}%{_sysconfdir}/ipahealthcheck +install -m644 %{SOURCE1} %{buildroot}%{_sysconfdir}/ipahealthcheck mkdir -p %{buildroot}/%{_unitdir} -install -p -m644 %{_builddir}/freeipa-%{shortname}-%{version}/systemd/ipa-%{shortname}.service %{buildroot}%{_unitdir} -install -p -m644 %{_builddir}/freeipa-%{shortname}-%{version}/systemd/ipa-%{shortname}.timer %{buildroot}%{_unitdir} +install -p -m644 %{_builddir}/freeipa-healthcheck-%{version}/systemd/ipa-healthcheck.service %{buildroot}%{_unitdir} +install -p -m644 %{_builddir}/freeipa-healthcheck-%{version}/systemd/ipa-healthcheck.timer %{buildroot}%{_unitdir} mkdir -p %{buildroot}/%{_libexecdir}/ipa -install -p -m755 %{_builddir}/freeipa-%{shortname}-%{version}/systemd/ipa-%{shortname}.sh %{buildroot}%{_libexecdir}/ipa/ +install -p -m755 %{_builddir}/freeipa-healthcheck-%{version}/systemd/ipa-healthcheck.sh %{buildroot}%{_libexecdir}/ipa/ mkdir -p %{buildroot}%{_sysconfdir}/logrotate.d -install -p -m644 %{_builddir}/freeipa-%{shortname}-%{version}/logrotate/%{longname} %{buildroot}%{_sysconfdir}/logrotate.d +install -p -m644 %{_builddir}/freeipa-healthcheck-%{version}/logrotate/ipahealthcheck %{buildroot}%{_sysconfdir}/logrotate.d -mkdir -p %{buildroot}/%{_localstatedir}/log/ipa/%{shortname} +mkdir -p %{buildroot}/%{_localstatedir}/log/ipa/healthcheck mkdir -p %{buildroot}/%{_mandir}/man8 mkdir -p %{buildroot}/%{_mandir}/man5 -install -p -m644 %{_builddir}/freeipa-%{shortname}-%{version}/man/man8/ipa-%{shortname}.8 %{buildroot}%{_mandir}/man8/ -install -p -m644 %{_builddir}/freeipa-%{shortname}-%{version}/man/man5/%{longname}.conf.5 %{buildroot}%{_mandir}/man5/ +install -p -m644 %{_builddir}/freeipa-healthcheck-%{version}/man/man8/ipa-healthcheck.8 %{buildroot}%{_mandir}/man8/ +install -p -m644 %{_builddir}/freeipa-healthcheck-%{version}/man/man5/ipahealthcheck.conf.5 %{buildroot}%{_mandir}/man5/ (cd %{buildroot}/%{python3_sitelib}/ipahealthcheck && find . -type f | \ grep -v '^./core' | \ @@ -123,28 +121,28 @@ tox -epy3 %post -%systemd_post ipa-%{shortname}.service +%systemd_post ipa-healthcheck.service %preun -%systemd_preun ipa-%{shortname}.service +%systemd_preun ipa-healthcheck.service %postun -%systemd_postun_with_restart ipa-%{shortname}.service +%systemd_postun_with_restart ipa-healthcheck.service %files -f healthcheck.list %{!?_licensedir:%global license %%doc} %license COPYING %doc README.md -%{_bindir}/ipa-%{shortname} -%dir %{_sysconfdir}/%{longname} -%dir %{_localstatedir}/log/ipa/%{shortname} -%config(noreplace) %{_sysconfdir}/%{longname}/%{longname}.conf -%config(noreplace) %{_sysconfdir}/logrotate.d/%{longname} -%{python3_sitelib}/%{longname}-%{version}-*.egg-info/ -%{python3_sitelib}/%{longname}-%{version}-*-nspkg.pth +%{_bindir}/ipa-healthcheck +%dir %{_sysconfdir}/ipahealthcheck +%dir %{_localstatedir}/log/ipa/healthcheck +%config(noreplace) %{_sysconfdir}/ipahealthcheck/ipahealthcheck.conf +%config(noreplace) %{_sysconfdir}/logrotate.d/ipahealthcheck +%{python3_sitelib}/ipahealthcheck-%{version}-*.egg-info/ +%{python3_sitelib}/ipahealthcheck-%{version}-*-nspkg.pth %{_unitdir}/* %{_libexecdir}/* %{_mandir}/man8/* @@ -155,7 +153,7 @@ tox -epy3 %{!?_licensedir:%global license %%doc} %license COPYING %doc README.md -%{python3_sitelib}/%{longname}/core/ +%{python3_sitelib}/ipahealthcheck/core/ %changelog