]>
Commit | Line | Data |
---|---|---|
a0729406 MB |
1 | # |
2 | # Conditional build: | |
a1c98876 JB |
3 | %bcond_without apidocs # gi-docgen based API documentation |
4 | %bcond_with libsoup3 # libsoup3 instead of libsoup 2.x | |
5 | %bcond_without static_libs # static library | |
534f5ac1 | 6 | |
a1c98876 | 7 | %define apiver 1.0 |
a0729406 | 8 | Summary: A library for access to RESTful web services |
e4f3e6ef | 9 | Summary(pl.UTF-8): Biblioteka dostępu do REST-owych serwisów WWW |
a1c98876 JB |
10 | Name: rest1 |
11 | Version: 0.9.1 | |
c0229fb2 | 12 | Release: 1 |
a0729406 MB |
13 | License: LGPL v2 |
14 | Group: Libraries | |
a1c98876 JB |
15 | Source0: https://download.gnome.org/sources/rest/0.9/rest-%{version}.tar.xz |
16 | # Source0-md5: b997b83232be3814a1b78530c5700df9 | |
17 | URL: https://www.gnome.org/ | |
18 | BuildRequires: glib2-devel >= 1:2.44 | |
a0729406 | 19 | BuildRequires: gobject-introspection-devel >= 0.6.7 |
a1c98876 JB |
20 | %{?with_apidocs:BuildRequires: gi-docgen >= 2021.6} |
21 | BuildRequires: json-glib-devel | |
22 | %if %{with libsoup3} | |
23 | BuildRequires: libsoup3-devel >= 3.0 | |
24 | %else | |
25 | BuildRequires: libsoup-devel >= 2.42 | |
26 | %endif | |
023ec758 | 27 | BuildRequires: libxml2-devel >= 2 |
a1c98876 JB |
28 | BuildRequires: meson >= 0.56 |
29 | BuildRequires: ninja >= 1.5 | |
a0729406 | 30 | BuildRequires: pkgconfig |
1132138c | 31 | BuildRequires: rpm-build >= 4.6 |
a1c98876 | 32 | BuildRequires: rpmbuild(macros) >= 1.736 |
5ea56938 MB |
33 | BuildRequires: tar >= 1:1.22 |
34 | BuildRequires: xz | |
a1c98876 JB |
35 | Requires: glib2 >= 1:2.44 |
36 | %if %{with libsoup3} | |
37 | Requires: libsoup3 >= 3.0 | |
38 | %else | |
39 | Requires: libsoup >= 2.42 | |
40 | %endif | |
6558a390 | 41 | Suggests: ca-certificates |
a0729406 MB |
42 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
43 | ||
44 | %description | |
e4f3e6ef JB |
45 | This library was designed to make it easier to access web services |
46 | that claim to be "RESTful". A RESTful service should have URLs that | |
47 | represent remote objects, which methods can then be called on. The | |
48 | majority of services don't actually adhere to this strict definition. | |
49 | Instead, their RESTful end point usually has an API that is just | |
50 | simpler to use compared to other types of APIs they may support | |
51 | (XML-RPC, for instance). It is this kind of API that this library is | |
52 | attempting to support. | |
53 | ||
54 | %description -l pl.UTF-8 | |
55 | Ta biblioteka została zaprojektowana, aby ułatwić dostęp do serwisów | |
56 | WWW, które uznają się za "REST-owe". Serwis REST-owy powinien mieć | |
57 | URL-e reprezentujące zdalne obiekty, na których można wywoływać | |
58 | metody. Większość serwisów nie jest w pełni zgodna z tą definicją, ale | |
59 | ich REST-owy interfejs zwykle ma API prostsze od innych (np. XML-RPC). | |
60 | Ten rodzaj API próbuje obsłużyć ta biblioteka. | |
a0729406 MB |
61 | |
62 | %package devel | |
63 | Summary: Header files for rest library | |
64 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki rest | |
65 | Group: Development/Libraries | |
66 | Requires: %{name} = %{version}-%{release} | |
a1c98876 JB |
67 | Requires: glib2-devel >= 1:2.44 |
68 | Requires: json-glib-devel | |
69 | %if %{with libsoup3} | |
70 | Requires: libsoup3-devel >= 3.0 | |
71 | %else | |
72 | Requires: libsoup-devel >= 2.42 | |
73 | %endif | |
023ec758 | 74 | Requires: libxml2-devel >= 2 |
a0729406 MB |
75 | |
76 | %description devel | |
77 | Header files for rest library. | |
78 | ||
79 | %description devel -l pl.UTF-8 | |
80 | Pliki nagłówkowe biblioteki rest. | |
81 | ||
82 | %package static | |
83 | Summary: Static rest library | |
84 | Summary(pl.UTF-8): Statyczna biblioteka rest | |
85 | Group: Development/Libraries | |
86 | Requires: %{name}-devel = %{version}-%{release} | |
87 | ||
88 | %description static | |
89 | Static rest library. | |
90 | ||
91 | %description static -l pl.UTF-8 | |
92 | Statyczna biblioteka rest. | |
93 | ||
94 | %package apidocs | |
95 | Summary: rest API documentation | |
96 | Summary(pl.UTF-8): Dokumentacja API biblioteki rest | |
97 | Group: Documentation | |
534f5ac1 | 98 | BuildArch: noarch |
a0729406 MB |
99 | |
100 | %description apidocs | |
101 | API documentation for rest library. | |
102 | ||
103 | %description apidocs -l pl.UTF-8 | |
104 | Dokumentacja API biblioteki rest. | |
105 | ||
106 | %prep | |
a1c98876 | 107 | %setup -q -n rest-%{version} |
a0729406 MB |
108 | |
109 | %build | |
a1c98876 JB |
110 | %meson build \ |
111 | %{!?with_static_libs:--default-library=shared} \ | |
112 | -Dexamples=false \ | |
113 | %{!?with_apidocs:-Dgtk_doc=false} \ | |
114 | %{!?with_libsoup3:-Dsoup2=true} | |
115 | ||
116 | # -Dvapi=true not enabled, rest-1.0 is included in vala 0.56 | |
117 | ||
118 | %ninja_build -C build | |
a0729406 MB |
119 | |
120 | %install | |
121 | rm -rf $RPM_BUILD_ROOT | |
a0729406 | 122 | |
a1c98876 JB |
123 | %ninja_install -C build |
124 | ||
125 | %if %{with apidocs} | |
126 | # FIXME: where to package gi-docgen generated docs? | |
127 | install -d $RPM_BUILD_ROOT%{_gtkdocdir} | |
128 | %{__mv} $RPM_BUILD_ROOT%{_docdir}/librest-1.0 $RPM_BUILD_ROOT%{_gtkdocdir} | |
129 | %endif | |
a0729406 MB |
130 | |
131 | %clean | |
132 | rm -rf $RPM_BUILD_ROOT | |
133 | ||
134 | %post -p /sbin/ldconfig | |
135 | %postun -p /sbin/ldconfig | |
136 | ||
137 | %files | |
138 | %defattr(644,root,root,755) | |
a1c98876 | 139 | %doc AUTHORS NEWS README.md |
a0729406 MB |
140 | %attr(755,root,root) %{_libdir}/librest-%{apiver}.so.*.*.* |
141 | %attr(755,root,root) %ghost %{_libdir}/librest-%{apiver}.so.0 | |
142 | %attr(755,root,root) %{_libdir}/librest-extras-%{apiver}.so.*.*.* | |
143 | %attr(755,root,root) %ghost %{_libdir}/librest-extras-%{apiver}.so.0 | |
a1c98876 JB |
144 | %{_libdir}/girepository-1.0/Rest-%{apiver}.typelib |
145 | %{_libdir}/girepository-1.0/RestExtras-%{apiver}.typelib | |
a0729406 MB |
146 | |
147 | %files devel | |
148 | %defattr(644,root,root,755) | |
149 | %attr(755,root,root) %{_libdir}/librest-%{apiver}.so | |
150 | %attr(755,root,root) %{_libdir}/librest-extras-%{apiver}.so | |
151 | %{_datadir}/gir-1.0/Rest-%{apiver}.gir | |
152 | %{_datadir}/gir-1.0/RestExtras-%{apiver}.gir | |
153 | %{_includedir}/rest-%{apiver} | |
154 | %{_pkgconfigdir}/rest-%{apiver}.pc | |
155 | %{_pkgconfigdir}/rest-extras-%{apiver}.pc | |
156 | ||
157 | %if %{with static_libs} | |
158 | %files static | |
159 | %defattr(644,root,root,755) | |
160 | %{_libdir}/librest-%{apiver}.a | |
161 | %{_libdir}/librest-extras-%{apiver}.a | |
162 | %endif | |
163 | ||
164 | %if %{with apidocs} | |
165 | %files apidocs | |
166 | %defattr(644,root,root,755) | |
a1c98876 | 167 | %{_gtkdocdir}/librest-%{apiver} |
a0729406 | 168 | %endif |