]>
Commit | Line | Data |
---|---|---|
8a8ce788 JK |
1 | # |
2 | # Conditional build: | |
3 | %bcond_with doc # build doc | |
4 | %bcond_with tests # do perform tests (pulls extra dependencies from network) | |
5 | %bcond_without python3 # build CPython 3.x ACME module | |
6 | ||
7 | Summary: Certbot - EFF's tool to obtain certs from Let's Encrypt | |
8 | Name: certbot | |
2a93cb85 | 9 | Version: 0.40.1 |
d6eb60e7 | 10 | Release: 7 |
8db87f51 | 11 | License: Apache v2.0 |
8a8ce788 JK |
12 | Group: Applications/Networking |
13 | Source0: https://github.com/certbot/certbot/archive/v%{version}/%{name}-%{version}.tar.gz | |
2a93cb85 | 14 | # Source0-md5: 6b187c9b843c715b5486ac4b212316cd |
8a8ce788 JK |
15 | URL: https://certbot.eff.org/ |
16 | BuildRequires: python-setuptools | |
17 | BuildRequires: rpm-pythonprov | |
18 | BuildRequires: rpmbuild(macros) >= 1.713 | |
19 | %if %{with doc} | |
20 | BuildRequires: python-repoze.sphinx.autointerface | |
21 | BuildRequires: sphinx-pdg | |
22 | %endif | |
23 | %if %{with tests} | |
24 | BuildRequires: Zope-Interface | |
25 | BuildRequires: python-mock | |
26 | BuildRequires: python-six | |
27 | %endif | |
28 | %if %{with python3} | |
29 | BuildRequires: python3-setuptools | |
547754b6 | 30 | Requires: python3-zope.component >= 4.4.1 |
30295a40 | 31 | Requires: python3-ndg-httpsclient |
547754b6 JK |
32 | %else: |
33 | Requires: python-zope.component >= 4.4.1 | |
30295a40 | 34 | Requires: python-ndg-httpsclient |
8a8ce788 JK |
35 | %endif |
36 | Obsoletes: letsencrypt | |
37 | BuildArch: noarch | |
38 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
39 | ||
40 | %description | |
41 | Certbot is part of EFF's effort to encrypt the entire Internet. Secure | |
42 | communication over the Web relies on HTTPS, which requires the use of | |
43 | a digital certificate that lets browsers verify the identify of web | |
44 | servers (e.g., is that really google.com?). Web servers obtain their | |
45 | certificates from trusted third parties called certificate authorities | |
46 | (CAs). Certbot is an easy-to-use client that fetches a certificate | |
d82cbddc ER |
47 | from Let's Encrypt - an open certificate authority launched by the |
48 | EFF, Mozilla, and others - and deploys it to a web server. | |
8a8ce788 JK |
49 | |
50 | %package -n python-acme | |
51 | Summary: Python library for the ACME protocol | |
8a8ce788 JK |
52 | Group: Libraries/Python |
53 | Obsoletes: python-acme-doc < 0.9.3 | |
54 | ||
55 | %description -n python-acme | |
56 | Python 2 library for use of the Automatic Certificate Management | |
57 | Environment protocol as defined by the IETF. It's used by the Let's | |
58 | Encrypt project. | |
59 | ||
60 | %package -n python3-acme | |
61 | Summary: Python library for the ACME protocol | |
62 | Group: Libraries/Python | |
63 | ||
64 | %description -n python3-acme | |
65 | Python 3 library for use of the Automatic Certificate Management | |
66 | Environment protocol as defined by the IETF. It's used by the Let's | |
67 | Encrypt project. | |
68 | ||
69 | %prep | |
70 | %setup -q | |
71 | ||
72 | %build | |
73 | %py_build %{?with_tests:test} | |
74 | ||
75 | %if %{with doc} | |
76 | cd docs | |
77 | %{__make} -j1 html | |
78 | rm -r _build/html/_sources | |
79 | %endif | |
80 | ||
81 | cd acme | |
82 | %py_build %{?with_tests:test} | |
83 | ||
84 | %if %{with python3} | |
85 | %py3_build %{?with_tests:test} | |
86 | %endif | |
87 | ||
88 | %if %{with doc} | |
89 | cd docs | |
90 | %{__make} -j1 html | |
91 | rm -rf _build/html/_sources | |
92 | %endif | |
93 | cd .. | |
94 | ||
95 | %install | |
96 | rm -rf $RPM_BUILD_ROOT | |
8a8ce788 JK |
97 | install -d $RPM_BUILD_ROOT{%{_sysconfdir},/var/log,/var/lib}/letsencrypt |
98 | ||
547754b6 JK |
99 | %if %{with python3} |
100 | %py3_install | |
101 | %else | |
8a8ce788 | 102 | %py_install |
547754b6 | 103 | %endif |
8a8ce788 JK |
104 | |
105 | cd acme | |
106 | ||
547754b6 JK |
107 | %py_install |
108 | ||
8a8ce788 JK |
109 | %if %{with python3} |
110 | %py3_install | |
111 | %endif | |
8a8ce788 JK |
112 | cd .. |
113 | ||
114 | %py_postclean | |
115 | ||
116 | %clean | |
117 | rm -rf $RPM_BUILD_ROOT | |
118 | ||
119 | %files | |
120 | %defattr(644,root,root,755) | |
c841caa0 | 121 | %doc README.rst CHANGELOG.md CONTRIBUTING.md docs/*.txt docs/*.rst |
8a8ce788 JK |
122 | %if %{with doc} |
123 | %doc docs/_build/html/* | |
124 | %else | |
125 | %doc docs/*.rst docs/api docs/man | |
126 | %endif | |
3f310c0c ER |
127 | %dir %{_sysconfdir}/letsencrypt |
128 | %dir /var/log/letsencrypt | |
129 | %dir /var/lib/letsencrypt | |
8a8ce788 | 130 | %attr(755,root,root) %{_bindir}/certbot |
547754b6 JK |
131 | %if %{with python3} |
132 | %{py3_sitescriptdir}/certbot | |
133 | %{py3_sitescriptdir}/certbot-%{version}*-py*.egg-info | |
134 | %else | |
8a8ce788 JK |
135 | %{py_sitescriptdir}/certbot |
136 | %{py_sitescriptdir}/certbot-%{version}*-py*.egg-info | |
547754b6 | 137 | %endif |
8a8ce788 JK |
138 | |
139 | %files -n python-acme | |
140 | %defattr(644,root,root,755) | |
141 | %doc acme/README.rst | |
142 | %if %{with doc} | |
143 | %doc acme/docs/_build/html/* | |
144 | %else | |
145 | %doc acme/docs/*.rst acme/docs/api acme/docs/man | |
146 | %endif | |
8a8ce788 JK |
147 | %{py_sitescriptdir}/acme |
148 | %{py_sitescriptdir}/acme-%{version}*-py*.egg-info | |
149 | ||
150 | %files -n python3-acme | |
151 | %defattr(644,root,root,755) | |
152 | %doc acme/README.rst | |
153 | %if %{with doc} | |
154 | %doc acme/docs/_build/html/* | |
155 | %else | |
156 | %doc acme/docs/*.rst acme/docs/api acme/docs/man | |
157 | %endif | |
158 | %{py3_sitescriptdir}/acme | |
159 | %{py3_sitescriptdir}/acme-%{version}*-py*.egg-info |