diff options
author | Inzamam <inzamam.15@cse.mrt.ac.lk> | 2019-03-12 20:08:34 +0530 |
---|---|---|
committer | Inzamam <inzamam.15@cse.mrt.ac.lk> | 2019-03-13 00:04:02 +0530 |
commit | 05ae6a2e3de8a820735181b6ec35d4b2286728d2 (patch) | |
tree | 53522ad42b592fe5c043e6cc86eb908b3b594d03 /HACKING.md | |
parent | a909708f7dc48545980d39fb32555577520c7aef (diff) | |
download | geoclue-05ae6a2e3de8a820735181b6ec35d4b2286728d2.tar.gz |
Add HACKING.md file
HACKING.md file contains the build instructions to build and run Geoclue
Fixes #104
Diffstat (limited to 'HACKING.md')
-rw-r--r-- | HACKING.md | 80 |
1 files changed, 80 insertions, 0 deletions
diff --git a/HACKING.md b/HACKING.md new file mode 100644 index 0000000..3ac04dd --- /dev/null +++ b/HACKING.md @@ -0,0 +1,80 @@ +# Building Geoclue + +- The following are the dependencies needed to build Geoclue2. But If Geoclue2 + is already included in your distro/OS, you should be able to use the + package manager's command to install all build depedndancies. + + * gio-2.0 + * gio-unix-2.0 + * gobject-introspection-1.0 + * glib-2.0 (>= 2.34.0) + * json-glib-1.0 + * libsoup2.4 (>= 2.42) + * pkg-config + + Fedora: + + ```shell + sudo dnf builddep geoclue2 + ``` + + Debian and Ubuntu: + + ```shell + sudo apt build-dep geoclue-2.0 + ``` + +- For a full-fledged build, you also want ModemManager (mm-glib) and + avahi-client and avahi-glib. You want the latter two if you want to use the + [geoclue-share app](https://wiki.gnome.org/Apps/GeoclueShare). + + Fedora: + + ```shell + sudo dnf install ModemManager + sudo dnf install avahi-client + sudo dnf install avahi-glib + ``` + + Debian and Ubuntu: + + ```shell + sudo apt install modemmanager + sudo apt install libavahi-client3 + sudo apt install libavahi-glib1 + sudo apt install libnotify-dev + ``` + +- [Install meson](https://mesonbuild.com/Getting-meson.html). + +- Ensure you have a geoclue user on your system. If it already exists, you may + need to modify ``/etc/passwd`` file to make it a login user account. + +- Build and install geoclue. + + ```shell + meson --prefix=/usr --sysconfdir /etc -Ddbus-srv-user=geoclue build + # you may need to pass --libdir=/usr/lib64 on some systems (eg. Fedora) + ninja -C build + sudo ninja -C build install + ``` + +- Then you can run it as: + + ```shell + sudo su geoclue + G_MESSAGES_DEBUG=Geoclue /usr/libexec/geoclue + ``` + + If you get the following error, make sure ``geoclue`` process is not already + running: + + > Failed to acquire name 'org.freedesktop.GeoClue2' on system bus or lost it + +- Test + + ```shell + /usr/libexec/geoclue-2.0/demos/where-am-i + ``` + + It will give your current location. |