1 # Maintainer: Jan Alexander Steffens (heftig) <heftig@archlinux.org>
2 # Contributor: György Balló <ballogy@freestart.hu>
7 pkgdesc="Modular geoinformation service built on the D-Bus messaging system"
9 url="https://www.freedesktop.org/wiki/Software/GeoClue/"
11 depends=(libsoup json-glib libmm-glib avahi geocode-glib)
12 makedepends=(systemd gobject-introspection git vala meson gtk-doc libnotify)
13 optdepends=('libnotify: Demo Agent')
14 provides=("geoclue2=$pkgver-$pkgrel")
17 backup=(etc/geoclue/geoclue.conf)
18 _commit=3bb60dd600a8b247fd6049e7e5b1c73c2c5fc0e8 # tags/2.5.7
19 source=("git+https://gitlab.freedesktop.org/geoclue/geoclue.git#commit=$_commit")
22 # Mozilla API keys (see https://location.services.mozilla.com/api)
23 # Note: These are for Arch Linux use ONLY. For your own distribution, please
24 # get your own set of keys. Feel free to contact heftig@archlinux.org for
26 _mozilla_api_key=e05d56db0a694edc8b5aaebda3f2db6a
30 git describe --tags | sed 's/-/+/g'
36 # config patches (configurable hardcoded API key)
37 git cherry-pick -n 95c9ad4dc176 1a00809a0d89
39 # https://sources.debian.org/patches/geoclue-2.0/2.5.7-3/ 0003 0004
40 git cherry-pick -n f9347ca7d51b c3eba034eb03 12445fb134ee
42 # https://sources.debian.org/patches/geoclue-2.0/2.5.7-3/fix-nowifi-query.patch/
43 git revert -n 194529c7e712 715cfbf5bec8
45 # https://sources.debian.org/patches/geoclue-2.0/2.5.7-3/ 0006
46 git cherry-pick -n 91e17382521e
48 # don't claim the compass sensor when not needed
49 git cherry-pick -n 34a67b676d24
53 arch-meson $pkgname build \
54 -D dbus-srv-user=geoclue \
55 -D dbus-sys-dir=/usr/share/dbus-1/system.d \
56 -D mozilla-api-key="$_mozilla_api_key"
57 meson compile -C build
61 meson test -C build --print-errorlogs
65 meson install -C build --destdir "$pkgdir"
67 echo 'u geoclue - "Geoinformation service" /var/lib/geoclue' |
68 install -Dm644 /dev/stdin "$pkgdir/usr/lib/sysusers.d/$pkgname.conf"
70 echo 'd /var/lib/geoclue 0755 geoclue geoclue' |
71 install -Dm644 /dev/stdin "$pkgdir/usr/lib/tmpfiles.d/$pkgname.conf"