mirror of https://github.com/caronc/apprise
Updated RPM Spec file to fix rpmbuild errors on koji
parent
19dfd1430b
commit
2b1fd68e44
|
@ -161,11 +161,29 @@ BuildRequires: python%{python3_pkgversion}-pytest-cov
|
||||||
%if %{legacy_python_build}
|
%if %{legacy_python_build}
|
||||||
# backwards compatible
|
# backwards compatible
|
||||||
%py3_install
|
%py3_install
|
||||||
|
# Compile gettext catalogues from SOURCE into the INSTALLED tree
|
||||||
|
pushd %{_builddir}/%{pypi_name}-%{version}
|
||||||
|
for po in apprise/i18n/*/LC_MESSAGES/apprise.po; do
|
||||||
|
[ -f "$po" ] || continue
|
||||||
|
langdir="$(dirname "${po#apprise/i18n/}")"
|
||||||
|
outdir="%{buildroot}%{python3_sitelib}/%{pypi_name}/i18n/${langdir}"
|
||||||
|
install -d "$outdir"
|
||||||
|
msgfmt -o "${outdir}/apprise.mo" "$po"
|
||||||
|
done
|
||||||
%else
|
%else
|
||||||
%pyproject_install
|
%pyproject_install
|
||||||
%pyproject_save_files apprise
|
%pyproject_save_files apprise
|
||||||
|
|
||||||
|
# Compile gettext catalogues into the installed tree
|
||||||
|
pushd %{buildroot}%{python3_sitelib}/apprise/i18n
|
||||||
|
for po in */LC_MESSAGES/apprise.po; do
|
||||||
|
[ -f "$po" ] || continue
|
||||||
|
msgfmt -o "${po%.po}.mo" "$po"
|
||||||
|
done
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
popd
|
||||||
|
|
||||||
%{__install} -p -D -T -m 0644 packaging/man/%{pypi_name}.1 \
|
%{__install} -p -D -T -m 0644 packaging/man/%{pypi_name}.1 \
|
||||||
%{buildroot}%{_mandir}/man1/%{pypi_name}.1
|
%{buildroot}%{_mandir}/man1/%{pypi_name}.1
|
||||||
|
|
||||||
|
@ -184,7 +202,6 @@ LANG=C.UTF-8 PYTHONPATH=%{buildroot}%{python3_sitelib}:%{_builddir}/%{name}-%{ve
|
||||||
%doc README.md ACKNOWLEDGEMENTS.md CONTRIBUTING.md
|
%doc README.md ACKNOWLEDGEMENTS.md CONTRIBUTING.md
|
||||||
%{python3_sitelib}/%{pypi_name}/
|
%{python3_sitelib}/%{pypi_name}/
|
||||||
# Exclude i18n as it is handled below with the lang(spoken) tag below
|
# Exclude i18n as it is handled below with the lang(spoken) tag below
|
||||||
%exclude %{python3_sitelib}/%{pypi_name}/i18n/
|
|
||||||
%exclude %{python3_sitelib}/%{pypi_name}/cli.*
|
%exclude %{python3_sitelib}/%{pypi_name}/cli.*
|
||||||
|
|
||||||
# Handle egg-info to dist-info transfer
|
# Handle egg-info to dist-info transfer
|
||||||
|
@ -194,8 +211,14 @@ LANG=C.UTF-8 PYTHONPATH=%{buildroot}%{python3_sitelib}:%{_builddir}/%{name}-%{ve
|
||||||
%{python3_sitelib}/apprise-*.egg-info
|
%{python3_sitelib}/apprise-*.egg-info
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
%if %{legacy_python_build}
|
||||||
|
# Legacy: include all compiled locales that we produced under the package tree
|
||||||
|
%{python3_sitelib}/%{pypi_name}/i18n/*/LC_MESSAGES/apprise.mo
|
||||||
|
%else
|
||||||
# Localised Files
|
# Localised Files
|
||||||
|
%exclude %{python3_sitelib}/%{pypi_name}/i18n/
|
||||||
%lang(en) %{python3_sitelib}/%{pypi_name}/i18n/en/LC_MESSAGES/apprise.mo
|
%lang(en) %{python3_sitelib}/%{pypi_name}/i18n/en/LC_MESSAGES/apprise.mo
|
||||||
|
%endif
|
||||||
|
|
||||||
%files -n %{pypi_name}
|
%files -n %{pypi_name}
|
||||||
%{_bindir}/%{pypi_name}
|
%{_bindir}/%{pypi_name}
|
||||||
|
|
Loading…
Reference in New Issue