]>
Commit | Line | Data |
---|---|---|
fe90e304 JB |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without apidocs # do not build and package API docs | |
4 | %bcond_without static_libs # don't build static libraries | |
5 | # | |
6 | Summary: Library for reading and writing Jcat files | |
7 | Summary(pl.UTF-8): Biblioteka do odczytu i zapisu plików Jcat | |
8 | Name: libjcat | |
09f99e81 JB |
9 | Version: 0.1.3 |
10 | Release: 1 | |
fe90e304 JB |
11 | License: LGPL v2.1+ |
12 | Group: Libraries | |
13 | Source0: https://people.freedesktop.org/~hughsient/releases/%{name}-%{version}.tar.xz | |
09f99e81 | 14 | # Source0-md5: ec4b45654b4302d31657a639e5539967 |
fe90e304 JB |
15 | URL: https://github.com/hughsie/libjcat |
16 | BuildRequires: glib2-devel >= 1:2.45.8 | |
17 | BuildRequires: gnutls-devel >= 3.6.0 | |
18 | BuildRequires: gpgme-devel | |
19 | %{?with_apidocs:BuildRequires: gtk-doc} | |
20 | BuildRequires: json-glib-devel >= 1.1.1 | |
21 | BuildRequires: libgpg-error-devel | |
22 | BuildRequires: meson >= 0.52.0 | |
23 | BuildRequires: ninja >= 1.5 | |
24 | BuildRequires: pkgconfig | |
25 | BuildRequires: rpmbuild(macros) >= 1.736 | |
26 | BuildRequires: tar >= 1:1.22 | |
27 | BuildRequires: xz | |
28 | Requires: glib2 >= 1:2.45.8 | |
29 | Requires: gnutls >= 3.6.0 | |
30 | Requires: json-glib >= 1.1.1 | |
31 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
32 | ||
33 | %description | |
34 | This library allows reading and writing gzip-compressed JSON catalog | |
35 | files, which can be used to store GPG, PKCS-7 and SHA-256 checksums | |
36 | for each file. | |
37 | ||
38 | This provides equivalent functionality to the catalog files supported | |
39 | in Microsoft Windows. | |
40 | ||
41 | %description -l pl.UTF-8 | |
42 | Ta biblioteka pozwala na odczyt i zapis skompresowanych gzipem plików | |
43 | katalogów JSON, które mogą służyć do zapisu sum kontrolnych GPG, PKCS-7 | |
44 | i SHA-256 dla każdego pliku. | |
45 | ||
46 | Daje do funkcjonalność odpowiadającą plikom catalog, obsługiwanym w | |
47 | Microsoft Windows. | |
48 | ||
49 | %package devel | |
50 | Summary: Header files for Jcat library | |
51 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki Jcat | |
52 | Group: Development/Libraries | |
53 | Requires: %{name} = %{version}-%{release} | |
54 | Requires: glib2-devel >= 1:2.45.8 | |
55 | Requires: gnutls-devel >= 3.6.0 | |
56 | Requires: gpgme-devel | |
57 | Requires: json-glib-devel >= 1.1.1 | |
58 | Requires: libgpg-error-devel | |
59 | ||
60 | %description devel | |
61 | Header files for Jcat library. | |
62 | ||
63 | %description devel -l pl.UTF-8 | |
64 | Pliki nagłówkowe biblioteki Jcat. | |
65 | ||
66 | %package static | |
67 | Summary: Static Jcat library | |
68 | Summary(pl.UTF-8): Statyczna biblioteka Jcat | |
69 | Group: Development/Libraries | |
70 | Requires: %{name}-devel = %{version}-%{release} | |
71 | ||
72 | %description static | |
73 | Static Jcat library. | |
74 | ||
75 | %description static -l pl.UTF-8 | |
76 | Statyczna biblioteka Jcat. | |
77 | ||
78 | %package -n vala-libjcat | |
79 | Summary: Vala API for Jcat library | |
80 | Summary(pl.UTF-8): API języka Vala do biblioteki Jcat | |
81 | Group: Development/Libraries | |
82 | Requires: %{name}-devel = %{version}-%{release} | |
83 | Requires: vala | |
84 | ||
85 | %description -n vala-libjcat | |
86 | Vala API for Jcat library. | |
87 | ||
88 | %description -n vala-libjcat -l pl.UTF-8 | |
89 | API języka Vala do biblioteki Jcat. | |
90 | ||
91 | %package apidocs | |
92 | Summary: API documentation for Jcat library | |
93 | Summary(pl.UTF-8): Dokumentacja API biblioteki Jcat | |
94 | Group: Documentation | |
95 | %if "%{_rpmversion}" >= "4.6" | |
96 | BuildArch: noarch | |
97 | %endif | |
98 | ||
99 | %description apidocs | |
100 | API documentation for Jcat library. | |
101 | ||
102 | %description apidocs -l pl.UTF-8 | |
103 | Dokumentacja API biblioteki Jcat. | |
104 | ||
105 | %prep | |
106 | %setup -q | |
107 | ||
108 | %build | |
109 | %meson build \ | |
110 | %{!?with_static_libs:--default-library=shared} \ | |
111 | %{?with_apidocs:-Dgtkdoc=true} | |
112 | ||
113 | %ninja_build -C build | |
114 | ||
115 | %install | |
116 | rm -rf $RPM_BUILD_ROOT | |
117 | ||
118 | %ninja_install -C build | |
119 | ||
2bc95579 | 120 | %{__rm} -r $RPM_BUILD_ROOT%{_libexecdir}/installed-tests \ |
fe90e304 JB |
121 | $RPM_BUILD_ROOT%{_datadir}/installed-tests |
122 | ||
123 | %clean | |
124 | rm -rf $RPM_BUILD_ROOT | |
125 | ||
126 | %post -p /sbin/ldconfig | |
127 | %postun -p /sbin/ldconfig | |
128 | ||
129 | %files | |
130 | %defattr(644,root,root,755) | |
131 | %doc MAINTAINERS NEWS README.md | |
132 | %attr(755,root,root) %{_bindir}/jcat-tool | |
133 | %attr(755,root,root) %{_libdir}/libjcat.so.*.*.* | |
134 | %attr(755,root,root) %ghost %{_libdir}/libjcat.so.1 | |
135 | %{_libdir}/girepository-1.0/Jcat-1.0.typelib | |
136 | %{_mandir}/man1/jcat-tool.1* | |
137 | ||
138 | %files devel | |
139 | %defattr(644,root,root,755) | |
140 | %attr(755,root,root) %{_libdir}/libjcat.so | |
141 | %{_includedir}/libjcat-1 | |
142 | %{_datadir}/gir-1.0/Jcat-1.0.gir | |
143 | %{_pkgconfigdir}/jcat.pc | |
144 | ||
145 | %if %{with static_libs} | |
146 | %files static | |
147 | %defattr(644,root,root,755) | |
148 | %{_libdir}/libjcat.a | |
149 | %endif | |
150 | ||
151 | %files -n vala-libjcat | |
152 | %defattr(644,root,root,755) | |
153 | %{_datadir}/vala/vapi/jcat.deps | |
154 | %{_datadir}/vala/vapi/jcat.vapi | |
155 | ||
156 | %if %{with apidocs} | |
157 | %files apidocs | |
158 | %defattr(644,root,root,755) | |
159 | %{_gtkdocdir}/libjcat | |
160 | %endif |