blob: df8f914a6836437b1278a2a91b92db82c4d55d1b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
|
# remirepo/fedora spec file for rnp
#
# Copyright (c) 2022 Remi Collet
# License: CC-BY-SA
# http://creativecommons.org/licenses/by-sa/4.0/
#
# Please, preserve the changelog entries
#
%bcond_without tests
%bcond_with licensecheck
%if 0%{?rhel} == 8
# use openssl by default as botan2 is too old
%bcond_without openssl
%else
# use botan2 as openssl seems experimental/wip
%bcond_with openssl
%endif
%global libname librnp
%global soname 0
Name: rnp
Summary: OpenPGP (RFC4880) tools
Version: 0.16.2
Release: 4%{?dist}
# See rnp-files-by-license.txt and upstream LICENSE* files
License: BSD-2-Clause AND BSD-3-Clause AND Apache-2.0 AND MIT
URL: https://github.com/rnpgp/rnp
Source0: %{url}/archive/v%{version}/%{name}-%{version}.tar.gz
Source1: %{url}/releases/download/v%{version}/v%{version}.tar.gz.asc
# See https://www.rnpgp.org/openpgp_keys/
Source2: %{name}-keyring.gpg
# Use --with licensecheck to generate
Source3: %{name}-files-by-license.txt
# License clarification
Patch0: %{name}-upstream.patch
BuildRequires: cmake >= 3.14
BuildRequires: gcc
BuildRequires: gcc-c++
BuildRequires: pkg-config
BuildRequires: pkgconfig(zlib)
BuildRequires: pkgconfig(bzip2)
%if %{with openssl}
BuildRequires: openssl-devel >= 1.1.1
BuildRequires: json-c-devel >= 0.11
BuildRequires: gtest-devel
%else
BuildRequires: pkgconfig(botan-2) >= 2.14
BuildRequires: cmake(json-c) >= 0.11
BuildRequires: cmake(GTest)
%endif
BuildRequires: python3
BuildRequires: gnupg2
BuildRequires: rubygem-asciidoctor
%if %{with licensecheck}
BuildRequires: licensecheck
%endif
Requires: %{libname}%{?_isa} = %{version}-%{release}
%description
RNP is a set of OpenPGP (RFC4880) tools.
%package -n %{libname}
Summary: Library for all OpenPGP functions
%description -n %{libname}
%{libname} is the library used by RNP for all OpenPGP functions,
useful for developers to build against, different from GPGME.
%package -n %{libname}-devel
Summary: Header files and development libraries for %{libname}
Requires: %{libname}%{?_isa} = %{version}-%{release}
%description -n %{libname}-devel
This package contains the header files and development libraries
for %{libname}.
%prep
%setup -q
%{?gpgverify:%{gpgverify} --keyring='%{SOURCE2}' --signature='%{SOURCE1}' --data='%{SOURCE0}'}
%patch0 -p1
%if %{with licensecheck}
LST=$(mktemp)
licensecheck -r . | sed -e 's:^./::' >$LST
grep -v UNKNOWN $LST | sed -e 's/.*: //' | sort -u | while read lic
do
echo -e "\n$lic\n------------"
grep ": $lic\$" $LST | sed -e "s/: $lic//"
done | tee %{SOURCE3}
rm $LST
%endif
%build
%cmake . \
%if %{with openssl}
-DCRYPTO_BACKEND:STRING=openssl \
%else
-DCRYPTO_BACKEND:STRING=botan \
%endif
-DDOWNLOAD_GTEST:BOOL=OFF \
-DDOWNLOAD_RUBYRNP:BOOL=OFF
%cmake_build
%install
%cmake_install
%if %{with tests}
%check
%ctest
%endif
%files
%{_bindir}/rnp
%{_bindir}/rnpkeys
%{_mandir}/man1/rnp*
%files -n %{libname}
%license LICENSE*
%{_libdir}/%{libname}.so.%{soname}*
%files -n %{libname}-devel
%doc CHANGELOG.md
%{_includedir}/rnp
%{_libdir}/%{libname}.so
%{_libdir}/pkgconfig/%{libname}.pc
%{_libdir}/cmake/rnp
%{_mandir}/man3/librnp*
%changelog
* Fri Nov 4 2022 Remi Collet <remi@remirepo.net> - 0.16.2-4
- add upstream fix to clarify license and abandoned patent
* Wed Nov 2 2022 Remi Collet <remi@remirepo.net> - 0.16.2-3
- add files by license list in package sources
- open https://github.com/rnpgp/rnp/issues/1932 missing MIT
- add man pages
- check archive signature
* Fri Oct 28 2022 Remi Collet <remi@remirepo.net> - 0.16.2-2
- switch from botan-2 to openssl on EL-8
* Thu Oct 27 2022 Remi Collet <remi@remirepo.net> - 0.16.2-1
- initial package
|