]>
Commit | Line | Data |
---|---|---|
a39e4c02 JB |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without apidocs # API documentation | |
4 | %bcond_without static_libs # static library | |
5 | ||
2b620023 | 6 | Summary: jsonrpc-glib - a library to communicate with JSON-RPC based peers |
a39e4c02 | 7 | Summary(pl.UTF-8): jsonrpc-glib - biblioteka do komunikacji poprzez JSON-RPC |
426c5f5d | 8 | Name: jsonrpc-glib |
67b3053b | 9 | Version: 3.42.0 |
a39e4c02 | 10 | Release: 1 |
426c5f5d JR |
11 | License: LGPL v2.1+ |
12 | Group: Libraries | |
67b3053b JB |
13 | Source0: https://download.gnome.org/sources/jsonrpc-glib/3.42/%{name}-%{version}.tar.xz |
14 | # Source0-md5: d404be0109f7124ff6b00944d89661c2 | |
a39e4c02 | 15 | URL: https://gitlab.gnome.org/GNOME/jsonrpc-glib |
426c5f5d JR |
16 | BuildRequires: docbook-dtd412-xml |
17 | BuildRequires: gettext-tools >= 0.18 | |
18 | BuildRequires: glib2-devel >= 1:2.44.0 | |
19 | BuildRequires: gobject-introspection-devel >= 0.9.5 | |
67b3053b | 20 | %{?with_apidocs:BuildRequires: gi-docgen} |
a39e4c02 JB |
21 | BuildRequires: json-glib-devel |
22 | BuildRequires: meson >= 0.49.2 | |
23 | BuildRequires: ninja >= 1.5 | |
426c5f5d | 24 | BuildRequires: pkgconfig |
3554c9d1 | 25 | BuildRequires: rpm-build >= 4.6 |
a39e4c02 | 26 | BuildRequires: rpmbuild(macros) >= 1.736 |
426c5f5d JR |
27 | BuildRequires: vala |
28 | Requires: glib2 >= 1:2.44.0 | |
29 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
30 | ||
31 | %description | |
2b620023 JR |
32 | Jsonrpc-GLib is a library to communicate with JSON-RPC based peers in |
33 | either a synchronous or asynchronous fashion. | |
426c5f5d | 34 | |
a39e4c02 JB |
35 | %description -l pl.UTF-8 |
36 | Jsonrpc-GLib to biblioteka do komunikacji z partnerami JSON-RPC w | |
37 | trybie synchronicznym lub asynchronicznym. | |
38 | ||
426c5f5d JR |
39 | %package devel |
40 | Summary: Header files for the jsonrpc-glib library | |
41 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki jsonrpc-glib | |
42 | Group: Development/Libraries | |
43 | Requires: %{name} = %{version}-%{release} | |
44 | Requires: glib2-devel >= 1:2.44.0 | |
a39e4c02 | 45 | Requires: json-glib-devel |
426c5f5d JR |
46 | |
47 | %description devel | |
48 | Header files for the jsonrpc-glib library. | |
49 | ||
50 | %description devel -l pl.UTF-8 | |
51 | Pliki nagłówkowe biblioteki jsonrpc-glib. | |
52 | ||
a39e4c02 JB |
53 | %package static |
54 | Summary: Static jsonrpc-glib library | |
55 | Summary(pl.UTF-8): Statyczna biblioteka jsonrpc-glib | |
56 | Group: Development/Libraries | |
57 | Requires: %{name}-devel = %{version}-%{release} | |
58 | ||
59 | %description static | |
60 | Static jsonrpc-glib library. | |
61 | ||
62 | %description static -l pl.UTF-8 | |
63 | Statyczna biblioteka jsonrpc-glib. | |
64 | ||
426c5f5d JR |
65 | %package apidocs |
66 | Summary: jsonrpc-glib API documentation | |
67 | Summary(pl.UTF-8): Dokumentacja API jsonrpc-glib | |
68 | Group: Documentation | |
69 | Requires: gtk-doc-common | |
426c5f5d | 70 | BuildArch: noarch |
426c5f5d JR |
71 | |
72 | %description apidocs | |
73 | jsonrpc-glib API documentation. | |
74 | ||
75 | %description apidocs -l pl.UTF-8 | |
76 | Dokumentacja API jsonrpc-glib. | |
77 | ||
78 | %package -n vala-jsonrpc-glib | |
79 | Summary: jsonrpc-glib API for Vala language | |
80 | Summary(pl.UTF-8): API jsonrpc-glib dla języka Vala | |
81 | Group: Development/Libraries | |
82 | Requires: %{name}-devel = %{version}-%{release} | |
83 | Requires: vala >= 2:0.18.0 | |
426c5f5d | 84 | BuildArch: noarch |
426c5f5d JR |
85 | |
86 | %description -n vala-jsonrpc-glib | |
87 | jsonrpc-glib API for Vala language. | |
88 | ||
89 | %description -n vala-jsonrpc-glib -l pl.UTF-8 | |
90 | API jsonrpc-glib dla języka Vala. | |
91 | ||
92 | %prep | |
93 | %setup -q | |
94 | ||
95 | %build | |
96 | %meson build \ | |
a39e4c02 | 97 | %{!?with_static_libs:--default-library=shared} \ |
a39e4c02 | 98 | %{?with_apidocs:-Denable_gtk_doc=true} |
426c5f5d | 99 | |
a39e4c02 | 100 | %ninja_build -C build |
426c5f5d JR |
101 | |
102 | %install | |
103 | rm -rf $RPM_BUILD_ROOT | |
104 | ||
a39e4c02 | 105 | %ninja_install -C build |
426c5f5d | 106 | |
67b3053b JB |
107 | %if %{with apidocs} |
108 | # FIXME: where to package gi-docgen generated docs? | |
109 | install -d $RPM_BUILD_ROOT%{_gtkdocdir} | |
110 | %{__mv} $RPM_BUILD_ROOT%{_docdir}/jsonrpc-glib $RPM_BUILD_ROOT%{_gtkdocdir} | |
111 | %endif | |
112 | ||
426c5f5d JR |
113 | %clean |
114 | rm -rf $RPM_BUILD_ROOT | |
115 | ||
116 | %post -p /sbin/ldconfig | |
117 | %postun -p /sbin/ldconfig | |
118 | ||
119 | %files | |
120 | %defattr(644,root,root,755) | |
a39e4c02 | 121 | %doc AUTHORS NEWS README.md |
5074998c JR |
122 | %attr(755,root,root) %{_libdir}/libjsonrpc-glib-1.0.so.*.*.* |
123 | %attr(755,root,root) %ghost %{_libdir}/libjsonrpc-glib-1.0.so.1 | |
426c5f5d JR |
124 | %{_libdir}/girepository-1.0/Jsonrpc-1.0.typelib |
125 | ||
126 | %files devel | |
127 | %defattr(644,root,root,755) | |
5074998c | 128 | %attr(755,root,root) %{_libdir}/libjsonrpc-glib-1.0.so |
426c5f5d JR |
129 | %{_datadir}/gir-1.0/Jsonrpc-1.0.gir |
130 | %{_includedir}/jsonrpc-glib-1.0 | |
131 | %{_pkgconfigdir}/jsonrpc-glib-1.0.pc | |
132 | ||
a39e4c02 JB |
133 | %if %{with static_libs} |
134 | %files static | |
135 | %defattr(644,root,root,755) | |
136 | %{_libdir}/libjsonrpc-glib-1.0.a | |
137 | %endif | |
138 | ||
139 | %if %{with apidocs} | |
426c5f5d JR |
140 | %files apidocs |
141 | %defattr(644,root,root,755) | |
142 | %{_gtkdocdir}/jsonrpc-glib | |
a39e4c02 | 143 | %endif |
426c5f5d JR |
144 | |
145 | %files -n vala-jsonrpc-glib | |
146 | %defattr(644,root,root,755) | |
147 | %{_datadir}/vala/vapi/jsonrpc-glib-1.0.deps | |
148 | %{_datadir}/vala/vapi/jsonrpc-glib-1.0.vapi |