1 # Maintainer: Jan Alexander Steffens (heftig) <heftig@archlinux.org>
2 # Contributor: Jan de Groot <jgc@archlinux.org>
5 pkgname=(geocode-glib-common geocode-glib geocode-glib-2)
8 pkgdesc="Helper library for geocoding services"
9 url="https://gitlab.gnome.org/GNOME/geocode-glib"
12 makedepends=(gobject-introspection git gtk-doc meson glib2 json-glib libsoup
14 _commit=210abe69d68e38947106f4680631c369b0c23189 # tags/3.26.4^0
15 source=("git+https://gitlab.gnome.org/GNOME/geocode-glib.git#commit=$_commit")
20 git describe --tags | sed 's/[^-]*-g/r&/;s/-/+/g'
29 -D enable-installed-tests=false
32 arch-meson geocode-glib build2 "${meson_options[@]}" -D soup2=true
33 arch-meson geocode-glib build3 "${meson_options[@]}" -D soup2=false
34 meson compile -C build2
35 meson compile -C build3
39 # Tests need locales we don't have: en_GB.UTF-8 fr_FR.UTF-8 cs_CZ.UTF-8
40 meson test -C build2 --print-errorlogs || :
41 meson test -C build3 --print-errorlogs || :
45 local p="$1" f d; shift
47 d="$srcdir/$p/${f#$pkgdir/}"
48 mkdir -p "$(dirname "$d")"
50 rmdir -p --ignore-fail-on-non-empty "$(dirname "$f")"
54 package_geocode-glib-common() {
55 pkgdesc+=" (common files)"
56 depends=(glib2 json-glib)
58 meson install -C build2 --destdir "$pkgdir"
59 meson install -C build3 --destdir "$pkgdir"
63 _pick soup2 usr/include/geocode-glib-1.0
64 _pick soup2 usr/lib/libgeocode-glib.so*
65 _pick soup2 usr/lib/pkgconfig/geocode-glib-1.0.pc
66 _pick soup2 usr/lib/girepository-1.0/GeocodeGlib-1.0.typelib
67 _pick soup2 usr/share/gir-1.0/GeocodeGlib-1.0.gir
68 _pick soup2 usr/share/gtk-doc/html/geocode-glib
70 _pick soup3 usr/include/geocode-glib-2.0
71 _pick soup3 usr/lib/libgeocode-glib-2.so*
72 _pick soup3 usr/lib/pkgconfig/geocode-glib-2.0.pc
73 _pick soup3 usr/lib/girepository-1.0/GeocodeGlib-2.0.typelib
74 _pick soup3 usr/share/gir-1.0/GeocodeGlib-2.0.gir
75 _pick soup3 usr/share/gtk-doc/html/geocode-glib-2
78 package_geocode-glib() {
80 depends=(geocode-glib-common="$pkgver-$pkgrel" libsoup-2.4.so)
81 provides=(libgeocode-glib.so)
86 package_geocode-glib-2() {
87 depends=(geocode-glib-common="$pkgver-$pkgrel" libsoup-3.0.so)
88 provides=(libgeocode-glib-2.so)
93 # vim:set sw=2 sts=-1 et: