geoclue2/geoclue2.spec
Martin Pluskal a09869ba5d Accepting request 605937 from home:iznogood:branches:Application:Geo
- Add geoclue2-Fix-safety-header-name.patch: public-api: Fix safety
  header name. It should be based on the filename.
- Add geoclue2-Fix-potentially-unused-variable.patch: locator: Fix
  a potentially unused variable declaration.
- Add geoclue2-Fix-duplicate-decl-specifier.patch:Fix compiler
  warning about duplicate decl specifier.

OBS-URL: https://build.opensuse.org/request/show/605937
OBS-URL: https://build.opensuse.org/package/show/Application:Geo/geoclue2?expand=0&rev=71
2018-05-10 07:03:41 +00:00

166 lines
6.0 KiB
RPMSpec

#
# spec file for package geoclue2
#
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
%define _name geoclue
Name: geoclue2
Version: 2.4.10
Release: 0
Summary: GeoLocation Framework
License: GPL-2.0-or-later
Group: Development/Libraries/C and C++
URL: http://people.freedesktop.org/~zeenix/releases/
Source: http://www.freedesktop.org/software/geoclue/releases/2.4/%{_name}-%{version}.tar.xz
Source1: srvGeoClue.conf
Source99: geoclue2-rpmlintrc
# PATCH-FIX-UPSTREAM geoclue2-Fix-safety-header-name.patch -- public-api: Fix safety header name
Patch0: geoclue2-Fix-safety-header-name.patch
# PATCH-FIX-UPSTREAM geoclue2-Fix-potentially-unused-variable.patch - locator: Fix a potentially unused variable declaration
Patch1: geoclue2-Fix-potentially-unused-variable.patch
# PATCH-FIX-UPSTREAM geoclue2-Fix-duplicate-decl-specifier.patch -- Fix compiler warning about duplicate decl specifier
Patch2: geoclue2-Fix-duplicate-decl-specifier.patch
BuildRequires: gtk-doc
BuildRequires: intltool >= 0.40.0
BuildRequires: pkgconfig
BuildRequires: systemd-rpm-macros
BuildRequires: sysuser-tools
BuildRequires: perl(XML::Parser)
BuildRequires: pkgconfig(avahi-client) >= 0.6.10
BuildRequires: pkgconfig(avahi-glib) >= 0.6.10
BuildRequires: pkgconfig(gio-2.0) >= 2.34.0
BuildRequires: pkgconfig(gio-unix-2.0) >= 2.34.0
BuildRequires: pkgconfig(glib-2.0) >= 2.34.0
BuildRequires: pkgconfig(gobject-introspection-1.0)
BuildRequires: pkgconfig(json-glib-1.0) >= 0.14
BuildRequires: pkgconfig(libnotify)
BuildRequires: pkgconfig(libsoup-2.4) >= 2.42
BuildRequires: pkgconfig(mm-glib) >= 1.6
BuildRequires: pkgconfig(systemd)
# This daemon runs as srvGeoClue
Requires: user(srvGeoClue)
# we require shadow for useradd
Requires(pre): shadow
# Virtual provides for the dbus service
Provides: dbus(org.freedesktop.GeoClue2) = %{version}
%{?systemd_requires}
%description
GeoClue is a software framework which can be used to enable geospatial
awareness in applications. GeoClue uses the D-Bus inter-process
communication mechanism to provide location information
%package -n system-user-srvGeoClue
Summary: System user for the geoclue service
Group: System/Base
%sysusers_requires
%description -n system-user-srvGeoClue
System user for use by the geoclue service
%package -n typelib-1_0-Geoclue-2_0
Summary: GeoLocation Framework --GObject Introspection
Group: System/Libraries
%description -n typelib-1_0-Geoclue-2_0
GeoClue is a software framework which can be used to enable geospatial
awareness in applications. GeoClue uses the D-Bus inter-process
communication mechanism to provide location information
%package devel
Summary: GeoLocation Framework -- Development files
Group: Development/Languages/C and C++
Requires: %{name} = %{version}
Requires: typelib-1_0-Geoclue-2_0 = %{version}
%description devel
GeoClue is a software framework which can be used to enable geospatial
awareness in applications. GeoClue uses the D-Bus inter-process
communication mechanism to provide location information
%prep
%autosetup -n %{_name}-%{version} -p1
%build
%configure \
--disable-geoip-server \
--enable-introspection \
--with-dbus-service-user=srvGeoClue
make %{?_smp_mflags} V=1
%sysusers_generate_pre %{SOURCE1} srvGeoClue
%install
%make_install
install -d %{buildroot}%{_localstatedir}/lib/srvGeoClue
mkdir -p %{buildroot}%{_sysusersdir}
install -m 644 %{SOURCE1} %{buildroot}%{_sysusersdir}/system-user-srvGeoClue.conf
find %{buildroot} -type f -name "*.la" -delete -print
# Remove desktop file, we do not build the demos
find %{buildroot} -type f -name "geoclue-demo-agent.desktop" -delete -print
# note: do not use systemd macros for geoclue2.service, they are not meant for dbus unit files.
%pre -n system-user-srvGeoClue -f srvGeoClue.pre
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%files
%license COPYING
%doc README
# Not split per SLPP as the interface to the underlying daemon is
# too strict to allow parallel installations
%{_libdir}/libgeoclue-2.so.*
%{_libexecdir}/geoclue
%dir %{_libexecdir}/geoclue-2.0/
%{_libexecdir}/geoclue-2.0/demos/
%{_datadir}/applications/geoclue-where-am-i.desktop
%dir %{_datadir}/dbus-1
%dir %{_datadir}/dbus-1/interfaces
%{_datadir}/dbus-1/interfaces/org.freedesktop.GeoClue2.Client.xml
%{_datadir}/dbus-1/interfaces/org.freedesktop.GeoClue2.Location.xml
%{_datadir}/dbus-1/interfaces/org.freedesktop.GeoClue2.Manager.xml
%dir %{_datadir}/dbus-1/system-services
%{_datadir}/dbus-1/system-services/org.freedesktop.GeoClue2.service
%dir %{_sysconfdir}/dbus-1
%dir %{_sysconfdir}/dbus-1/system.d
%dir %{_sysconfdir}/geoclue/
%config %{_sysconfdir}/geoclue/geoclue.conf
%config %{_sysconfdir}/dbus-1/system.d/org.freedesktop.GeoClue2.conf
%config %{_sysconfdir}/dbus-1/system.d/org.freedesktop.GeoClue2.Agent.conf
%{_unitdir}/geoclue.service
%files -n system-user-srvGeoClue
%attr(0700,srvGeoClue,root) %{_localstatedir}/lib/srvGeoClue
%{_sysusersdir}/system-user-srvGeoClue.conf
%files -n typelib-1_0-Geoclue-2_0
%{_libdir}/girepository-1.0/Geoclue-2.0.typelib
%files devel
%license COPYING
%doc README
%{_includedir}/libgeoclue-2.0/
%{_libdir}/*.so
%{_libdir}/pkgconfig/geoclue-2.0.pc
%{_libdir}/pkgconfig/libgeoclue-2.0.pc
%{_datadir}/dbus-1/interfaces/org.freedesktop.GeoClue2.Agent.xml
%{_datadir}/dbus-1/interfaces/org.freedesktop.GeoClue2.xml
%{_datadir}/gir-1.0/Geoclue-2.0.gir
%changelog