PKGBUILD 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. # Maintainer (arch): Jan Alexander Steffens (heftig) <jan.steffens@gmail.com>
  2. # Contributor: György Balló <ballogy@freestart.hu>
  3. # Maintainer: Freemor freemor@freemor.ca
  4. # Rationale:
  5. # Privacy is a right. This anti-privacy code is being included in more and more projects
  6. # time for a drop in privvacy safe version.
  7. # To do:
  8. # replace geoclue.conf with a version that has all tracking set to false
  9. pkgname=geoclue
  10. pkgver=2.5.7
  11. pkgrel=3
  12. pkgdesc="Modular geoinformation service built on the D-Bus messaging system"
  13. arch=(x86_64)
  14. url="https://www.freedesktop.org/wiki/Software/GeoClue/"
  15. license=(LGPL)
  16. depends=(libsoup json-glib libmm-glib avahi geocode-glib)
  17. makedepends=(systemd gobject-introspection git vala meson gtk-doc libnotify)
  18. optdepends=('libnotify: Demo Agent')
  19. provides=("geoclue2=$pkgver-$pkgrel")
  20. conflicts=(geoclue2)
  21. replaces=(geoclue2)
  22. backup=(etc/geoclue/geoclue.conf)
  23. _commit=3bb60dd600a8b247fd6049e7e5b1c73c2c5fc0e8 # tags/2.5.7
  24. source=("git+https://gitlab.freedesktop.org/geoclue/geoclue.git#commit=$_commit")
  25. sha256sums=('SKIP')
  26. pkgver() {
  27. cd $pkgname
  28. git describe --tags | sed 's/-/+/g'
  29. }
  30. prepare() {
  31. cd $pkgname
  32. # config patches (configurable hardcoded API key)
  33. git cherry-pick -n 95c9ad4dc176 1a00809a0d89
  34. }
  35. build() {
  36. arch-meson $pkgname build \
  37. -D dbus-srv-user=geoclue \
  38. -D dbus-sys-dir=/usr/share/dbus-1/system.d \
  39. -D 3g-source=false \
  40. -D cdma-source=false \
  41. -D modem-gps-source=false \
  42. -D nmea-source=false \
  43. -D mozilla-api-key=""
  44. ninja -C build
  45. }
  46. check() {
  47. meson test -C build --print-errorlogs
  48. }
  49. package() {
  50. DESTDIR="$pkgdir" meson install -C build
  51. echo 'u geoclue - "Geoinformation service" /var/lib/geoclue' |
  52. install -Dm644 /dev/stdin "$pkgdir/usr/lib/sysusers.d/$pkgname.conf"
  53. echo 'd /var/lib/geoclue 0755 geoclue geoclue' |
  54. install -Dm644 /dev/stdin "$pkgdir/usr/lib/tmpfiles.d/$pkgname.conf"
  55. }