python-certbot/python-certbot.spec
cherry530 65e65aa736 add python-certbot
Signed-off-by: cherry530 <xuping33@huawei.com>
2021-07-12 14:33:06 +08:00

116 lines
3.2 KiB
RPMSpec

%global _empty_manifest_terminate_build 0
%define debug_package %{nil}
Name: python-certbot
Version: 1.16.0
Release: 1
Summary: ACME client
License: Apache License 2.0
URL: https://github.com/certbot/certbot
Source0: https://github.com/certbot/certbot/archive/refs/tags/v1.16.0.tar.gz
BuildArch: noarch
Requires: python3-ConfigArgParse
Requires: python3-configobj
Requires: python3-cryptography
Requires: python3-distro
Requires: python3-josepy
Requires: python-parsedatetime
Requires: python3-pyrfc3339
Requires: python3-pytz
Requires: python3-zope-component
Requires: python3-zope-interface
%description
The python3 libraries to interface with certbot.
%package -n python3-certbot
Summary: ACME client
Provides: python-certbot
BuildRequires: python3-devel
BuildRequires: python3-setuptools
%description -n python3-certbot
The python3 libraries to interface with certbot
%package -n python3-acme
Summary:ACME protocol implementation in Python
Provides:python-acme
BuildRequires: python3-devel
BuildRequires: python3-setuptools
%description -n python3-acme
Python libraries implementing the Automatic Certificate Management Environment (ACME)protocol.it is used by the Let's Encrypt project.
%package help
Summary: Development documents and examples for certbot
Provides: python3-certbot-doc
%description help
The python3 libraries to interface with certbot
%prep
%autosetup -n certbot-1.16.0 -p1
%build
cd ./certbot
%py3_build
cd ./../acme/
%py3_build
cd ./../
%install
cd ./certbot
%py3_install
cd ./../acme
%py3_install
cd ./../
install -d -m755 %{buildroot}/%{_pkgdocdir}
cd ./certbot
if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}/certbot; fi
if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}/certbot; fi
if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}/certbot; fi
if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}/certbot; fi
cd ./../acme
if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}/acme; fi
if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}/acme; fi
if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}/acme; fi
if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}/acme; fi
pushd %{buildroot}
#if [ -d usr/lib ]; then
# find usr/lib -type f -printf "/%h/%f\n" >> certbot-filelist.lst
#fi
#if [ -d usr/lib64 ]; then
# find usr/lib64 -type f -printf "/%h/%f\n" >> certbot-filelist.lst
#fi
#if [ -d usr/bin ]; then
# find usr/bin -type f -printf "/%h/%f\n" >> certbot-filelist.lst
#fi
#if [ -d usr/sbin ]; then
# find usr/sbin -type f -printf "/%h/%f\n" >> certbot-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
cd ../
#mv %{buildroot}/certbot-filelist.lst .
mv %{buildroot}/doclist.lst .
%files -n python3-certbot
%dir %{python3_sitelib}/*
%{python3_sitelib}/certbot
%{python3_sitelib}/certbot-1.16.0-py3.8.egg-info
%{_bindir}/certbot
%files help -f doclist.lst
%{_docdir}/*
%files -n python3-acme
%dir %{python3_sitelib}/*
%{python3_sitelib}/acme
%{python3_sitelib}/acme-1.16.0-py3.8.egg-info
%changelog
* Mon Jun 28 2021 Python_Bot <Python_Bot@openeuler.org> - 1.16.0-1
- Package Spec generated