From bd6e24f8a6b197e850ddc488177e02ced13b8a2c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9rgio=20M=2E=20Basto?= Date: Fri, 29 Mar 2019 01:21:04 +0000 Subject: [PATCH] Update to 2018.1.9 Some cleanups, simplify spec and use symbol links Fix Obsoletes/Provides --- .gitignore | 1 + python-html2text.spec | 110 ++++++++++++++++++++---------------------- sources | 2 +- 3 files changed, 54 insertions(+), 59 deletions(-) diff --git a/.gitignore b/.gitignore index 2698d91..79c38d5 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ html2text-2.38.py /aaronsw-html2text-3.02-77-gc368b14.tar.gz /html2text-2015.6.6.tar.gz /html2text-2016.9.19.tar.gz +/html2text-2018.1.9.tar.gz diff --git a/python-html2text.spec b/python-html2text.spec index ff679bc..87a679c 100644 --- a/python-html2text.spec +++ b/python-html2text.spec @@ -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 - 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 - 2016.9.19-8 - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild diff --git a/sources b/sources index 66ee526..ecf85a4 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (html2text-2016.9.19.tar.gz) = cbc67f2815c20bfed84bfdff1c44ac3f4d6cbeb5e5b62adaf08b485fb2c886605b7f8a9f85f420e1158117194e7aa3de064aaef5ca018f5c81d15ebf5065b061 +SHA512 (html2text-2018.1.9.tar.gz) = c081a50ab5318ee3debb3dd218a23374a8a4e4f5df7664f938606698c52846fa5b8c99a9c04e5dc36aa65ff2c3af422e2d9c6ffbe07f06a46256bd434915539b