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 provides=(libgeocode-glib.so)
16 _commit=210abe69d68e38947106f4680631c369b0c23189 # tags/3.26.4^0
17 source=("git+https://gitlab.gnome.org/GNOME/geocode-glib.git#commit=$_commit")
22 git describe --tags | sed 's/[^-]*-g/r&/;s/-/+/g'
31 -D enable-installed-tests=false
34 arch-meson geocode-glib build2 "${meson_options[@]}" -D soup2=true
35 arch-meson geocode-glib build3 "${meson_options[@]}" -D soup2=false
36 meson compile -C build2
37 meson compile -C build3
41 # Tests need locales we don't have: en_GB.UTF-8 fr_FR.UTF-8 cs_CZ.UTF-8
42 meson test -C build2 --print-errorlogs || :
43 meson test -C build3 --print-errorlogs || :
47 local p="$1" f d; shift
49 d="$srcdir/$p/${f#$pkgdir/}"
50 mkdir -p "$(dirname "$d")"
52 rmdir -p --ignore-fail-on-non-empty "$(dirname "$f")"
56 package_geocode-glib-common() {
57 pkgdesc+=" (common files)"
58 depends=(glib2 json-glib)
60 meson install -C build2 --destdir "$pkgdir"
61 meson install -C build3 --destdir "$pkgdir"
65 _pick soup2 usr/include/geocode-glib-1.0
66 _pick soup2 usr/lib/libgeocode-glib.so*
67 _pick soup2 usr/lib/pkgconfig/geocode-glib-1.0.pc
68 _pick soup2 usr/lib/girepository-1.0/GeocodeGlib-1.0.typelib
69 _pick soup2 usr/share/gir-1.0/GeocodeGlib-1.0.gir
70 _pick soup2 usr/share/gtk-doc/html/geocode-glib
72 _pick soup3 usr/include/geocode-glib-2.0
73 _pick soup3 usr/lib/libgeocode-glib-2.so*
74 _pick soup3 usr/lib/pkgconfig/geocode-glib-2.0.pc
75 _pick soup3 usr/lib/girepository-1.0/GeocodeGlib-2.0.typelib
76 _pick soup3 usr/share/gir-1.0/GeocodeGlib-2.0.gir
77 _pick soup3 usr/share/gtk-doc/html/geocode-glib-2
80 package_geocode-glib() {
82 depends=(geocode-glib-common="$pkgver-$pkgrel" libsoup-2.4.so)
83 provides=(libgeocode-glib.so)
88 package_geocode-glib-2() {
89 depends=(geocode-glib-common="$pkgver-$pkgrel" libsoup-3.0.so)
90 provides=(libgeocode-glib-2.so)
95 # vim:set sw=2 sts=-1 et: