1 |
%define pkgname gnupg |
2 |
|
3 |
Summary: GNU privacy guard - a free PGP replacement |
4 |
Name: gnupg2 |
5 |
Version: 2.2.20 |
6 |
Release: %mkrel 3 |
7 |
License: GPLv3+ |
8 |
Group: File tools |
9 |
URL: http://www.gnupg.org |
10 |
Source0: https://gnupg.org/ftp/gcrypt/gnupg/gnupg-%{version}.tar.bz2 |
11 |
Source1: https://gnupg.org/ftp/gcrypt/gnupg/gnupg-%{version}.tar.bz2.sig |
12 |
Source2: sysconfig-gnupg2 |
13 |
Source3: gpg-agent.service |
14 |
Patch0: gnupg-1.9.3-use-ImageMagick-for-photo.patch |
15 |
|
16 |
BuildRequires: openldap-devel |
17 |
BuildRequires: sendmail-command |
18 |
BuildRequires: libgpg-error-devel >= 1.11 |
19 |
BuildRequires: libgcrypt-devel >= 1.4.0 |
20 |
BuildRequires: libassuan-devel >= 2.0.0 |
21 |
BuildRequires: libksba-devel >= 1.0.7 |
22 |
BuildRequires: pkgconfig(zlib) |
23 |
BuildRequires: docbook-utils |
24 |
BuildRequires: readline-devel |
25 |
BuildRequires: libtermcap-devel |
26 |
BuildRequires: pkgconfig(libcurl) |
27 |
BuildRequires: pkgconfig(libusb) |
28 |
BuildRequires: bzip2-devel |
29 |
BuildRequires: libassuan-devel |
30 |
BuildRequires: npth-devel |
31 |
BuildRequires: pkgconfig(gnutls) |
32 |
BuildRequires: pkgconfig(sqlite3) |
33 |
|
34 |
%{?systemd_requires} |
35 |
BuildRequires: pkgconfig(systemd) |
36 |
|
37 |
Recommends: pinentry |
38 |
|
39 |
# dirmngr is now part of gnupg2 |
40 |
Provides: dirmngr = %{version}-%{release} |
41 |
Obsoletes: dirmngr < 1.2.0-1 |
42 |
|
43 |
Obsoletes: gnupg2 < 2.2.11-3 |
44 |
Obsoletes: gnupg < 1.4.23-3 |
45 |
Provides: gnupg = %{version}-%{release} |
46 |
|
47 |
|
48 |
%description |
49 |
GnuPG is GNU's tool for secure communication and data storage. |
50 |
It can be used to encrypt data and to create digital signatures. |
51 |
It includes an advanced key management facility and is compliant |
52 |
with the proposed OpenPGP Internet standard as described in RFC2440. |
53 |
|
54 |
%prep |
55 |
%autosetup -p1 -n %{pkgname}-%{version} |
56 |
|
57 |
%build |
58 |
%serverbuild |
59 |
|
60 |
# Add libassuan headers to search path |
61 |
CPATH=%{_includedir}:%{_includedir}/libassuan2 |
62 |
export CPATH |
63 |
|
64 |
%configure \ |
65 |
--libexecdir=%{_libexecdir}/gnupg2 \ |
66 |
--enable-symcryptrun \ |
67 |
--enable-g13 \ |
68 |
--disable-rpath \ |
69 |
--without-capabilities \ |
70 |
--with-adns=no |
71 |
|
72 |
%make_build |
73 |
|
74 |
# all tests must pass on i586 and x86_64 |
75 |
%check |
76 |
# need scratch gpg database for tests |
77 |
mkdir -p $HOME/.gnupg |
78 |
[[ -n "$GPG_AGENT_INFO" ]] || eval `./agent/gpg-agent --use-standard-socket --daemon --write-env-file gpg-agent-info` |
79 |
make check |
80 |
[[ -a gpg-agent-info ]] && kill -0 `cut -d: -f 2 gpg-agent-info` |
81 |
rm -f gpg-agent-info |
82 |
|
83 |
%install |
84 |
%make_install |
85 |
|
86 |
%__install -D %{SOURCE2} %{buildroot}/%{_sysconfdir}/sysconfig/%{name} |
87 |
%__install -m 644 -D %{SOURCE3} %{buildroot}/%{_userunitdir}/gpg-agent.service |
88 |
|
89 |
# gpgconf.conf |
90 |
%__install -d %{buildroot}%{_sysconfdir}/gnupg |
91 |
touch %{buildroot}%{_sysconfdir}/gnupg/gpgconf.conf |
92 |
|
93 |
# remove this from package because the content of options.skel is the |
94 |
# identical for both gnupg 1/2, except for comment |
95 |
%__rm -rf %{buildroot}%{_datadir}/gnupg |
96 |
%__rm -rf %{buildroot}%{_docdir}/gnupg |
97 |
|
98 |
(cd %{buildroot}%{_bindir}; ln -s gpg gpg2 ) |
99 |
(cd %{buildroot}%{_bindir}; ln -s gpgv gpgv2 ) |
100 |
(cd %{buildroot}%{_mandir}/man1; ln -s gpg.1* gpg2.1 ) |
101 |
(cd %{buildroot}%{_mandir}/man1; ln -s gpgv.1* gpgv2.1 ) |
102 |
|
103 |
%find_lang %{name} |
104 |
|
105 |
%post |
106 |
#systemd_user_post does only preset, we need it enabled such that at |
107 |
#all login, the service gets started |
108 |
if [ $1 -eq 1 ]; then |
109 |
systemctl --user --global enable gpg-agent.service |
110 |
fi |
111 |
|
112 |
%preun |
113 |
%systemd_user_preun gpg-agent.service |
114 |
|
115 |
%postun |
116 |
%systemd_user_postun_with_restart gpg-agent.service |
117 |
|
118 |
%files -f %{name}.lang |
119 |
%doc README NEWS THANKS TODO ChangeLog |
120 |
%doc doc/FAQ doc/HACKING doc/KEYSERVER doc/OpenPGP doc/TRANSLATE doc/DETAILS |
121 |
%doc doc/examples |
122 |
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/sysconfig/%{name} |
123 |
%dir %{_sysconfdir}/gnupg |
124 |
%ghost %config(noreplace) %{_sysconfdir}/gnupg/gpgconf.conf |
125 |
%config(noreplace) %{_userunitdir}/gpg-agent.service |
126 |
%attr(4755,root,root) %{_bindir}/gpgsm |
127 |
%{_bindir}/gpg-agent |
128 |
%{_bindir}/gpgconf |
129 |
%{_bindir}/kbxutil |
130 |
%{_bindir}/watchgnupg |
131 |
%{_bindir}/gpg-connect-agent |
132 |
%{_bindir}/gpgparsemail |
133 |
%{_bindir}/gpg |
134 |
%{_bindir}/gpg2 |
135 |
%{_bindir}/gpgv |
136 |
%{_bindir}/gpgv2 |
137 |
%{_bindir}/symcryptrun |
138 |
%{_bindir}/dirmngr |
139 |
%{_bindir}/dirmngr-client |
140 |
%{_bindir}/g13 |
141 |
%{_bindir}/gpgscm |
142 |
%{_bindir}/gpgtar |
143 |
%{_bindir}/gpg-wks-server |
144 |
%{_sbindir}/addgnupghome |
145 |
%{_sbindir}/applygnupgdefaults |
146 |
%{_sbindir}/g13-syshelp |
147 |
%dir %{_libexecdir}/gnupg2 |
148 |
%{_libexecdir}/gnupg2/gpg-check-pattern |
149 |
%{_libexecdir}/gnupg2/gpg-preset-passphrase |
150 |
%{_libexecdir}/gnupg2/gpg-protect-tool |
151 |
%{_libexecdir}/gnupg2/scdaemon |
152 |
%{_libexecdir}/gnupg2/dirmngr_ldap |
153 |
%{_libexecdir}/gnupg2/gpg-wks-client |
154 |
%{_infodir}/gnupg.info* |
155 |
%{_mandir}/man1/gpg-agent.1* |
156 |
%{_mandir}/man1/gpg-connect-agent.1* |
157 |
%{_mandir}/man1/gpg-preset-passphrase.1* |
158 |
%{_mandir}/man1/gpg-wks-client.1* |
159 |
%{_mandir}/man1/gpg-wks-server.1* |
160 |
%{_mandir}/man1/gpg.1* |
161 |
%{_mandir}/man1/gpg2.1* |
162 |
%{_mandir}/man1/gpgv.1* |
163 |
%{_mandir}/man1/gpgv2.1* |
164 |
%{_mandir}/man1/gpgconf.1* |
165 |
%{_mandir}/man1/gpgparsemail.1* |
166 |
%{_mandir}/man1/gpgsm.1* |
167 |
%{_mandir}/man1/gpgtar.1* |
168 |
%{_mandir}/man1/scdaemon.1* |
169 |
%{_mandir}/man1/symcryptrun.1* |
170 |
%{_mandir}/man1/watchgnupg.1* |
171 |
%{_mandir}/man1/dirmngr-client.1* |
172 |
%{_mandir}/man7/gnupg.7* |
173 |
%{_mandir}/man8/addgnupghome.8* |
174 |
%{_mandir}/man8/applygnupgdefaults.8* |
175 |
%{_mandir}/man8/dirmngr.8* |