]>
Commit | Line | Data |
---|---|---|
9a70b753 MB |
1 | # |
2 | # Conditional build: | |
801ed8bb JB |
3 | %bcond_without apidocs # API documentation |
4 | %bcond_without libsoup3 # libsoup3 variant (geocode-glib-2) | |
5 | %bcond_without static_libs # static library (geocode-glib 1.0 only) | |
5ca249d2 | 6 | |
801ed8bb JB |
7 | Summary: GLib geocoding library that uses the Nominatim service |
8 | Summary(pl.UTF-8): Biblioteka GLib do geokodowania wykorzystująca serwis Nominatim | |
9a70b753 | 9 | Name: geocode-glib |
d88ad6a4 | 10 | Version: 3.26.4 |
d08680ae | 11 | Release: 2 |
9a70b753 MB |
12 | License: LGPL v2+ |
13 | Group: Libraries | |
801ed8bb | 14 | Source0: https://download.gnome.org/sources/geocode-glib/3.26/%{name}-%{version}.tar.xz |
d88ad6a4 | 15 | # Source0-md5: 4c0dcdb7ee1222435b20acd3d7b68cd1 |
9a0a3d38 | 16 | URL: https://developer.gnome.org/geocode-glib/ |
1a2ef60d MB |
17 | BuildRequires: gettext-tools >= 0.19.6 |
18 | BuildRequires: glib2-devel >= 1:2.44 | |
9a70b753 | 19 | BuildRequires: gobject-introspection-devel >= 0.6.3 |
86cb3a70 | 20 | BuildRequires: gtk-doc >= 1.13 |
01368b71 | 21 | BuildRequires: json-glib-devel >= 0.99.2 |
ac65102c | 22 | BuildRequires: libsoup-devel >= 2.42 |
801ed8bb JB |
23 | %{?with_libsoup3:BuildRequires: libsoup3-devel >= 3.0} |
24 | BuildRequires: meson >= 0.49.0 | |
1e13e293 | 25 | BuildRequires: ninja >= 1.5 |
9a70b753 | 26 | BuildRequires: pkgconfig |
801ed8bb | 27 | BuildRequires: rpm-build >= 4.6 |
1e13e293 | 28 | BuildRequires: rpmbuild(macros) >= 1.736 |
ae32d969 | 29 | BuildRequires: sed >= 4.0 |
86cb3a70 JB |
30 | BuildRequires: tar >= 1:1.22 |
31 | BuildRequires: xz | |
1a2ef60d | 32 | Requires: glib2 >= 1:2.44 |
01368b71 | 33 | Requires: json-glib >= 0.99.2 |
ac65102c | 34 | Requires: libsoup >= 2.42 |
9a70b753 MB |
35 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
36 | ||
37 | %description | |
38 | geocode-glib allows you to do geocoding (going from a place name, to a | |
39 | longitude/latitude pair) and reverse geocoding (finding a place name | |
40 | from coordinates). | |
41 | ||
e78f520d JB |
42 | %description -l pl.UTF-8 |
43 | Ten pakiet umożliwia geokodowanie (kodowanie geograficzne - zamianę | |
44 | nazwy miejsca na parę długość/szerokość geograficzna) oraz odwrotne | |
45 | geokodowanie (odnajdywanie nazwy miejsca na podstawie współrzędnych). | |
46 | ||
9a70b753 MB |
47 | %package devel |
48 | Summary: Header files for geocode-glib library | |
49 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki geocode-glib | |
50 | Group: Development/Libraries | |
51 | Requires: %{name} = %{version}-%{release} | |
1a2ef60d | 52 | Requires: glib2-devel >= 1:2.44 |
801ed8bb JB |
53 | Requires: json-glib-devel >= 0.99.2 |
54 | Requires: libsoup-devel >= 2.42 | |
9a70b753 MB |
55 | |
56 | %description devel | |
57 | Header files for geocode-glib library. | |
58 | ||
59 | %description devel -l pl.UTF-8 | |
60 | Pliki nagłówkowe biblioteki geocode-glib. | |
61 | ||
62 | %package static | |
63 | Summary: Static geocode-glib library | |
64 | Summary(pl.UTF-8): Statyczna biblioteka geocode-glib | |
65 | Group: Development/Libraries | |
66 | Requires: %{name}-devel = %{version}-%{release} | |
67 | ||
68 | %description static | |
69 | Static geocode-glib library. | |
70 | ||
71 | %description static -l pl.UTF-8 | |
72 | Statyczna biblioteka geocode-glib. | |
73 | ||
74 | %package apidocs | |
75 | Summary: geocode-glib API documentation | |
76 | Summary(pl.UTF-8): Dokumentacja API biblioteki geocode-glib | |
77 | Group: Documentation | |
78 | Requires: gtk-doc-common | |
5ca249d2 | 79 | BuildArch: noarch |
9a70b753 MB |
80 | |
81 | %description apidocs | |
82 | API documentation for geocode-glib library. | |
83 | ||
84 | %description apidocs -l pl.UTF-8 | |
85 | Dokumentacja API biblioteki geocode-glib. | |
86 | ||
801ed8bb JB |
87 | %package -n geocode-glib2 |
88 | Summary: GLib geocoding library that uses the Nominatim service (soup3 version) | |
89 | Summary(pl.UTF-8): Biblioteka GLib do geokodowania wykorzystująca serwis Nominatim (wersja soup3) | |
90 | Group: Libraries | |
91 | Requires: glib2 >= 1:2.44 | |
92 | Requires: json-glib >= 0.99.2 | |
93 | Requires: libsoup3 >= 3.0 | |
94 | ||
95 | %description -n geocode-glib2 | |
96 | geocode-glib allows you to do geocoding (going from a place name, to a | |
97 | longitude/latitude pair) and reverse geocoding (finding a place name | |
98 | from coordinates). | |
99 | ||
100 | This package uses libsoup 3 library. | |
101 | ||
102 | %description -n geocode-glib2 -l pl.UTF-8 | |
103 | Ten pakiet umożliwia geokodowanie (kodowanie geograficzne - zamianę | |
104 | nazwy miejsca na parę długość/szerokość geograficzna) oraz odwrotne | |
105 | geokodowanie (odnajdywanie nazwy miejsca na podstawie współrzędnych). | |
106 | ||
107 | Ten pakiet wykorzystuje bibliotekę libsoup 3. | |
108 | ||
109 | %package -n geocode-glib2-devel | |
110 | Summary: Header files for geocode-glib-2 library | |
111 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki geocode-glib-2 | |
112 | Group: Development/Libraries | |
113 | Requires: geocode-glib2 = %{version}-%{release} | |
114 | Requires: glib2-devel >= 1:2.44 | |
115 | Requires: json-glib-devel >= 0.99.2 | |
116 | Requires: libsoup3-devel >= 3.0 | |
117 | ||
118 | %description -n geocode-glib2-devel | |
119 | Header files for geocode-glib-2 library. | |
120 | ||
121 | %description -n geocode-glib2-devel -l pl.UTF-8 | |
122 | Pliki nagłówkowe biblioteki geocode-glib-2. | |
123 | ||
124 | %package -n geocode-glib2-apidocs | |
125 | Summary: geocode-glib-2 API documentation | |
126 | Summary(pl.UTF-8): Dokumentacja API biblioteki geocode-glib-2 | |
127 | Group: Documentation | |
128 | Requires: gtk-doc-common | |
129 | BuildArch: noarch | |
130 | ||
131 | %description -n geocode-glib2-apidocs | |
132 | API documentation for geocode-glib-2 library. | |
133 | ||
134 | %description -n geocode-glib2-apidocs -l pl.UTF-8 | |
135 | Dokumentacja API biblioteki geocode-glib-2. | |
136 | ||
9a70b753 MB |
137 | %prep |
138 | %setup -q | |
139 | ||
ae32d969 JB |
140 | %if %{with static_libs} |
141 | %{__sed} -i -e 's/shared_library/library/' geocode-glib/meson.build | |
142 | %endif | |
143 | ||
9a70b753 | 144 | %build |
ae32d969 JB |
145 | %meson build \ |
146 | %{!?with_apidocs:-Denable-gtk-doc=false} \ | |
147 | -Denable-installed-tests=false | |
148 | ||
1e13e293 | 149 | %ninja_build -C build |
9a70b753 | 150 | |
801ed8bb JB |
151 | %if %{with libsoup3} |
152 | %meson build-soup3 \ | |
153 | --default-library=shared \ | |
154 | %{!?with_apidocs:-Denable-gtk-doc=false} \ | |
155 | -Denable-installed-tests=false \ | |
156 | -Dsoup2=false | |
157 | ||
158 | %ninja_build -C build-soup3 | |
159 | %endif | |
160 | ||
9a70b753 MB |
161 | %install |
162 | rm -rf $RPM_BUILD_ROOT | |
163 | ||
1e13e293 | 164 | %ninja_install -C build |
9a70b753 | 165 | |
801ed8bb JB |
166 | %if %{with libsoup3} |
167 | %ninja_install -C build-soup3 | |
168 | %endif | |
169 | ||
9a70b753 MB |
170 | %clean |
171 | rm -rf $RPM_BUILD_ROOT | |
172 | ||
173 | %post -p /sbin/ldconfig | |
174 | %postun -p /sbin/ldconfig | |
175 | ||
801ed8bb JB |
176 | %post -n geocode-glib2 -p /sbin/ldconfig |
177 | %postun -n geocode-glib2 -p /sbin/ldconfig | |
178 | ||
9a70b753 MB |
179 | %files |
180 | %defattr(644,root,root,755) | |
181 | %doc AUTHORS ChangeLog NEWS README TODO | |
182 | %attr(755,root,root) %{_libdir}/libgeocode-glib.so.*.*.* | |
183 | %attr(755,root,root) %ghost %{_libdir}/libgeocode-glib.so.0 | |
184 | %{_libdir}/girepository-1.0/GeocodeGlib-1.0.typelib | |
801ed8bb | 185 | %{_iconsdir}/hicolor/scalable/places/poi-*.svg |
9a70b753 MB |
186 | |
187 | %files devel | |
188 | %defattr(644,root,root,755) | |
189 | %attr(755,root,root) %{_libdir}/libgeocode-glib.so | |
86cb3a70 | 190 | %{_includedir}/geocode-glib-1.0 |
9a70b753 | 191 | %{_datadir}/gir-1.0/GeocodeGlib-1.0.gir |
86cb3a70 | 192 | %{_pkgconfigdir}/geocode-glib-1.0.pc |
9a70b753 MB |
193 | |
194 | %if %{with static_libs} | |
195 | %files static | |
196 | %defattr(644,root,root,755) | |
197 | %{_libdir}/libgeocode-glib.a | |
198 | %endif | |
199 | ||
200 | %if %{with apidocs} | |
201 | %files apidocs | |
202 | %defattr(644,root,root,755) | |
ae32d969 | 203 | %{_gtkdocdir}/geocode-glib |
9a70b753 | 204 | %endif |
801ed8bb JB |
205 | |
206 | %if %{with libsoup3} | |
207 | %files -n geocode-glib2 | |
208 | %defattr(644,root,root,755) | |
209 | %doc AUTHORS ChangeLog NEWS README TODO | |
210 | %attr(755,root,root) %{_libdir}/libgeocode-glib-2.so.*.*.* | |
211 | %attr(755,root,root) %ghost %{_libdir}/libgeocode-glib-2.so.0 | |
212 | %{_libdir}/girepository-1.0/GeocodeGlib-2.0.typelib | |
213 | %{_iconsdir}/hicolor/scalable/places/poi-*.svg | |
214 | ||
215 | %files -n geocode-glib2-devel | |
216 | %defattr(644,root,root,755) | |
217 | %attr(755,root,root) %{_libdir}/libgeocode-glib-2.so | |
218 | %{_includedir}/geocode-glib-2.0 | |
219 | %{_datadir}/gir-1.0/GeocodeGlib-2.0.gir | |
220 | %{_pkgconfigdir}/geocode-glib-2.0.pc | |
221 | ||
222 | %if %{with apidocs} | |
223 | %files -n geocode-glib2-apidocs | |
224 | %defattr(644,root,root,755) | |
225 | %{_gtkdocdir}/geocode-glib-2 | |
226 | %endif | |
227 | %endif |