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