]> git.pld-linux.org Git - projects/template-specs.git/blobdiff - python.spec
- make sure that produced rpms have the correct names
[projects/template-specs.git] / python.spec
index 4c39442328ae8f97fd244a463253c7cbc50f4b0c..cd55cf47a243b6ddb48350993455d23b5d3d79ff 100644 (file)
@@ -4,8 +4,8 @@
 #
 #
 # Conditional build:
-%bcond_without doc     # don't build doc
-%bcond_without tests   # do not perform "make test"
+%bcond_without doc     # Sphinx documentation
+%bcond_without tests   # unit tests
 %bcond_without python2 # CPython 2.x module
 %bcond_without python3 # CPython 3.x module
 
@@ -18,7 +18,7 @@
 %define                pypi_name       django-crispy-forms
 Summary:       -
 Summary(pl.UTF-8):     -
-Name:          python-%{pypi_name}
+Name:          python-%{module}
 Version:       _
 Release:       0.1
 License:       - (enter GPL/GPL v2/GPL v3/LGPL/BSD/BSD-like/other license name here)
@@ -50,15 +50,15 @@ BuildRoot:  %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %description -l pl.UTF-8
 
-%package -n python3-%{pypi_name}
+%package -n python3-%{module}
 Summary:       -
 Summary(pl.UTF-8):     -
 Group:         Libraries/Python
 Requires:      python3-modules
 
-%description -n python3-%{pypi_name}
+%description -n python3-%{module}
 
-%description -n python3-%{pypi_name} -l pl.UTF-8
+%description -n python3-%{module} -l pl.UTF-8
 
 %package apidocs
 Summary:       API documentation for Python %{module} module
@@ -66,7 +66,7 @@ Summary(pl.UTF-8):    Dokumentacja API modułu Pythona %{module}
 Group:         Documentation
 
 %description apidocs
-API documentation for Pythona %{module} module.
+API documentation for Python %{module} module.
 
 %description apidocs -l pl.UTF-8
 Dokumentacja API modułu Pythona %{module}.
@@ -113,9 +113,9 @@ rm -rf $RPM_BUILD_ROOT
 
 # in case there are examples provided
 %if %{with python2}
-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' \
+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' \
        | xargs sed -i '1s|^#!.*python\b|#!%{__python}|'
 %endif
 %if %{with python3}
@@ -134,11 +134,11 @@ 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-%{module}-%{version}
+%{_examplesdir}/python-%{pypi_name}-%{version}
 %endif
 
 %if %{with python3}
-%files -n python3-%{pypi_name}
+%files -n python3-%{module}
 %defattr(644,root,root,755)
 %doc AUTHORS CHANGES LICENSE
 %{py3_sitescriptdir}/%{module}
This page took 0.040243 seconds and 4 git commands to generate.