bc56ad5
Name:           geoclue2
Richard Hughes ba8cd6b
Version:        2.1.2
d2c2ba3
Release:        2%{?dist}
bc56ad5
Summary:        Geolocation service
bc56ad5
bc56ad5
License:        GPLv2+
bc56ad5
URL:            http://www.freedesktop.org/wiki/Software/GeoClue/
Richard Hughes ba8cd6b
Source0:        http://www.freedesktop.org/software/geoclue/releases/2.1/geoclue-%{version}.tar.xz
bc56ad5
bc56ad5
BuildRequires:  GeoIP-devel
bc56ad5
BuildRequires:  glib2-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:  NetworkManager-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
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
bc56ad5
%package        devel
bc56ad5
Summary:        Development files for %{name}
bc56ad5
Requires:       %{name}%{?_isa} = %{version}-%{release}
bc56ad5
bc56ad5
%description    devel
bc56ad5
The %{name}-devel package contains files for developing applications that
bc56ad5
use %{name}.
bc56ad5
bc56ad5
bc56ad5
%package        server
bc56ad5
Summary:        Server for IP address geolocation
bc56ad5
Requires:       %{name}%{?_isa} = %{version}-%{release}
bc56ad5
bc56ad5
%description    server
bc56ad5
The %{name}-server package contains the geoip-lookup and geoip-update binaries
bc56ad5
for running on IP address geolocation servers.
bc56ad5
bc56ad5
bc56ad5
%prep
bc56ad5
%setup -q -n geoclue-%{version}
bc56ad5
bc56ad5
bc56ad5
%build
8f2f176
%configure --with-dbus-service-user=geoclue
bc56ad5
make %{?_smp_mflags} V=1
bc56ad5
bc56ad5
bc56ad5
%install
bc56ad5
%make_install
bc56ad5
9d7f8fb
# Home directory for the 'geoclue' user
9d7f8fb
mkdir -p $RPM_BUILD_ROOT/var/lib/geoclue
9d7f8fb
14f49a5
# Remove demo files
14f49a5
rm $RPM_BUILD_ROOT%{_datadir}/applications/geoclue-demo-agent.desktop
14f49a5
rm $RPM_BUILD_ROOT%{_datadir}/applications/geoclue-where-am-i.desktop
14f49a5
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
8f2f176
bc56ad5
%files
bc56ad5
%doc COPYING NEWS
Richard Hughes ba8cd6b
%{_sysconfdir}/geoclue.conf
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
bc56ad5
%{_datadir}/geoclue-2.0/
9d7f8fb
%attr(755,geoclue,geoclue) %dir /var/lib/geoclue
bc56ad5
bc56ad5
%files devel
bc56ad5
%{_libdir}/pkgconfig/geoclue-2.0.pc
bc56ad5
bc56ad5
%files server
bc56ad5
%doc src/geoip-server/API-Documentation.txt
bc56ad5
%{_bindir}/geoip-lookup
bc56ad5
%{_bindir}/geoip-update
bc56ad5
bc56ad5
bc56ad5
%changelog
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