Update to 2018.1.9
Some cleanups, simplify spec and use symbol links Fix Obsoletes/Provides
This commit is contained in:
parent
8811f4c77b
commit
bd6e24f8a6
3 changed files with 54 additions and 59 deletions
|
|
@ -1,8 +1,3 @@
|
|||
%{!?__python2: %global __python2 %{__python}}
|
||||
%{!?python2_sitelib: %global python2_sitelib %{python_sitelib}}
|
||||
%{!?python2_sitearch: %global python2_sitearch %{python_sitearch}}
|
||||
%{!?python2_version: %global python2_version %{python_version}}
|
||||
|
||||
%if 0%{?rhel} >= 8 || 0%{?fedora} >= 16
|
||||
%bcond_without python3
|
||||
%else
|
||||
|
|
@ -17,8 +12,8 @@ also happens to be valid Markdown (a text-to-HTML format).
|
|||
|
||||
|
||||
Name: python-%{upname}
|
||||
Version: 2016.9.19
|
||||
Release: 8%{?dist}
|
||||
Version: 2018.1.9
|
||||
Release: 1%{?dist}
|
||||
Summary: %{common_sum}
|
||||
|
||||
License: GPLv3
|
||||
|
|
@ -35,16 +30,14 @@ BuildRequires: help2man
|
|||
|
||||
%package -n python2-%{upname}
|
||||
Summary: %{common_sum}
|
||||
|
||||
BuildRequires: python2-devel
|
||||
BuildRequires: python2-setuptools
|
||||
|
||||
%{?python_provide:%python_provide python2-%{upname}}
|
||||
|
||||
%if !%{with python3}
|
||||
Provides: %{upname} = %{version}-%{release}
|
||||
Obsoletes: %{upname} <= 1.3.2a-16
|
||||
Obsoletes: %{upname} <= 1.3.2a-17
|
||||
%endif
|
||||
%{?python_provide:%python_provide python2-%{upname}}
|
||||
|
||||
%description -n python2-%{upname}
|
||||
%{common_desc}
|
||||
|
||||
|
|
@ -52,14 +45,11 @@ Obsoletes: %{upname} <= 1.3.2a-16
|
|||
%if %{with python3}
|
||||
%package -n python3-%{upname}
|
||||
Summary: %{common_sum}
|
||||
|
||||
BuildRequires: python3-devel
|
||||
BuildRequires: python3-setuptools
|
||||
|
||||
%{?python_provide:%python_provide python3-%{upname}}
|
||||
|
||||
Provides: %{upname} = %{version}-%{release}
|
||||
Obsoletes: %{upname} <= 1.3.2a-16
|
||||
Obsoletes: %{upname} <= 1.3.2a-17
|
||||
%{?python_provide:%python_provide python3-%{upname}}
|
||||
|
||||
%description -n python3-%{upname}
|
||||
%{common_desc}
|
||||
|
|
@ -81,48 +71,33 @@ Obsoletes: %{upname} <= 1.3.2a-16
|
|||
%install
|
||||
%{__mkdir} -p %{buildroot}%{_mandir}/man1
|
||||
%py2_install
|
||||
%{__mv} -f %{buildroot}%{_bindir}/%{upname} %{buildroot}%{_bindir}/python2-%{upname}
|
||||
export PYTHONPATH="%{buildroot}%{python2_sitelib}"
|
||||
%{__mv} -f %{buildroot}%{_bindir}/%{upname} %{buildroot}%{_bindir}/%{upname}-%{python2_version}
|
||||
%{_bindir}/help2man -s 1 -N -o %{buildroot}%{_mandir}/man1/%{upname}-%{python2_version}.1 %{buildroot}%{_bindir}/%{upname}-%{python2_version}
|
||||
/bin/echo '%{_bindir}/%{upname}-%{python2_version}' > py2.mf
|
||||
/bin/echo '%{_mandir}/man1/%{upname}-%{python2_version}.1*' >> py2.mf
|
||||
for f in $(%{_bindir}/find %{buildroot}%{python2_sitelib} -name '*.py' -type f); do
|
||||
%{__sed} -e'/^#!.*/d' < ${f} > ${f}.new
|
||||
/bin/touch -r ${f} ${f}.new
|
||||
%{__mv} -f ${f}.new ${f}
|
||||
done
|
||||
%{_bindir}/find %{buildroot}%{python2_sitelib} -type f | %{_bindir}/xargs %{__chmod} -c 0644
|
||||
%{_bindir}/help2man -s 1 -N -o %{buildroot}%{_mandir}/man1/python2-%{upname}.1 %{buildroot}%{_bindir}/python2-%{upname}
|
||||
%if !%{with python3}
|
||||
pushd %{buildroot}%{_bindir}
|
||||
ln -s python2-%{upname} %{upname}
|
||||
ln -s python2-%{upname}{name}
|
||||
popd
|
||||
pushd %{buildroot}%{_mandir}/man1/
|
||||
ln -s python2-%{upname}.1 %{upname}.1
|
||||
ln -s python2-%{upname}.1 %{name}.1
|
||||
popd
|
||||
%endif
|
||||
|
||||
%if %{with python3}
|
||||
export PYTHONPATH="%{buildroot}%{python3_sitelib}"
|
||||
%py3_install
|
||||
%{__mv} -f %{buildroot}%{_bindir}/%{upname} %{buildroot}%{_bindir}/%{upname}-%{python3_version}
|
||||
/bin/ln -f %{buildroot}%{_bindir}/%{upname}-%{python3_version} %{buildroot}%{_bindir}/%{upname}
|
||||
/bin/ln -f %{buildroot}%{_bindir}/%{upname}-%{python3_version} %{buildroot}%{_bindir}/%{name}
|
||||
%{_bindir}/help2man -s 1 -N -o %{buildroot}%{_mandir}/man1/%{upname}-%{python3_version}.1 %{buildroot}%{_bindir}/%{upname}-%{python3_version}
|
||||
%{_bindir}/help2man -s 1 -N -o %{buildroot}%{_mandir}/man1/%{upname}.1 %{buildroot}%{_bindir}/%{upname}
|
||||
%{_bindir}/help2man -s 1 -N -o %{buildroot}%{_mandir}/man1/%{name}.1 %{buildroot}%{_bindir}/%{name}
|
||||
/bin/echo '%{_bindir}/%{upname}-%{python3_version}' > py3.mf
|
||||
/bin/echo '%{_mandir}/man1/%{upname}-%{python3_version}.1*' >> py3.mf
|
||||
/bin/echo '%{_bindir}/%{upname}' >> py3.mf
|
||||
/bin/echo '%{_mandir}/man1/%{upname}.1*' >> py3.mf
|
||||
/bin/echo '%{_bindir}/%{name}' >> py3.mf
|
||||
/bin/echo '%{_mandir}/man1/%{name}.1*' >> py3.mf
|
||||
for f in $(%{_bindir}/find %{buildroot}%{python3_sitelib} -name '*.py' -type f); do
|
||||
%{__sed} -e'/^#!.*/d' < ${f} > ${f}.new
|
||||
/bin/touch -r ${f} ${f}.new
|
||||
%{__mv} -f ${f}.new ${f}
|
||||
done
|
||||
%{_bindir}/find %{buildroot}%{python3_sitelib} -type f | %{_bindir}/xargs %{__chmod} -c 0644
|
||||
%else
|
||||
export PYTHONPATH="%{buildroot}%{python2_sitelib}"
|
||||
/bin/ln -f %{buildroot}%{_bindir}/%{upname}-%{python2_version} %{buildroot}%{_bindir}/%{upname}
|
||||
/bin/ln -f %{buildroot}%{_bindir}/%{upname}-%{python2_version} %{buildroot}%{_bindir}/%{name}
|
||||
%{_bindir}/help2man -s 1 -N -o %{buildroot}%{_mandir}/man1/%{upname}.1 %{buildroot}%{_bindir}/%{upname}
|
||||
%{_bindir}/help2man -s 1 -N -o %{buildroot}%{_mandir}/man1/%{name}.1 %{buildroot}%{_bindir}/%{name}
|
||||
/bin/echo '%{_bindir}/%{upname}' >> py2.mf
|
||||
/bin/echo '%{_mandir}/man1/%{upname}.1*' >> py2.mf
|
||||
/bin/echo '%{_bindir}/%{name}' >> py2.mf
|
||||
/bin/echo '%{_mandir}/man1/%{name}.1*' >> py2.mf
|
||||
%{__mv} -f %{buildroot}%{_bindir}/%{upname} %{buildroot}%{_bindir}/python3-%{upname}
|
||||
export PYTHONPATH="%{buildroot}%{python3_sitelib}"
|
||||
%{_bindir}/help2man -s 1 -N -o %{buildroot}%{_mandir}/man1/python3-%{upname}.1 %{buildroot}%{_bindir}/python3-%{upname}
|
||||
pushd %{buildroot}%{_bindir}
|
||||
ln -s python3-%{upname} %{upname}
|
||||
ln -s python3-%{upname} %{name}
|
||||
popd
|
||||
pushd %{buildroot}%{_mandir}/man1/
|
||||
ln -s python3-%{upname}.1 %{upname}.1
|
||||
ln -s python3-%{upname}.1 %{name}.1
|
||||
popd
|
||||
%endif
|
||||
|
||||
|
||||
|
|
@ -133,23 +108,42 @@ export PYTHONPATH="%{buildroot}%{python2_sitelib}"
|
|||
%endif
|
||||
|
||||
|
||||
%files -n python2-%{upname} -f py2.mf
|
||||
%files -n python2-%{upname}
|
||||
%license AUTHORS.* COPYING
|
||||
%doc README.* ChangeLog.* PKG-INFO
|
||||
%{_bindir}/python2-%{upname}
|
||||
%{_mandir}/man1/python2-%{upname}.1*
|
||||
%if !%{with python3}
|
||||
%{_bindir}/%{upname}
|
||||
%{_bindir}/%{name}
|
||||
%{_mandir}/man1/%{upname}.1*
|
||||
%{_mandir}/man1/%{name}.1*
|
||||
%endif
|
||||
%{python2_sitelib}/%{upname}
|
||||
%{python2_sitelib}/%{upname}-%{version}-py%{python2_version}.egg-info
|
||||
|
||||
|
||||
%if %{with python3}
|
||||
%files -n python3-%{upname} -f py3.mf
|
||||
%files -n python3-%{upname}
|
||||
%license AUTHORS.* COPYING
|
||||
%doc README.* ChangeLog.* PKG-INFO
|
||||
%{_bindir}/python3-%{upname}
|
||||
%{_bindir}/%{upname}
|
||||
%{_bindir}/%{name}
|
||||
%{_mandir}/man1/python3-%{upname}.1*
|
||||
%{_mandir}/man1/%{upname}.1*
|
||||
%{_mandir}/man1/%{name}.1*
|
||||
%{python3_sitelib}/%{upname}
|
||||
%{python3_sitelib}/%{upname}-%{version}-py%{python3_version}.egg-info
|
||||
%endif
|
||||
|
||||
|
||||
%changelog
|
||||
* Thu Mar 28 2019 Sérgio Basto <sergio@serjux.com> - 2018.1.9-1
|
||||
- Update to 2018.1.9
|
||||
- Some cleanups, simplify spec and use symbol links
|
||||
- Fix Obsoletes/Provides
|
||||
|
||||
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2016.9.19-8
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue