initialize package

This commit is contained in:
yinzehao 2021-10-15 15:32:15 +08:00
parent 2db075ce24
commit 1b9bb96646
2 changed files with 74 additions and 0 deletions

Binary file not shown.

74
python-progressbar2.spec Normal file
View File

@ -0,0 +1,74 @@
%global _empty_manifest_terminate_build 0
Name: python-progressbar2
Version: 3.55.0
Release: 1
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/python-progressbar-%{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
* Mon Oct 18 2021 yinzehao <yinzehao@uniontech.com> - 3.55.0-1
- Package Spec generated