Merge pull request #119383 from jtojnar/geoclue-custom-key
geoclue2: Use our own mozilla API key
This commit is contained in:
commit
3a07a89802
@ -65,17 +65,20 @@ index fde6fa3..39b7b0a 100644
|
|||||||
conf.set_quoted('LOCALEDIR', localedir)
|
conf.set_quoted('LOCALEDIR', localedir)
|
||||||
-conf.set_quoted('SYSCONFDIR', sysconfdir)
|
-conf.set_quoted('SYSCONFDIR', sysconfdir)
|
||||||
+conf.set_quoted('SYSCONFDIR', get_option('sysconfdir'))
|
+conf.set_quoted('SYSCONFDIR', get_option('sysconfdir'))
|
||||||
|
conf.set_quoted('MOZILLA_API_KEY', get_option('mozilla-api-key'))
|
||||||
conf.set10('GCLUE_USE_3G_SOURCE', get_option('3g-source'))
|
conf.set10('GCLUE_USE_3G_SOURCE', get_option('3g-source'))
|
||||||
conf.set10('GCLUE_USE_CDMA_SOURCE', get_option('cdma-source'))
|
conf.set10('GCLUE_USE_CDMA_SOURCE', get_option('cdma-source'))
|
||||||
conf.set10('GCLUE_USE_MODEM_GPS_SOURCE', get_option('modem-gps-source'))
|
|
||||||
diff --git a/meson_options.txt b/meson_options.txt
|
diff --git a/meson_options.txt b/meson_options.txt
|
||||||
index 83bc60e..b726329 100644
|
index 83bc60e..b726329 100644
|
||||||
--- a/meson_options.txt
|
--- a/meson_options.txt
|
||||||
+++ b/meson_options.txt
|
+++ b/meson_options.txt
|
||||||
@@ -34,3 +34,6 @@ option('systemd-system-unit-dir',
|
@@ -34,6 +34,9 @@ option('systemd-system-unit-dir',
|
||||||
option('dbus-srv-user',
|
option('dbus-srv-user',
|
||||||
type: 'string', value: 'root',
|
type: 'string', value: 'root',
|
||||||
description: 'The user (existing) as which the service will run')
|
description: 'The user (existing) as which the service will run')
|
||||||
+option('sysconfdir_install',
|
+option('sysconfdir_install',
|
||||||
+ type: 'string', value: '',
|
+ type: 'string', value: '',
|
||||||
+ description: 'sysconfdir to use during installation')
|
+ description: 'sysconfdir to use during installation')
|
||||||
|
option('mozilla-api-key',
|
||||||
|
type: 'string', value: 'geoclue',
|
||||||
|
description: 'Your API key for Mozilla Location Service')
|
||||||
|
@ -1,50 +1,98 @@
|
|||||||
{ lib, stdenv, fetchFromGitLab, intltool, meson, ninja, pkg-config, gtk-doc, docbook_xsl, docbook_xml_dtd_412, glib, json-glib, libsoup, libnotify, gdk-pixbuf
|
{ lib
|
||||||
, modemmanager, avahi, glib-networking, python3, wrapGAppsHook, gobject-introspection, vala
|
, stdenv
|
||||||
|
, fetchFromGitLab
|
||||||
|
, fetchpatch
|
||||||
|
, intltool
|
||||||
|
, meson
|
||||||
|
, ninja
|
||||||
|
, pkg-config
|
||||||
|
, gtk-doc
|
||||||
|
, docbook-xsl-nons
|
||||||
|
, docbook_xml_dtd_412
|
||||||
|
, glib
|
||||||
|
, json-glib
|
||||||
|
, libsoup
|
||||||
|
, libnotify
|
||||||
|
, gdk-pixbuf
|
||||||
|
, modemmanager
|
||||||
|
, avahi
|
||||||
|
, glib-networking
|
||||||
|
, python3
|
||||||
|
, wrapGAppsHook
|
||||||
|
, gobject-introspection
|
||||||
|
, vala
|
||||||
, withDemoAgent ? false
|
, withDemoAgent ? false
|
||||||
}:
|
}:
|
||||||
|
|
||||||
with lib;
|
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
pname = "geoclue";
|
pname = "geoclue";
|
||||||
version = "2.5.6";
|
version = "2.5.7";
|
||||||
|
|
||||||
|
outputs = [ "out" "dev" "devdoc" ];
|
||||||
|
|
||||||
src = fetchFromGitLab {
|
src = fetchFromGitLab {
|
||||||
domain = "gitlab.freedesktop.org";
|
domain = "gitlab.freedesktop.org";
|
||||||
owner = pname;
|
owner = pname;
|
||||||
repo = pname;
|
repo = pname;
|
||||||
rev = version;
|
rev = version;
|
||||||
sha256 = "13fk6n4j74lvcsrg3kwbw1mkxgcr3iy9dnysmy0pclfsym8z5m5m";
|
sha256 = "1mv1vs4q94bqkmgkj53jcsw1x31kczwydyy3r27a7fycgzmii1pj";
|
||||||
};
|
};
|
||||||
|
|
||||||
patches = [
|
patches = [
|
||||||
|
# Make the Mozilla API key configurable
|
||||||
|
# https://gitlab.freedesktop.org/geoclue/geoclue/merge_requests/54 (only partially backported)
|
||||||
|
(fetchpatch {
|
||||||
|
url = "https://gitlab.freedesktop.org/geoclue/geoclue/commit/95c9ad4dc176860c85a07d0db4cb4179929bdb54.patch";
|
||||||
|
sha256 = "/lq/dLBJl2vf16tt7emYoTtXY6iUw+4s2XcABUHp3Kc=";
|
||||||
|
})
|
||||||
|
(fetchpatch {
|
||||||
|
url = "https://gitlab.freedesktop.org/geoclue/geoclue/commit/1a00809a0d89b0849a57647c878d192354247a33.patch";
|
||||||
|
sha256 = "6FuiukgFWg2cEKt8LlKP4E0rfSH/ZQgk6Ip1mGJpNFQ=";
|
||||||
|
})
|
||||||
|
|
||||||
./add-option-for-installation-sysconfdir.patch
|
./add-option-for-installation-sysconfdir.patch
|
||||||
];
|
];
|
||||||
|
|
||||||
outputs = [ "out" "dev" "devdoc" ];
|
|
||||||
|
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs = [
|
||||||
pkg-config intltool meson ninja wrapGAppsHook python3 vala gobject-introspection
|
pkg-config
|
||||||
|
intltool
|
||||||
|
meson
|
||||||
|
ninja
|
||||||
|
wrapGAppsHook
|
||||||
|
python3
|
||||||
|
vala
|
||||||
|
gobject-introspection
|
||||||
# devdoc
|
# devdoc
|
||||||
gtk-doc docbook_xsl docbook_xml_dtd_412
|
gtk-doc
|
||||||
|
docbook-xsl-nons
|
||||||
|
docbook_xml_dtd_412
|
||||||
];
|
];
|
||||||
|
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
glib json-glib libsoup avahi
|
glib
|
||||||
] ++ optionals withDemoAgent [
|
json-glib
|
||||||
|
libsoup
|
||||||
|
avahi
|
||||||
|
] ++ lib.optionals withDemoAgent [
|
||||||
libnotify gdk-pixbuf
|
libnotify gdk-pixbuf
|
||||||
] ++ optionals (!stdenv.isDarwin) [ modemmanager ];
|
] ++ lib.optionals (!stdenv.isDarwin) [
|
||||||
|
modemmanager
|
||||||
|
];
|
||||||
|
|
||||||
propagatedBuildInputs = [ glib glib-networking ];
|
propagatedBuildInputs = [
|
||||||
|
glib
|
||||||
|
glib-networking
|
||||||
|
];
|
||||||
|
|
||||||
mesonFlags = [
|
mesonFlags = [
|
||||||
"-Dsystemd-system-unit-dir=${placeholder "out"}/etc/systemd/system"
|
"-Dsystemd-system-unit-dir=${placeholder "out"}/etc/systemd/system"
|
||||||
"-Ddemo-agent=${boolToString withDemoAgent}"
|
"-Ddemo-agent=${lib.boolToString withDemoAgent}"
|
||||||
"--sysconfdir=/etc"
|
"--sysconfdir=/etc"
|
||||||
"-Dsysconfdir_install=${placeholder "out"}/etc"
|
"-Dsysconfdir_install=${placeholder "out"}/etc"
|
||||||
|
"-Dmozilla-api-key=5c28d1f4-9511-47ff-b11a-2bef80fc177c"
|
||||||
"-Ddbus-srv-user=geoclue"
|
"-Ddbus-srv-user=geoclue"
|
||||||
"-Ddbus-sys-dir=${placeholder "out"}/share/dbus-1/system.d"
|
"-Ddbus-sys-dir=${placeholder "out"}/share/dbus-1/system.d"
|
||||||
] ++ optionals stdenv.isDarwin [
|
] ++ lib.optionals stdenv.isDarwin [
|
||||||
"-D3g-source=false"
|
"-D3g-source=false"
|
||||||
"-Dcdma-source=false"
|
"-Dcdma-source=false"
|
||||||
"-Dmodem-gps-source=false"
|
"-Dmodem-gps-source=false"
|
||||||
|
Loading…
Reference in New Issue
Block a user