!22 License compliance rectification
From: @bzg1107 Reviewed-by: @zengwefeng Signed-off-by: @zengwefeng
This commit is contained in:
commit
63a9209658
Binary file not shown.
BIN
docutils-0.19.tar.gz
Normal file
BIN
docutils-0.19.tar.gz
Normal file
Binary file not shown.
@ -1,98 +1,91 @@
|
||||
%global _empty_manifest_terminate_build 0
|
||||
%global modname docutils
|
||||
%global flashfilename biohazard.swf
|
||||
%global flashfilepath docs/user/rst/images/
|
||||
|
||||
Name: python-%{modname}
|
||||
Version: 0.17.1
|
||||
Release: 1
|
||||
Summary: Documentation Utilities Written in Python, for General- and Special-Purpose Use
|
||||
License: Public Domain and BSD and Python and GPLv3+
|
||||
URL: http://docutils.sourceforge.net
|
||||
Source0: http://downloads.sourceforge.net/docutils/docutils-%{version}.tar.gz
|
||||
BuildArch: noarch
|
||||
|
||||
BuildRequires: python3-devel
|
||||
|
||||
%global _description \
|
||||
Docutils is an open-source text processing system for processing plaintext\
|
||||
documentation into useful formats, such as HTML, LaTeX, man-pages,\
|
||||
open-document or XML. It includes reStructuredText, the easy to read, easy\
|
||||
to use, what-you-see-is-what-you-get plaintext markup language.
|
||||
|
||||
Name: python-docutils
|
||||
Version: 0.19
|
||||
Release: 1
|
||||
Summary: Documentation Utilities Written in Python, for General- and Special-Purpose Use
|
||||
License: Public Domain and BSD-2-Clause and Python and GPL-3.0-or-later
|
||||
URL: http://docutils.sourceforge.net
|
||||
Source0: https://files.pythonhosted.org/packages/6b/5c/330ea8d383eb2ce973df34d1239b3b21e91cd8c865d21ff82902d952f91f/%{modname}-0.19.tar.gz
|
||||
BuildArch: noarch
|
||||
|
||||
%description
|
||||
%{_description}
|
||||
|
||||
%package -n python3-%{modname}
|
||||
Summary: %{summary} for python3
|
||||
Requires: python3-lxml
|
||||
%{?python_provide:%python_provide python3-%{modname}}
|
||||
|
||||
%description -n python3-%{modname}
|
||||
%package -n python3-docutils
|
||||
Summary: Documentation Utilities Written in Python, for General- and Special-Purpose Use
|
||||
Provides: python-docutils = %{version}-%{release}
|
||||
BuildRequires: python3-devel
|
||||
%description -n python3-docutils
|
||||
%{_description}
|
||||
|
||||
This package run under python3.
|
||||
|
||||
|
||||
%package_help
|
||||
|
||||
%package help
|
||||
Summary: Development documents and examples for docutils
|
||||
Provides: python3-docutils-doc
|
||||
%description help
|
||||
%{_description}
|
||||
|
||||
%prep
|
||||
%autosetup -n %{modname}-%{version} -p1
|
||||
|
||||
# Remove shebang from library files
|
||||
for file in {code_analyzer,punctuation_chars,error_reporting,smartquotes,math/latex2mathml,math/math2html}; do
|
||||
sed -i -e '/#! *\/usr\/bin\/.*/{1D}' docutils/utils/$file.py
|
||||
done
|
||||
sed -i -e '/#! *\/usr\/bin\/.*/{1D}' docutils/writers/xetex/__init__.py
|
||||
|
||||
iconv -f ISO88592 -t UTF8 tools/editors/emacs/IDEAS.rst > tmp
|
||||
mv tmp tools/editors/emacs/IDEAS.rst
|
||||
|
||||
rm -rf %{py3dir}
|
||||
cp -a . %{py3dir}
|
||||
|
||||
pushd %{py3dir}
|
||||
rm -rf test/test_writers/test_odt.py
|
||||
popd
|
||||
%autosetup -n docutils-%{version}
|
||||
|
||||
%build
|
||||
pushd %{py3dir}
|
||||
%py3_build
|
||||
popd
|
||||
|
||||
%install
|
||||
rm -rf %{buildroot}%{python3_sitelib}/test
|
||||
mv %{flashfilepath}%{flashfilename} ./%{flashfilename}
|
||||
|
||||
rm -f %{buildroot}/%{_bindir}/*
|
||||
pushd %{py3dir}
|
||||
%py3_install
|
||||
mv %{flashfilepath}%{flashfilename} ./%{flashfilename}
|
||||
install -d -m755 %{buildroot}/%{_pkgdocdir}
|
||||
if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi
|
||||
if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi
|
||||
if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi
|
||||
if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi
|
||||
if [ -f README.rst ]; then cp -af README.rst %{buildroot}/%{_pkgdocdir}; fi
|
||||
if [ -f README.md ]; then cp -af README.md %{buildroot}/%{_pkgdocdir}; fi
|
||||
if [ -f README.txt ]; then cp -af README.txt %{buildroot}/%{_pkgdocdir}; fi
|
||||
pushd %{buildroot}
|
||||
if [ -d usr/lib ]; then
|
||||
find usr/lib -type f -printf "/%h/%f\n" >> filelist.lst
|
||||
fi
|
||||
if [ -d usr/lib64 ]; then
|
||||
find usr/lib64 -type f -printf "/%h/%f\n" >> filelist.lst
|
||||
fi
|
||||
if [ -d usr/bin ]; then
|
||||
find usr/bin -type f -printf "/%h/%f\n" >> filelist.lst
|
||||
fi
|
||||
if [ -d usr/sbin ]; then
|
||||
find usr/sbin -type f -printf "/%h/%f\n" >> filelist.lst
|
||||
fi
|
||||
touch doclist.lst
|
||||
if [ -d usr/share/man ]; then
|
||||
find usr/share/man -type f -printf "/%h/%f.gz\n" >> doclist.lst
|
||||
fi
|
||||
popd
|
||||
|
||||
for file in %{buildroot}/%{_bindir}/*.py; do
|
||||
mv $file `dirname $file`/`basename $file .py`
|
||||
done
|
||||
|
||||
mv %{buildroot}/filelist.lst .
|
||||
mv %{buildroot}/doclist.lst .
|
||||
|
||||
%check
|
||||
pushd %{py3dir}
|
||||
mv %{flashfilename} %{flashfilepath}%{flashfilename}
|
||||
python3 test/alltests.py
|
||||
rm %{flashfilepath}%{flashfilename}
|
||||
popd
|
||||
|
||||
%files -n python3-docutils -f filelist.lst
|
||||
%dir %{python3_sitelib}/*
|
||||
|
||||
%files -n python3-%{modname}
|
||||
%files help -f doclist.lst
|
||||
%{_docdir}/*
|
||||
%doc BUGS.txt FAQ.txt HISTORY.txt README.txt RELEASE-NOTES.txt THANKS.txt tools/editors
|
||||
%license COPYING.txt licenses/*.txt
|
||||
%{python3_sitelib}/*
|
||||
%{_bindir}/*
|
||||
|
||||
%files help
|
||||
%doc BUGS.txt FAQ.txt HISTORY.txt README.txt RELEASE-NOTES.txt
|
||||
%doc THANKS.txt docs tools/editors
|
||||
|
||||
%changelog
|
||||
* Mon Dec 05 2022 wangjunqi <wangjunqi@kylinos.cn> - 0.19-1
|
||||
- Update package to version 0.19
|
||||
|
||||
* Mon May 9 2022 baizhonggui <baizhonggui@h-partners.com> - 0.17.1-2
|
||||
- modify license identifier
|
||||
|
||||
* Wed Jan 12 2022 shixuantong <shixuantong@huawei.com> - 0.17.1-1
|
||||
- update version to 0.17.1
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user