1 |
%define api 2 |
2 |
%define major 0 |
3 |
%define gmajor 2.0 |
4 |
%define libname %mklibname %{name} %{api} %{major} |
5 |
%define girname %mklibname %{name}-gir %{gmajor} |
6 |
%define devname %mklibname %{name} %{api} -d |
7 |
|
8 |
%global apikey geoclue |
9 |
|
10 |
Name: geoclue |
11 |
Version: 2.7.0 |
12 |
Release: %mkrel 1 |
13 |
Summary: A modular geoinformation service |
14 |
Group: Geography |
15 |
License: GPLv2+ |
16 |
URL: https://gitlab.freedesktop.org/geoclue/geoclue/wikis/home |
17 |
Source0: https://gitlab.freedesktop.org/geoclue/geoclue/-/archive/%{version}/geoclue-%{version}.tar.bz2 |
18 |
Patch0: 0001-Allow-redshift-to-use-agent.patch |
19 |
Patch1: 0001-Set-StateDirectory-in-systemd-service-file.patch |
20 |
BuildRequires: meson |
21 |
BuildRequires: intltool |
22 |
BuildRequires: itstool |
23 |
BuildRequires: libxml2-utils |
24 |
BuildRequires: vala-devel |
25 |
BuildRequires: pkgconfig(avahi-client) |
26 |
BuildRequires: pkgconfig(avahi-glib) |
27 |
BuildRequires: pkgconfig(gio-2.0) |
28 |
BuildRequires: pkgconfig(gio-unix-2.0) |
29 |
BuildRequires: pkgconfig(glib-2.0) |
30 |
BuildRequires: pkgconfig(gobject-introspection-1.0) |
31 |
BuildRequires: pkgconfig(json-glib-1.0) |
32 |
BuildRequires: pkgconfig(libnm) |
33 |
BuildRequires: pkgconfig(libsoup-3.0) |
34 |
BuildRequires: pkgconfig(mm-glib) |
35 |
|
36 |
# for demo agent |
37 |
BuildRequires: pkgconfig(libnotify) |
38 |
|
39 |
Requires(pre): rpm-helper |
40 |
Requires(post): rpm-helper |
41 |
Requires(postun): rpm-helper |
42 |
Requires(preun): rpm-helper |
43 |
|
44 |
# for TLS/SSL support |
45 |
Requires: glib-networking |
46 |
|
47 |
Provides: geoclue2 = %{version}-%{release} |
48 |
|
49 |
%description |
50 |
Geoclue is a D-Bus service that provides location information. The |
51 |
primary goal of the Geoclue project is to make creating location-aware |
52 |
applications as simple as possible, while the secondary goal is to |
53 |
ensure that no application can access location information without |
54 |
explicit permission from user. |
55 |
|
56 |
Geoclue used to also do (reverse-)geocoding but that functionality has |
57 |
been dropped in favor of geocode-glib library. |
58 |
|
59 |
However project is in the early stages of development and hence |
60 |
lacking essential features. Currently it can only determine your |
61 |
location based on your IP (i-e city-level accuracy) and does not have |
62 |
any permission control. |
63 |
|
64 |
%files |
65 |
%doc NEWS README.md |
66 |
%{_sysconfdir}/dbus-1/system.d/org.freedesktop.GeoClue2.conf |
67 |
%{_sysconfdir}/dbus-1/system.d/org.freedesktop.GeoClue2.Agent.conf |
68 |
%dir %{_sysconfdir}/%{name}/ |
69 |
%config(noreplace) %{_sysconfdir}/%{name}/%{name}.conf |
70 |
%{_sysconfdir}/xdg/autostart/geoclue-demo-agent.desktop |
71 |
%{_datadir}/polkit-1/rules.d/org.freedesktop.GeoClue2.rules |
72 |
%{_datadir}/dbus-1/system-services/org.freedesktop.GeoClue2.service |
73 |
%{_datadir}/dbus-1/interfaces/org.freedesktop.GeoClue2.Agent.xml |
74 |
%{_datadir}/dbus-1/interfaces/org.freedesktop.GeoClue2.xml |
75 |
%{_datadir}/dbus-1/interfaces/org.freedesktop.GeoClue2.Client.xml |
76 |
%{_datadir}/dbus-1/interfaces/org.freedesktop.GeoClue2.Location.xml |
77 |
%{_datadir}/dbus-1/interfaces/org.freedesktop.GeoClue2.Manager.xml |
78 |
%{_datadir}/applications/geoclue-demo-agent.desktop |
79 |
%{_datadir}/applications/geoclue-where-am-i.desktop |
80 |
%{_libexecdir}/geoclue-2.0/ |
81 |
%{_libexecdir}/geoclue |
82 |
%{_unitdir}/geoclue.service |
83 |
%{_mandir}/man5/geoclue.5.* |
84 |
%attr(755,geoclue,geoclue) %dir %{_sharedstatedir}/geoclue |
85 |
|
86 |
#-------------------------------------------------------------------- |
87 |
|
88 |
%package -n %{libname} |
89 |
Summary: Geoclue Client Library |
90 |
Group: System/Libraries |
91 |
|
92 |
%description -n %{libname} |
93 |
A convenience library to interact with Geoclue service. |
94 |
|
95 |
%files -n %{libname} |
96 |
%{_libdir}/libgeoclue-%{api}.so.%{major} |
97 |
%{_libdir}/libgeoclue-%{api}.so.%{major}.* |
98 |
|
99 |
#-------------------------------------------------------------------- |
100 |
|
101 |
%package -n %{girname} |
102 |
Summary: GObject Introspection interface description for geoclue2 |
103 |
Group: System/Libraries |
104 |
|
105 |
%description -n %{girname} |
106 |
GObject Introspection interface description for geoclue2. |
107 |
|
108 |
%files -n %{girname} |
109 |
%{_libdir}/girepository-1.0/Geoclue-%{gmajor}.typelib |
110 |
|
111 |
#-------------------------------------------------------------------- |
112 |
|
113 |
%package -n %{devname} |
114 |
Summary: Development files for geoclue2 |
115 |
Group: Development/Other |
116 |
Obsoletes: libgeoclue1.0-devel < 1.99.2 |
117 |
Obsoletes: lib64geoclue1.0-devel < 1.99.2 |
118 |
Obsoletes: %{name}-devel < 2.4.0 |
119 |
Provides: %{name}-devel = %{version}-%{release} |
120 |
Provides: %{name}2-devel = %{version}-%{release} |
121 |
# (tv) fix "No rule to make target '/usr/share/dbus-1/interfaces/org.freedesktop.GeoClue2.xml', needed by 'geoclue.h'": |
122 |
Requires: geoclue |
123 |
Requires: %{libname} = %{version}-%{release} |
124 |
Requires: %{girname} = %{version}-%{release} |
125 |
|
126 |
%description -n %{devname} |
127 |
This package contains the development files for geoclue2. |
128 |
|
129 |
%files -n %{devname} |
130 |
%{_includedir}/libgeoclue-%{gmajor}/ |
131 |
%{_libdir}/pkgconfig/geoclue-%{gmajor}.pc |
132 |
%{_libdir}/pkgconfig/libgeoclue-%{gmajor}.pc |
133 |
%{_libdir}/libgeoclue-%{api}.so |
134 |
%{_datadir}/gir-1.0/Geoclue-%{gmajor}.gir |
135 |
%{_datadir}/vala/vapi/libgeoclue-%{api}.* |
136 |
|
137 |
#-------------------------------------------------------------------- |
138 |
|
139 |
%prep |
140 |
%setup -q |
141 |
%autopatch -p1 |
142 |
|
143 |
# use specific api key |
144 |
sed -i -e 's/key=geoclue/key=%{apikey}/g' data/geoclue.conf.in |
145 |
|
146 |
%build |
147 |
%meson -Dgtk-doc=false -Ddbus-srv-user=%{name} |
148 |
%meson_build |
149 |
|
150 |
%install |
151 |
%meson_install |
152 |
|
153 |
# home dir for geoclue |
154 |
mkdir -p %{buildroot}%{_sharedstatedir}/geoclue |
155 |
|
156 |
%pre |
157 |
%_pre_useradd %{name} %{_sharedstatedir}/geoclue /sbin/nologin |
158 |
|
159 |
%preun |
160 |
%_preun_service %{name} |
161 |
|
162 |
%post |
163 |
%_post_service %{name} |
164 |
|
165 |
%postun |
166 |
%_postun_userdel %{name} |