Package init

This commit is contained in:
overweight 2019-09-30 10:39:38 -04:00
commit 066a3ec2d0
2 changed files with 97 additions and 0 deletions

BIN
geoclue-2.4.11.tar.xz Normal file

Binary file not shown.

97
geoclue2.spec Normal file
View File

@ -0,0 +1,97 @@
Name: geoclue2
Version: 2.4.11
Release: 2
Summary: Geolocation service
License: GPLv2+
URL: http://www.freedesktop.org/wiki/Software/GeoClue/
Source0: http://www.freedesktop.org/software/geoclue/releases/2.4/geoclue-%{version}.tar.xz
BuildRequires: avahi-glib-devel glib2-devel gobject-introspection-devel intltool itstool json-glib-devel
BuildRequires: libsoup-devel ModemManager-glib-devel systemd vala libnotify-devel
Requires: shadow-utils systemd dbus
Obsoletes: geoclue2-server < 2.1.8 geoclue < 0.12.99-10 geoclue-devel < 0.12.99-10 geoclue-gsmloc < 0.12.99-10
Obsoletes: geoclue-gui < 0.12.99-10 geoclue-gypsy < 0.12.99-10
Provides: %{name}-demos %{name}-libs
Obsoletes: %{name}-demos %{name}-libs
%description
Geoclue is a D-Bus service that provides location information. The primary goal
of the Geoclue project is to make creating location-aware applications as
simple as possible, while the secondary goal is to ensure that no application
can access location information without explicit permission from user.
geoclue2 also contains demo applications that use %{name}
%package devel
Summary: Development files for %{name} Geoclue client library
Requires: %{name} = %{version}-%{release}
%description devel
The %{name}-devel package contains files for developing applications that
use %{name}.and contains a convenience library to interact with
Geoclue service.
%prep
%autosetup -n geoclue-%{version} -p1
%build
%configure --with-dbus-service-user=geoclue --enable-demo-agent
%make_build V=1
%install
%make_install
find $RPM_BUILD_ROOT -name '*.la' -delete
install -d $RPM_BUILD_ROOT/var/lib/geoclue
%pre
# Update the home directory for existing users
getent passwd geoclue >/dev/null && \
usermod -d /var/lib/geoclue geoclue &>/dev/null
# Create a new user and group if they don't exist
getent group geoclue >/dev/null || groupadd -r geoclue
getent passwd geoclue >/dev/null || \
useradd -r -g geoclue -d /var/lib/geoclue -s /sbin/nologin \
-c "User for geoclue" geoclue
exit 0
%post
%systemd_post geoclue.service
/sbin/ldconfig
%preun
%systemd_preun geoclue.service
%postun
%systemd_postun_with_restart geoclue.service
/sbin/ldconfig
%files
%doc NEWS
%license COPYING
%config %{_sysconfdir}/geoclue/
%{_sysconfdir}/dbus-1/system.d/*.conf
%{_sysconfdir}/xdg/autostart/geoclue-demo-agent.desktop
%{_libexecdir}/geoclue
%{_datadir}/dbus-1/system-services/org.freedesktop.GeoClue2.service
%{_datadir}/applications/geoclue-*.desktop
%{_unitdir}/geoclue.service
%{_libexecdir}/geoclue-2.0/demos/*
%attr(755,geoclue,geoclue) %dir /var/lib/geoclue
%{_libdir}/girepository-1.0/Geoclue-2.0.typelib
%{_libdir}/libgeoclue-2.so.0*
%files devel
%{_datadir}/dbus-1/interfaces/org.freedesktop.GeoClue2*.xml
%{_datadir}/gir-1.0/Geoclue-2.0.gir
%{_datadir}/vala/vapi/libgeoclue-2.0.*
%{_includedir}/libgeoclue-2.0/
%{_libdir}/pkgconfig/*.pc
%{_libdir}/libgeoclue-2.so
%changelog
* Wed Sep 11 2019 openEuler jimmy<dukaitian@huawei.com> - 2.4.11-2
- Package init jimmy