]>
Commit | Line | Data |
---|---|---|
e10a8dd3 AM |
1 | # TODO: finish, test |
2 | # | |
3 | # Conditional build: | |
4 | %bcond_without doc # don't build doc | |
5 | %bcond_without tests # do not perform "make test" | |
6 | ||
e10a8dd3 AM |
7 | Summary: Let's Encrypt client |
8 | Name: letsencrypt | |
5f4fc622 ER |
9 | Version: 0.1.0 |
10 | Release: 0.1 | |
e10a8dd3 | 11 | License: APL 2.0 |
0f357a7d | 12 | Group: Applications/Networking |
5f4fc622 ER |
13 | Source0: https://github.com/letsencrypt/letsencrypt/archive/v%{version}/%{name}-%{version}.tar.gz |
14 | # Source0-md5: eb1208bcf5c33a6f030da9419718bf6b | |
e10a8dd3 | 15 | URL: https://letsencrypt.org/ |
e10a8dd3 AM |
16 | BuildRequires: python-modules |
17 | BuildRequires: python-setuptools | |
18 | BuildRequires: rpm-pythonprov | |
ffeb482e | 19 | BuildRequires: rpmbuild(macros) >= 1.713 |
e10a8dd3 | 20 | %if %{with tests} |
ecfdcb00 ER |
21 | BuildRequires: Zope-Component |
22 | BuildRequires: Zope-Interface | |
e10a8dd3 AM |
23 | BuildRequires: python-mock |
24 | BuildRequires: python-pythondialog | |
e10a8dd3 AM |
25 | %endif |
26 | %if %{with doc} | |
27 | BuildRequires: python-repoze.sphinx.autointerfac | |
28 | BuildRequires: sphinx-pdg | |
29 | %endif | |
30 | Requires: python-cryptography | |
31 | Requires: python-modules | |
32 | Requires: python-pyOpenSSL | |
33 | Requires: python-pytz | |
34 | BuildArch: noarch | |
35 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
36 | ||
37 | %description | |
38 | The Let's Encrypt Client is a tool to automatically receive and | |
39 | install X.509 certificates to enable TLS on servers. The client will | |
40 | interoperate with the Let's Encrypt CA which will be issuing | |
41 | browser-trusted certificates for free. | |
42 | ||
43 | %prep | |
5f4fc622 | 44 | %setup -q |
e10a8dd3 AM |
45 | |
46 | %build | |
ffeb482e ER |
47 | %if %{with python2} |
48 | %py_build %{?with_tests:test} | |
49 | %endif | |
e10a8dd3 AM |
50 | |
51 | %if %{with doc} | |
52 | cd docs | |
53 | %{__make} -j1 html | |
0f357a7d | 54 | rm -r _build/html/_sources |
e10a8dd3 AM |
55 | %endif |
56 | ||
57 | %install | |
58 | rm -rf $RPM_BUILD_ROOT | |
ffeb482e | 59 | %py_install |
4b12379b ER |
60 | %py_postclean |
61 | ||
62 | # don't package tests | |
63 | %{__rm} -r $RPM_BUILD_ROOT%{py_sitescriptdir}/letsencrypt/tests | |
64 | %{__rm} -r $RPM_BUILD_ROOT%{py_sitescriptdir}/letsencrypt/plugins/*_test.py* | |
65 | ||
e10a8dd3 AM |
66 | %clean |
67 | rm -rf $RPM_BUILD_ROOT | |
68 | ||
69 | %files | |
70 | %defattr(644,root,root,755) | |
71 | %doc {CHANGES,README}.rst CONTRIBUTING.md %{?with_doc:docs/_build/html/*} | |
72 | %attr(755,root,root) %{_bindir}/letsencrypt | |
73 | %attr(755,root,root) %{_bindir}/letsencrypt-renewer | |
74 | %{py_sitescriptdir}/letsencrypt | |
0f357a7d | 75 | %{py_sitescriptdir}/letsencrypt-%{version}*-py*.egg-info |