python-progressbar2/python-progressbar2.spec
cherry530 5968d3805c fix source0
Signed-off-by: cherry530 <xuping33@huawei.com>
2022-11-10 11:07:54 +08:00

78 lines
2.5 KiB
RPMSpec

%global _empty_manifest_terminate_build 0
Name: python-progressbar2
Version: 3.55.0
Release: 2
Summary: A Python Progressbar library to provide visual (yet text based) progress to long running operations.
License: BSD
URL: https://github.com/WoLpH/python-progressbar
Source0: https://github.com/WoLpH/python-progressbar/archive/refs/tags/v%{version}.tar.gz
BuildArch: noarch
%description
A text progress bar is typically used to display the progress of a long running operation, providing a visual cue that processing is underway.
%package -n python3-progressbar2
Summary: A Python Progressbar library to provide visual (yet text based) progress to long running operations.
Provides: python-progressbar2
BuildRequires: python3-devel
BuildRequires: python3-setuptools
%description -n python3-progressbar2
A text progress bar is typically used to display the progress of a long running operation, providing a visual cue that processing is underway.
%package help
Summary: Development documents and examples for progressbar2
Provides: python3-progressbar2-doc
%description help
Development documents and examples for progressbar2.
%prep
%autosetup -n python-progressbar-%{version}
%build
%py3_build
%install
%py3_install
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
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
mv %{buildroot}/filelist.lst .
mv %{buildroot}/doclist.lst .
sed -i 's/\(^.*$\)/"\1"/g' filelist.lst doclist.lst
find %{buildroot} -type f -exec file {} ';' | grep "\<ELF\>" | awk -F ':' '{print $1}' | xargs -i chrpath --delete "{}"
%files -n python3-progressbar2 -f filelist.lst
%dir %{python3_sitelib}/*
%files help -f doclist.lst
%{_docdir}/*
%changelog
* Thu Nov 10 2022 xuping <xuping33@h-partners.com> - 3.55.0-2
- change source0
* Mon Oct 18 2021 yinzehao <yinzehao@uniontech.com> - 3.55.0-1
- Package Spec generated