]> git.pld-linux.org Git - packages/python-dkimpy.git/blob - python-dkimpy.spec
e21a7c916769c7f16365a2bc6adbbd3e5d0da46b
[packages/python-dkimpy.git] / python-dkimpy.spec
1 #
2 # Conditional build:
3 %bcond_with     tests   # unit tests
4 %bcond_without  python2 # CPython 2.x module
5 %bcond_without  python3 # CPython 3.x module
6
7 # NOTES:
8 # - 'module' should match the Python import path (first component?)
9 # - 'egg_name' should equal to Python egg name
10 # - 'pypi_name' must match the Python Package Index name
11 %define         module          dkimpy
12 Summary:        DKIM, ARC, and TLSRPT email signing and verification
13 Name:           python-%{module}
14 Version:        1.0.5
15 Release:        5
16 License:        BSD-like
17 Group:          Libraries/Python
18 Source0:        https://files.pythonhosted.org/packages/source/d/dkimpy/%{module}-%{version}.tar.gz
19 # Source0-md5:  080909e6557c01bb4855e37cd53d3e39
20 URL:            https://launchpad.net/dkimpy
21 %if %{with python2}
22 BuildRequires:  python-modules >= 1:2.5
23 BuildRequires:  python-setuptools
24 %if %{with tests}
25 BuildRequires:  python-PyNaCl
26 BuildRequires:  python-aiodns
27 BuildRequires:  python-authres
28 BuildRequires:  python-dns >= 1.16
29 %endif
30 %endif
31 %if %{with python3}
32 BuildRequires:  python3-modules >= 1:3.2
33 BuildRequires:  python3-setuptools
34 %if %{with tests}
35 BuildRequires:  python3-PyNaCl
36 BuildRequires:  python3-aiodns
37 BuildRequires:  python3-authres
38 BuildRequires:  python3-dns >= 1.16
39 %endif
40 %endif
41 BuildRequires:  rpm-pythonprov
42 BuildRequires:  rpmbuild(macros) >= 1.714
43 Requires:       python-modules >= 1:2.5
44 BuildArch:      noarch
45 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
46
47 %description
48 Python module that implements DKIM (DomainKeys Identified Mail) email
49 signing and verification (RFC6376).
50
51 %description -l pl.UTF-8
52
53 %package -n python3-%{module}
54 Summary:        DKIM, ARC, and TLSRPT email signing and verification
55 Group:          Libraries/Python
56 Requires:       python3-modules >= 1:3.2
57
58 %description -n python3-%{module}
59 Python module that implements DKIM (DomainKeys Identified Mail) email
60 signing and verification (RFC6376).
61
62 %prep
63 %setup -q -n %{module}-%{version}
64
65 %build
66 %if %{with python2}
67 %py_build %{?with_tests:test}
68 %endif
69
70 %if %{with python3}
71 %py3_build %{?with_tests:test}
72 %endif
73
74 %install
75 rm -rf $RPM_BUILD_ROOT
76
77 %if %{with python2}
78 %py_install
79
80 %py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
81 %py_comp $RPM_BUILD_ROOT%{py_sitedir}
82 %py_postclean
83 %endif
84
85 %if %{with python3}
86 %py3_install
87 %endif
88
89 %clean
90 rm -rf $RPM_BUILD_ROOT
91
92 %if %{with python2}
93 %files
94 %defattr(644,root,root,755)
95 %doc ChangeLog README.md
96 %if %{without python3}
97 %attr(755,root,root) %{_bindir}/arcsign
98 %attr(755,root,root) %{_bindir}/arcverify
99 %attr(755,root,root) %{_bindir}/dkimsign
100 %attr(755,root,root) %{_bindir}/dkimverify
101 %attr(755,root,root) %{_bindir}/dknewkey
102 %{_mandir}/man1/arcsign.1*
103 %{_mandir}/man1/arcverify.1*
104 %{_mandir}/man1/dkimsign.1*
105 %{_mandir}/man1/dkimverify.1*
106 %{_mandir}/man1/dknewkey.1*
107 %endif
108 %{py_sitescriptdir}/dkim
109 %{py_sitescriptdir}/%{module}-%{version}-py*.egg-info
110 %endif
111
112 %if %{with python3}
113 %files -n python3-%{module}
114 %defattr(644,root,root,755)
115 %doc ChangeLog README.md
116 %attr(755,root,root) %{_bindir}/arcsign
117 %attr(755,root,root) %{_bindir}/arcverify
118 %attr(755,root,root) %{_bindir}/dkimsign
119 %attr(755,root,root) %{_bindir}/dkimverify
120 %attr(755,root,root) %{_bindir}/dknewkey
121 %{_mandir}/man1/arcsign.1*
122 %{_mandir}/man1/arcverify.1*
123 %{_mandir}/man1/dkimsign.1*
124 %{_mandir}/man1/dkimverify.1*
125 %{_mandir}/man1/dknewkey.1*
126 %{py3_sitescriptdir}/dkim
127 %{py3_sitescriptdir}/%{module}-%{version}-py*.egg-info
128 %endif
This page took 0.046708 seconds and 2 git commands to generate.