89 lines
2.6 KiB
RPMSpec
89 lines
2.6 KiB
RPMSpec
%global repo_name python-rpm-spec
|
|
%bcond_without tests
|
|
|
|
Name: python-pyrpm
|
|
Version: 0.14.1
|
|
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://files.pythonhosted.org/packages/a8/35/b00d2a67f5116f6690db70c915f0c58d190174d585b7171f007110d28b1e/python-rpm-spec-0.14.1.tar.gz
|
|
Patch0: 0001-add-setup.py.patch
|
|
BuildArch: noarch
|
|
|
|
%description
|
|
python-pyrpm is a Python library for parsing RPM spec files. This module allows
|
|
you to parse spec files and gives you simple access to various bits of
|
|
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 = %{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 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 -f filelist.lst
|
|
%dir %{python3_sitelib}/*
|
|
%license LICENSE
|
|
%doc README.md AUTHORS examples
|
|
|
|
%changelog
|
|
* Tue Apr 11 2023 Ge Wang <wang--ge@126.com> - 0.14.1-1
|
|
- Update package to version 0.14.1
|
|
|
|
* Fri Nov 25 2022 wangjunqi <wangjunqi@kylinos.cn> - 0.13-1
|
|
- Update package to version 0.13
|
|
|
|
* Tue Sep 29 2020 Leo Fang <leofang_94@163.com>
|
|
- Package Init
|