summaryrefslogtreecommitdiff
path: root/packaging/gcr.spec
blob: c8fdc900cfd19344162ef70406aaf845610589e0 (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
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
%define baseline 3.8

%define enable_gtk no

Name:           gcr
Version:        3.8.2
Release:        0
Summary:        Library for Crypto UI related task
License:        LGPL-2.1+
Group:          Security/Crypto Libraries
Url:            http://www.gnome.org
Source0:        http://download.gnome.org/sources/gcr/%{baseline}/%{name}-%{version}.tar.xz
BuildRequires:  gnome-common
BuildRequires:  gpg2
BuildRequires:  gtk-doc
BuildRequires:  intltool
BuildRequires:  libgcrypt-devel >= 1.2.2
BuildRequires:  libtasn1-devel
BuildRequires:  shared-mime-info
BuildRequires:  update-desktop-files 
BuildRequires:  pkgconfig(dbus-1)
BuildRequires:  pkgconfig(gio-2.0)
BuildRequires:  pkgconfig(gio-unix-2.0)
BuildRequires:  pkgconfig(glib-2.0) >= 2.30.0
BuildRequires:  pkgconfig(gmodule-no-export-2.0)
BuildRequires:  pkgconfig(gobject-2.0)
BuildRequires:  pkgconfig(gobject-introspection-1.0)
BuildRequires:  pkgconfig(gthread-2.0)
%if %{?enable_gtk} != no
BuildRequires:  pkgconfig(gtk+-3.0) >= 3.0
%endif
BuildRequires:  pkgconfig(libtasn1)
BuildRequires:  pkgconfig(p11-kit-1) >= 0.6

%description
GCR is a library for displaying certificates, and crypto UI, accessing
key stores. It also provides the viewer for crypto files on the GNOME
desktop.

GCK is a library for accessing PKCS#11 modules like smart cards, in a
(G)object oriented way.


%if %{?enable_gtk} != no
%package viewer
Summary:        Viewer for Crypto Files
Group:          Security/Certificate Management

%description viewer
This packages provides the viewer for crypto files on the GNOME desktop.
%endif


%package data
Summary:        Data and icon set for gcr
Group:          Security/Crypto Libraries
Requires(post): glib2-tools
Requires(postun): glib2-tools

%description data
This package provides the GSettings schemas and a collection of icons
needed by libgcr.


%if %{?enable_gtk} != no
%package prompter
Summary:        Prompt dialog for Crypto UI related task
Group:          System/Libraries

%description prompter
This package provides the prompt dialog needed by libgcr.
%endif


%package -n libgcr
Summary:        Library for Crypto UI related task
Group:          System/Libraries
Requires:       %{name}-data >= %{version}
%if %{?enable_gtk} != no
Requires:       %{name}-prompter >= %{version}
%endif

%description -n libgcr
GCR is a library for displaying certificates, and crypto UI, accessing
key stores.


%package -n typelib-Gcr
Summary:        Library for Crypto UI related task -- Introspection bindings
Group:          System/Libraries

%description -n typelib-Gcr
GCR is a library for displaying certificates, and crypto UI, accessing
key stores.

This package provides the GObject Introspection bindings for GCR.


%package -n libgcr-devel
Summary:        Library for Crypto UI related task - Development Files
Group:          Development/Libraries
Requires:       libgcr = %{version}
Requires:       typelib-Gcr = %{version}

%description -n libgcr-devel
GCR is a library for displaying certificates, and crypto UI, accessing
key stores.


%if %{?enable_gtk} != no
%package -n libgcr-ui
Summary:        Library for Crypto UI related task
Group:          System/Libraries
Requires:       %{name}-data >= %{version}
Requires:       %{name}-prompter >= %{version}

%description -n libgcr-ui
GCR is a library for displaying certificates, and crypto UI, accessing
key stores.ey stores.

%package -n typelib-GcrUi
Summary:        Library for Crypto UI related task -- Introspection bindings
Group:          System/Libraries

%description -n typelib-GcrUi
GCR is a library for displaying certificates, and crypto UI, accessing
key stores.

This package provides the GObject Introspection bindings for GCR.
%endif


%if %{?enable_gtk} != no
%package -n libgcr-ui-devel
Summary:        Library for Crypto UI related task - Development Files
Group:          Development/Libraries
Requires:       libgcr-ui = %{version}
Requires:       libgcr-devel = %{version}
Requires:       typelib-Gcr = %{version}
%endif

%if %{?enable_gtk} != no
%description -n libgcr-ui-devel
GCR is a library for displaying certificates, and crypto UI, accessing
key stores.
%endif


%package -n libgck
Summary:        GObject library to access for PKCS#11 modules
Group:          System/Libraries
Provides:       gck = %{version}

%description -n libgck
GCK is a library for accessing PKCS#11 modules like smart cards, in a
(G)object oriented way.


%package -n typelib-Gck
Summary:        GObject library to access for PKCS#11 modules -- Introspection bindings
Group:          Security/Crypto Libraries

%description -n typelib-Gck
GCK is a library for accessing PKCS#11 modules like smart cards, in a
(G)object oriented way.

This package provides the GObject Introspection bindings for GCK.


%package -n libgck-devel
Summary:        GObject library to access for PKCS#11 modules - Development Files
Group:          Development/Libraries
Requires:       libgck = %{version}
Requires:       typelib-Gck = %{version}

%description -n libgck-devel
GCK is a library for accessing PKCS#11 modules like smart cards, in a
(G)object oriented way.

%prep
%setup -q

%build

%autogen \
 --with-gtk=%{?enable_gtk} \
 --disable-gtk-doc-html

make

%install
%make_install
%if %{?enable_gtk} != no
%tizen_update_desktop_file gcr-prompter
%tizen_update_desktop_file gcr-viewer
%endif
%find_lang %{name}

%if %{?enable_gtk} != no
%post viewer
%desktop_database_post
%mime_database_post

%postun viewer
%desktop_database_postun
%mime_database_postun
%endif

%post data
%glib2_gsettings_schema_post
%icon_theme_cache_post

%postun data
%glib2_gsettings_schema_postun
%icon_theme_cache_postun

%post -n libgcr -p /sbin/ldconfig

%postun -n libgcr -p /sbin/ldconfig

%post -n libgck -p /sbin/ldconfig

%postun -n libgck -p /sbin/ldconfig

%if %{?enable_gtk} != no
%post -n libgcr-ui -p /sbin/ldconfig

%postun -n libgcr-ui -p /sbin/ldconfig


%files viewer
%defattr(-,root,root)
%license COPYING
%{_bindir}/gcr-viewer
%{_datadir}/applications/gcr-viewer.desktop
%{_datadir}/mime/packages/gcr-crypto-types.xml
%endif


%files data
%defattr(-, root, root)
%if %{?enable_gtk} != no
%{_datadir}/icons/hicolor/*/apps/*
%endif
%dir %{_datadir}/GConf
%dir %{_datadir}/GConf/gsettings
%{_datadir}/GConf/gsettings/org.gnome.crypto.pgp.convert
%{_datadir}/GConf/gsettings/org.gnome.crypto.pgp_keyservers.convert
%{_datadir}/glib-2.0/schemas/org.gnome.crypto.pgp.gschema.xml


%if %{?enable_gtk} != no
%files prompter
%defattr(-, root, root)
%{_libexecdir}/gcr-prompter
%{_datadir}/applications/gcr-prompter.desktop
%{_datadir}/dbus-1/services/org.gnome.keyring.PrivatePrompter.service
%{_datadir}/dbus-1/services/org.gnome.keyring.SystemPrompter.service
%endif


%files -n libgcr
%defattr (-, root, root)
%license COPYING
%{_libdir}/libgcr-base-3.so.*
%if %{?enable_gtk} != no
%{_libdir}/libgcr-3.so.*
%{_datadir}/gcr-3/
%endif


%files -n typelib-Gcr
%defattr(-,root,root)
%{_libdir}/girepository-1.0/Gcr-3.typelib


%files -n libgcr-devel
%defattr (-, root, root)
%if %{?enable_gtk} != no
%{_libdir}/libgcr-3.so
%{_libdir}/pkgconfig/gcr-3.pc
%endif
%{_libdir}/libgcr-base-3.so
%{_libdir}/pkgconfig/gcr-base-3.pc
%{_includedir}/gcr-3/


%files -n libgck
%defattr (-, root, root)
%license COPYING
%{_libdir}/libgck-1.so.*


%files -n typelib-Gck
%defattr(-,root,root)
%{_libdir}/girepository-1.0/Gck-1.typelib


%files -n libgck-devel
%defattr (-, root, root)
%{_libdir}/libgck-1.so
%{_libdir}/pkgconfig/gck-1.pc
%{_includedir}/gck-1/
%{_datadir}/gir-1.0/Gck-1.gir
%{_datadir}/gir-1.0/Gcr-3.gir


%if %{?enable_gtk} != no
%files -n libgcr-ui
%defattr (-, root, root)
%license COPYING
%{_libdir}/libgcr-ui-3.so.1
%{_libdir}/libgcr-ui-3.so.1.0.0
%{_datadir}/gir-1.0/GcrUi-3.gir


%files -n typelib-GcrUi
%defattr(-,root,root)
%{_libdir}/girepository-1.0/GcrUi-3.typelib


%files -n libgcr-ui-devel
%defattr (-, root, root)
%{_libdir}/libgcr-ui-3.so
%{_libdir}/pkgconfig/gcr-ui-3.pc
%endif

%lang_package -n libgcr