Accepting request 460994 from home:StefanBruens:branches:Application:Geo

- Use .desktop files and PNG icon from tarball
- correct flag to disable stripping (nostrip=True)

OBS-URL: https://build.opensuse.org/request/show/460994
OBS-URL: https://build.opensuse.org/package/show/Application:Geo/gpsd?expand=0&rev=101
This commit is contained in:
Martin Pluskal
2017-02-28 20:18:28 +00:00
committed by Git OBS Bridge
parent 0b3eca57fc
commit 8de9c5cc7e
6 changed files with 20 additions and 37 deletions

View File

@@ -1,7 +1,7 @@
#
# spec file for package gpsd
#
# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
# Copyright (c) 2017 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
@@ -31,9 +31,6 @@ Source98: http://download-mirror.savannah.gnu.org/releases/gpsd/%{name}-%{
Source1: rules.gpsd
Source2: udev.gpsd
Source3: sysconfig.gpsd
Source4: gpsd.xpm
Source5: xgps.desktop
Source6: xgpsspeed.desktop
Source99: %{name}.keyring
Patch0: gpsd-fix-shebang.patch
BuildRequires: bluez-devel
@@ -41,6 +38,7 @@ BuildRequires: chrpath
BuildRequires: dbus-1-glib-devel
BuildRequires: fdupes
BuildRequires: gcc-c++
BuildRequires: hicolor-icon-theme
BuildRequires: libcap-devel
BuildRequires: libqt4-devel >= 4.5.3
BuildRequires: libusb-1_0-devel
@@ -148,9 +146,10 @@ can run on a serial terminal or terminal emulator.
sed -i 's|env.Prepend.*RPATH.*|pass #\0|' SConstruct
%build
# The SCons description does not handle CXXFLAGS correctly, pass C++ flags also in CFLAGS
export CFLAGS="%{optflags} -fvisibility-inlines-hidden -std=gnu++98"
export CXXFLAGS="%{optflags} -fvisibility-inlines-hidden -std=gnu++98"
scons prefix=%{_prefix} libdir=%{_libdir} strip=False
scons prefix=%{_prefix} libdir=%{_libdir} nostrip=True
%install
export CFLAGS="%{optflags} -fvisibility-inlines-hidden -std=gnu++98"
@@ -159,7 +158,7 @@ DESTDIR=%{buildroot} scons prefix=%{_prefix} libdir=%{_libdir} strip=False insta
install -d -m 755 %{buildroot}%{_udevdir}
install -d -m 755 %{buildroot}%{_udevdir}/rules.d
install -d -m 755 %{buildroot}%{_localstatedir}/adm/fillup-templates
install -d -m 755 %{buildroot}%{_datadir}/{applications,pixmaps}
install -d -m 755 %{buildroot}%{_datadir}/applications
install -m 644 %{SOURCE1} %{buildroot}%{_udevdir}/rules.d/51-gpsd.rules
install -m 755 %{SOURCE2} %{buildroot}%{_udevdir}/gpsd.sh
install -m 644 %{SOURCE3} %{buildroot}%{_localstatedir}/adm/fillup-templates
@@ -168,9 +167,9 @@ if [ -f %{buildroot}%{python_sitearch}/*.egg-info ] ; then
fi
chmod 755 %{buildroot}%{python_sitearch}/gps/gps.py
# install desktop entries
install -m 644 %{SOURCE4} %{buildroot}%{_datadir}/pixmaps/%{name}.xpm
install -m 644 %{SOURCE5} %{buildroot}%{_datadir}/applications/
install -m 644 %{SOURCE6} %{buildroot}%{_datadir}/applications/
install -D -m 644 -t %{buildroot}%{_datadir}/icons/hicolor/128x128/apps/ packaging/X11/gpsd-logo.png
install -D -m 644 -t %{buildroot}%{_datadir}/applications/ packaging/X11/xgps.desktop
install -D -m 644 -t %{buildroot}%{_datadir}/applications/ packaging/X11/xgpsspeed.desktop
%if 0%{?suse_version} >= 1210
install -D -m 644 systemd/gpsd.service %{buildroot}/%{_unitdir}/gpsd.service
install -D -m 644 systemd/gpsd.socket %{buildroot}/%{_unitdir}/gpsd.socket
@@ -178,8 +177,10 @@ install -D -m 644 systemd/gpsdctl@.service %{buildroot}/%{_unitdir}/gpsdctl@.ser
ln -s %{_sbindir}/service %{buildroot}%{_sbindir}/rcgpsd
%endif
%suse_update_desktop_file xgpsspeed
%suse_update_desktop_file xgps
# strip absolute path and suffix
sed -i -e 's#Icon=.*/\([^/]\+\)\(\..\+\)#Icon=\1#' %{buildroot}%{_datadir}/applications/xgps{,speed}.desktop
%suse_update_desktop_file -r xgpsspeed System Monitor
%suse_update_desktop_file -r xgps System Monitor
# save some space, create symlinks
%fdupes -s %{buildroot}
@@ -293,6 +294,6 @@ ln -s %{_sbindir}/service %{buildroot}%{_sbindir}/rcgpsd
%{_bindir}/gpxlogger
%{_bindir}/ntpshmmon
%{_datadir}/applications/*.desktop
%{_datadir}/pixmaps/*.xpm
%{_datadir}/icons/hicolor/*/apps/*
%changelog