bc56ad5
Name:           geoclue2
443b270
Version:        2.4.0
443b270
Release:        1%{?dist}
bc56ad5
Summary:        Geolocation service
bc56ad5
bc56ad5
License:        GPLv2+
bc56ad5
URL:            http://www.freedesktop.org/wiki/Software/GeoClue/
443b270
Source0:        http://www.freedesktop.org/software/geoclue/releases/2.4/geoclue-%{version}.tar.xz
bc56ad5
443b270
BuildRequires:  avahi-glib-devel
bc56ad5
BuildRequires:  glib2-devel
443b270
BuildRequires:  gobject-introspection-devel
bc56ad5
BuildRequires:  intltool
bc56ad5
BuildRequires:  itstool
bc56ad5
BuildRequires:  json-glib-devel
bc56ad5
BuildRequires:  libsoup-devel
Richard Hughes ba8cd6b
BuildRequires:  ModemManager-glib-devel
d2c2ba3
BuildRequires:  systemd
8f2f176
Requires(pre):  shadow-utils
d2c2ba3
Requires(post): systemd
d2c2ba3
Requires(preun): systemd
d2c2ba3
Requires(postun): systemd
bc56ad5
Requires:       dbus
bc56ad5
fdf5dc2
Obsoletes:      geoclue2-server < 2.1.8
fdf5dc2
bc56ad5
%description
bc56ad5
Geoclue is a D-Bus service that provides location information. The primary goal
bc56ad5
of the Geoclue project is to make creating location-aware applications as
bc56ad5
simple as possible, while the secondary goal is to ensure that no application
bc56ad5
can access location information without explicit permission from user.
bc56ad5
bc56ad5
443b270
%package        libs
443b270
Summary:        Geoclue client library
443b270
License:        LGPLv2+
443b270
Requires:       %{name}%{?_isa} = %{version}-%{release}
443b270
443b270
%description    libs
443b270
The %{name}-libs package contains a convenience library to interact with
443b270
Geoclue service.
443b270
443b270
bc56ad5
%package        devel
bc56ad5
Summary:        Development files for %{name}
bc56ad5
Requires:       %{name}%{?_isa} = %{version}-%{release}
443b270
Requires:       %{name}-libs%{?_isa} = %{version}-%{release}
bc56ad5
bc56ad5
%description    devel
bc56ad5
The %{name}-devel package contains files for developing applications that
bc56ad5
use %{name}.
bc56ad5
443b270
504657c
%package        demos
504657c
Summary:        Demo applications for %{name}
504657c
Requires:       %{name}%{?_isa} = %{version}-%{release}
4760a7b
BuildRequires:  libnotify-devel
504657c
504657c
%description    demos
504657c
The %{name}-demos package contains demo applications that use %{name}.
504657c
bc56ad5
bc56ad5
%prep
bc56ad5
%setup -q -n geoclue-%{version}
bc56ad5
bc56ad5
bc56ad5
%build
504657c
%configure --with-dbus-service-user=geoclue --enable-demo-agent
bc56ad5
make %{?_smp_mflags} V=1
bc56ad5
bc56ad5
bc56ad5
%install
bc56ad5
%make_install
bc56ad5
443b270
find $RPM_BUILD_ROOT -name '*.la' -delete
443b270
9d7f8fb
# Home directory for the 'geoclue' user
9d7f8fb
mkdir -p $RPM_BUILD_ROOT/var/lib/geoclue
9d7f8fb
bc56ad5
8f2f176
%pre
2161982
# Update the home directory for existing users
2161982
getent passwd geoclue >/dev/null && \
2161982
    usermod -d /var/lib/geoclue geoclue &>/dev/null
2161982
# Create a new user and group if they don't exist
8f2f176
getent group geoclue >/dev/null || groupadd -r geoclue
8f2f176
getent passwd geoclue >/dev/null || \
9d7f8fb
    useradd -r -g geoclue -d /var/lib/geoclue -s /sbin/nologin \
8f2f176
    -c "User for geoclue" geoclue
8f2f176
exit 0
8f2f176
d2c2ba3
%post
d2c2ba3
%systemd_post geoclue.service
d2c2ba3
d2c2ba3
%preun
d2c2ba3
%systemd_preun geoclue.service
d2c2ba3
d2c2ba3
%postun
d2c2ba3
%systemd_postun_with_restart geoclue.service
d2c2ba3
443b270
%post libs -p /sbin/ldconfig
443b270
443b270
%postun libs -p /sbin/ldconfig
443b270
8f2f176
bc56ad5
%files
bc56ad5
%doc COPYING NEWS
9ecebc5
%config %{_sysconfdir}/geoclue/
bc56ad5
%{_sysconfdir}/dbus-1/system.d/org.freedesktop.GeoClue2.conf
Richard Hughes ba8cd6b
%{_sysconfdir}/dbus-1/system.d/org.freedesktop.GeoClue2.Agent.conf
bc56ad5
%{_libexecdir}/geoclue
bc56ad5
%{_datadir}/dbus-1/system-services/org.freedesktop.GeoClue2.service
Richard Hughes ba8cd6b
%{_unitdir}/geoclue.service
9d7f8fb
%attr(755,geoclue,geoclue) %dir /var/lib/geoclue
bc56ad5
443b270
%files libs
443b270
%license COPYING.LIB
443b270
%{_libdir}/girepository-1.0/Geoclue-2.0.typelib
443b270
%{_libdir}/libgeoclue-2.so.0*
443b270
bc56ad5
%files devel
b0ae45a
%{_datadir}/dbus-1/interfaces/org.freedesktop.GeoClue2*.xml
443b270
%{_datadir}/gir-1.0/Geoclue-2.0.gir
443b270
%{_includedir}/libgeoclue-2.0/
bc56ad5
%{_libdir}/pkgconfig/geoclue-2.0.pc
443b270
%{_libdir}/pkgconfig/libgeoclue-2.0.pc
443b270
%{_libdir}/libgeoclue-2.so
bc56ad5
504657c
%files demos
504657c
%{_libexecdir}/geoclue-2.0/demos/where-am-i
504657c
%{_libexecdir}/geoclue-2.0/demos/agent
504657c
%{_datadir}/applications/geoclue-demo-agent.desktop
504657c
%{_datadir}/applications/geoclue-where-am-i.desktop
bc56ad5
bc56ad5
%changelog
443b270
* Wed Nov 04 2015 Kalev Lember <klember@redhat.com> - 2.4.0-1
443b270
- Update to 2.4.0
443b270
- Package new libgeoclue-2.0 library in -libs subpackage
443b270
acac179
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.2.0-2
acac179
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
acac179
eed4a70
* Thu Apr 16 2015 Zeeshan Ali <zeenix@redhat.com> 2.2.0-1
eed4a70
- Update to 2.2.0.
eed4a70
504657c
* Tue Apr  7 2015 Zeeshan Ali <zeenix@redhat.com> 2.1.10-2
504657c
- Package demo applications too.
504657c
f0d3ff8
* Tue Jan  6 2015 Peter Robinson <pbrobinson@fedoraproject.org> 2.1.10-1
f0d3ff8
- Update to 2.1.10
f0d3ff8
f0578a6
* Sat Aug 16 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.1.9-2
f0578a6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
f0578a6
1be4713
* Sat Jun 21 2014 Kalev Lember <kalevlember@gmail.com> - 2.1.9-1
1be4713
- Update to 2.1.9
1be4713
8dba767
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.1.8-2
8dba767
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
8dba767
fdf5dc2
* Wed Apr 16 2014 Kalev Lember <kalevlember@gmail.com> - 2.1.8-1
fdf5dc2
- Update to 2.1.8
fdf5dc2
- Remove and obsolete the -server subpackage
fdf5dc2
b0ae45a
* Wed Mar 26 2014 Kalev Lember <kalevlember@gmail.com> - 2.1.7-1
b0ae45a
- Update to 2.1.7
b0ae45a
9ecebc5
* Fri Mar 07 2014 Kalev Lember <kalevlember@gmail.com> - 2.1.6-1
9ecebc5
- Update to 2.1.6
9ecebc5
d2c2ba3
* Thu Feb 06 2014 Kalev Lember <kalevlember@gmail.com> - 2.1.2-2
d2c2ba3
- Add systemd rpm scripts
14f49a5
- Don't install the demo .desktop files
d2c2ba3
Richard Hughes ba8cd6b
* Tue Feb 04 2014 Richard Hughes <rhughes@redhat.com> - 2.1.2-1
Richard Hughes ba8cd6b
- Update to 2.1.2
Richard Hughes ba8cd6b
2b2a493
* Sun Oct 06 2013 Kalev Lember <kalevlember@gmail.com> - 2.0.0-1
2b2a493
- Update to 2.0.0
9d7f8fb
- Create a home directory for the 'geoclue' user
2b2a493
8f2f176
* Thu Sep 19 2013 Kalev Lember <kalevlember@gmail.com> - 1.99.4-2
8f2f176
- Run the service as 'geoclue' user
8f2f176
690ae44
* Wed Sep 18 2013 Kalev Lember <kalevlember@gmail.com> - 1.99.4-1
690ae44
- Update to 1.99.4
690ae44
c5b4d11
* Tue Sep 03 2013 Kalev Lember <kalevlember@gmail.com> - 1.99.3-1
c5b4d11
- Update to 1.99.3
c5b4d11
bc56ad5
* Sun Aug 25 2013 Kalev Lember <kalevlember@gmail.com> - 1.99.2-3
bc56ad5
- Update -devel subpackage description (#999153)
bc56ad5
bc56ad5
* Sat Aug 24 2013 Kalev Lember <kalevlember@gmail.com> - 1.99.2-2
bc56ad5
- Review fixes (#999153)
bc56ad5
- Drop ldconfig calls that are unnecessary now that the shared library is gone
bc56ad5
- Drop the build dep on gobject-introspection-devel
bc56ad5
- Include API-Documentation.txt in the -server subpackage
bc56ad5
bc56ad5
* Fri Aug 23 2013 Kalev Lember <kalevlember@gmail.com> - 1.99.2-1
bc56ad5
- Update to 1.99.2
bc56ad5
- The shared library is gone in this release and all users should use the
bc56ad5
  dbus service directly
bc56ad5
bc56ad5
* Wed Aug 21 2013 Kalev Lember <kalevlember@gmail.com> - 1.99.1-3
bc56ad5
- Include geoip-lookup in the -server subpackage as well
bc56ad5
bc56ad5
* Wed Aug 21 2013 Kalev Lember <kalevlember@gmail.com> - 1.99.1-2
bc56ad5
- Ship geoip-update in -server subpackage
bc56ad5
bc56ad5
* Tue Aug 20 2013 Kalev Lember <kalevlember@gmail.com> - 1.99.1-1
bc56ad5
- Initial Fedora packaging