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