]> git.pld-linux.org Git - projects/template-specs.git/commitdiff
python: use pypi_name macro in files as well
authorElan Ruusamäe <glen@pld-linux.org>
Sun, 25 Jun 2017 09:18:00 +0000 (12:18 +0300)
committerElan Ruusamäe <glen@pld-linux.org>
Sun, 25 Jun 2017 09:18:07 +0000 (12:18 +0300)
python.spec

index e9beeaea8655e5309acc5c1c325617a569ef2f84..b88a95a499a322466c35a033769924c438f37a20 100644 (file)
@@ -48,15 +48,15 @@ BuildRoot:  %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %description -l pl.UTF-8
 
-%package -n python3-%{module}
+%package -n python3-%{pypi_name}
 Summary:       -
 Summary(pl.UTF-8):     -
 Group:         Libraries/Python
 Requires:      python3-modules
 
-%description -n python3-%{module}
+%description -n python3-%{pypi_name}
 
-%description -n python3-%{module} -l pl.UTF-8
+%description -n python3-%{pypi_name} -l pl.UTF-8
 
 %package apidocs
 Summary:       API documentation for Python %{module} module
@@ -117,9 +117,9 @@ 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-%{module}-%{version}
-cp -a examples/* $RPM_BUILD_ROOT%{_examplesdir}/python3-%{module}-%{version}
-find $RPM_BUILD_ROOT%{_examplesdir}/python3-%{module}-%{version} -name '*.py' \
+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' \
        | xargs sed -i '1s|^#!.*python\b|#!%{__python3}|'
 %endif
 
@@ -136,12 +136,12 @@ rm -rf $RPM_BUILD_ROOT
 %endif
 
 %if %{with python3}
-%files -n python3-%{module}
+%files -n python3-%{pypi_name}
 %defattr(644,root,root,755)
 %doc AUTHORS CHANGES LICENSE
 %{py3_sitescriptdir}/%{module}
 %{py3_sitescriptdir}/%{egg_name}-%{version}-py*.egg-info
-%{_examplesdir}/python3-%{module}-%{version}
+%{_examplesdir}/python3-%{pypi_name}-%{version}
 %endif
 
 %if %{with doc}
This page took 0.1357 seconds and 4 git commands to generate.