diff --git a/0001-add-setup.py.patch b/0001-add-setup.py.patch new file mode 100644 index 0000000..cf2f677 --- /dev/null +++ b/0001-add-setup.py.patch @@ -0,0 +1,12 @@ +--- c/setup.py 1970-01-01 08:00:00.000000000 +0800 ++++ a/setup.py 2022-11-25 17:53:10.910857335 +0800 +@@ -0,0 +1,9 @@ ++#!/usr/bin/env python ++ ++from setuptools import setup ++ ++if __name__ == "__main__": ++ setup( ++ name = "python-rpm-spec", ++ version = "0.13" ++ ) diff --git a/python-pyrpm.spec b/python-pyrpm.spec index 5ed0fb1..2ad927b 100644 --- a/python-pyrpm.spec +++ b/python-pyrpm.spec @@ -2,12 +2,13 @@ %bcond_without tests Name: python-pyrpm -Version: 0.10 +Version: 0.13 Release: 1 Summary: python-pyrpm is a Python library for parsing RPM spec files License: MIT URL: https://github.com/bkircher/%{repo_name} -Source0: https://github.com/bkircher/%{repo_name}/archive/%{version}.tar.gz#/%{repo_name}-%{version}.tar.gz +Source0: https://files.pythonhosted.org/packages/25/08/b5ae515362eadb7d25e9de3ad0b5067fc2f469fb4f4d32dcbb2a1f8ab41b/python-rpm-spec-0.13.tar.gz +Patch0: 0001-add-setup.py.patch BuildArch: noarch %description @@ -17,35 +18,68 @@ information that is contained in the spec file. %package -n python3-pyrpm Summary: python3-pyrpm is a Python 3 library for parsing RPM spec files -Provides: python-rpm-spec +Provides: python-rpm-spec = %{version}-%{release} BuildRequires: python3-devel BuildRequires: python3-setuptools %if %{with tests} BuildRequires: python3-pytest %endif - %description -n python3-pyrpm It is a Python 3 library for python-pyrpm. +%package help +Summary: Development documents and examples for python3-pyrpm +Provides: python3-python-rpm-spec-doc +%description help +It is a Python 3 library for python-pyrpm. + %prep -%autosetup -n %{repo_name}-%{version} +%autosetup -n python-rpm-spec-%{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 . %check %if %{with tests} py.test-%{python3_version} -vv tests || : %endif -%files -n python3-pyrpm +%files -n python3-pyrpm -f filelist.lst +%dir %{python3_sitelib}/* %license LICENSE %doc README.md AUTHORS examples -%{python3_sitelib}/* %changelog +* Fri Nov 25 2022 wangjunqi - 0.13-1 +- Update package to version 0.13 + * Tue Sep 29 2020 Leo Fang - Package Init diff --git a/python-rpm-spec-0.10.tar.gz b/python-rpm-spec-0.10.tar.gz deleted file mode 100644 index ab18779..0000000 Binary files a/python-rpm-spec-0.10.tar.gz and /dev/null differ diff --git a/python-rpm-spec-0.13.tar.gz b/python-rpm-spec-0.13.tar.gz new file mode 100644 index 0000000..221b0f5 Binary files /dev/null and b/python-rpm-spec-0.13.tar.gz differ