From: Jakub Bogusz Date: Fri, 4 Oct 2019 14:22:09 +0000 (+0200) Subject: - use package name for examples dir X-Git-Url: https://git.pld-linux.org/?a=commitdiff_plain;h=1ce447705b0bf8117fecd72d00c5f067b51d3bd1;p=projects%2Ftemplate-specs.git - use package name for examples dir --- diff --git a/python.spec b/python.spec index cd55cf4..2aeed08 100644 --- a/python.spec +++ b/python.spec @@ -113,15 +113,15 @@ rm -rf $RPM_BUILD_ROOT # in case there are examples provided %if %{with python2} -install -d $RPM_BUILD_ROOT%{_examplesdir}/python-%{pypi_name}-%{version} -cp -a examples/* $RPM_BUILD_ROOT%{_examplesdir}/python-%{pypi_name}-%{version} -find $RPM_BUILD_ROOT%{_examplesdir}/python-%{pypi_name}-%{version} -name '*.py' \ +install -d $RPM_BUILD_ROOT%{_examplesdir}/python-%{module}-%{version} +cp -a examples/* $RPM_BUILD_ROOT%{_examplesdir}/python-%{module}-%{version} +find $RPM_BUILD_ROOT%{_examplesdir}/python-%{module}-%{version} -name '*.py' \ | xargs sed -i '1s|^#!.*python\b|#!%{__python}|' %endif %if %{with python3} -install -d $RPM_BUILD_ROOT%{_examplesdir}/python3-%{pypi_name}-%{version} -cp -a examples/* $RPM_BUILD_ROOT%{_examplesdir}/python3-%{pypi_name}-%{version} -find $RPM_BUILD_ROOT%{_examplesdir}/python3-%{pypi_name}-%{version} -name '*.py' \ +install -d $RPM_BUILD_ROOT%{_examplesdir}/python3-%{module}-%{version} +cp -a examples/* $RPM_BUILD_ROOT%{_examplesdir}/python3-%{module}-%{version} +find $RPM_BUILD_ROOT%{_examplesdir}/python3-%{module}-%{version} -name '*.py' \ | xargs sed -i '1s|^#!.*python\b|#!%{__python3}|' %endif @@ -134,7 +134,7 @@ rm -rf $RPM_BUILD_ROOT %doc AUTHORS CREDITS ChangeLog NEWS README THANKS TODO %{py_sitescriptdir}/%{module} %{py_sitescriptdir}/%{egg_name}-%{version}-py*.egg-info -%{_examplesdir}/python-%{pypi_name}-%{version} +%{_examplesdir}/python-%{module}-%{version} %endif %if %{with python3} @@ -143,7 +143,7 @@ rm -rf $RPM_BUILD_ROOT %doc AUTHORS CHANGES LICENSE %{py3_sitescriptdir}/%{module} %{py3_sitescriptdir}/%{egg_name}-%{version}-py*.egg-info -%{_examplesdir}/python3-%{pypi_name}-%{version} +%{_examplesdir}/python3-%{module}-%{version} %endif %if %{with doc}