diff --git a/grass.desktop b/grass.desktop deleted file mode 100644 index f259ee5..0000000 --- a/grass.desktop +++ /dev/null @@ -1,24 +0,0 @@ -[Desktop Entry] -Name=GRASS -Comment=Geographical Information System (GIS) -Exec=grass64 -Icon=grass -Terminal=true -Type=Application -Categories=Utility; - -Comment[bg]=Географска информационна система (GIS) -Comment[de]=Geoinformationssystem (GIS) -Comment[es]=Sistema de Información Geográfica (GIS) -Comment[fi]=Graafinen paikkatietojärjestelmä (GIS) -Comment[fr]=Système d'informations géographiques (GIS) -Comment[hu]=Térinformatikai rendszer (GIS) -Comment[ja]=地理情報システム (GIS) -Comment[nb]=Geografisk informasjonssystem (GIS) -Comment[nl]=Geografisch Informatie Systeem (GIS) -Comment[pl]=System informacji geograficznej (GIS) -Comment[pt]=Sistema de Informação Geográfica (GIS) -Comment[ro]=Sistem Geoinformatic (GIS) -Comment[sk]=Geografický informačný systém (GIS) -Comment[zh_CN]=图形信息系统 (GIS) -Comment[zh_TW]=地理資訊系統 (GIS) diff --git a/grass.spec b/grass.spec index 1cdf273..aed9428 100644 --- a/grass.spec +++ b/grass.spec @@ -34,7 +34,6 @@ Group: Applications/Engineering License: GPLv2+ URL: http://grass.osgeo.org Source0: http://grass.osgeo.org/%{name}%{shortversion}/source/%{name}-%{version}.tar.gz -Source1: %{name}.desktop Source2: %{name}-config.h Patch0: %{name}-pkgconf.patch @@ -187,6 +186,7 @@ export INSTALL="%{__install} -c -p" make %{?_smp_mflags} + %install rm -rf %{buildroot} @@ -195,7 +195,7 @@ make prefix=%{buildroot}%{_prefix} BINDIR=%{buildroot}%{_bindir} \ PREFIX=%{buildroot}%{_prefix} install # Change GISBASE in startup script to point to systems %{_libdir}/%{name}-%{version} -#TODO: Still necessary? +#TODO: Still necessary? Version-less? sed -i -e "1,\$s&^GISBASE.*&GISBASE=%{_libdir}/%{name}-%{version}&" \ %{buildroot}%{_bindir}/%{name}%{shortversion} @@ -262,18 +262,22 @@ mv %{buildroot}%{_datadir}/locale/pt_br %{buildroot}%{_datadir}/locale/pt_BR %find_lang %{name}libs %find_lang %{name}wxpy -# Install pkg-config file mkdir -p %{buildroot}%{_libdir}/pkgconfig install -p -m 644 %{name}.pc %{buildroot}%{_libdir}/pkgconfig/ -# Install desktop file and icon -mkdir %{buildroot}%{_datadir}/pixmaps/ -install -p -m 644 tools/%{name}_logo.png %{buildroot}%{_datadir}/pixmaps/%{name}.png +for res in 48x48 64x64; do + mkdir -p %{buildroot}%{_datadir}/icons/hicolor/${res}/apps + install -p -m 644 gui/icons/%{name}-${res}.png %{buildroot}%{_datadir}/icons/hicolor/${res}/apps/%{name}.png +done + +# "Encoding" should be removed; Gone for releases after 6.4.3 +# http://trac.osgeo.org/grass/changeset/57941/grass desktop-file-install \ - --dir=%{buildroot}%{_datadir}/applications %{SOURCE1} + --set-icon=grass \ + --dir=%{buildroot}%{_datadir}/applications gui/icons/%{name}.desktop # Correct permissions -#TODO: Still necessary? If so, create a ticket and/or change in prep +#TODO: Still necessary; create a ticket and/or change in prep #TODO: Why are the permissions right in Ubuntu? find %{buildroot} -name "*.tcl" -exec chmod +r-x '{}' \; chmod -x %{buildroot}%{_prefix}/%{name}-%{version}/etc/nviz2.2/scripts/configIndex @@ -314,12 +318,27 @@ sed -i -e 's|%{buildroot}%{_prefix}/%{name}-%{version}|%{_libdir}/%{name}-%{vers ln -s %{_bindir}/%{name}%{shortversion} %{buildroot}%{_bindir}/%{name} ln -s %{_libdir}/%{name}-%{version} %{buildroot}%{_libdir}/%{name} + %clean rm -rf %{buildroot} + +%post +/bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null || : + +%postun +if [ $1 -eq 0 ] ; then + /bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null + /usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : +fi + +%posttrans +/usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : + %post libs -p /sbin/ldconfig %postun libs -p /sbin/ldconfig + %files -f %{name}mods.lang -f %{name}libs.lang -f %{name}wxpy.lang %doc dist.*/docs %{_sysconfdir}/prelink.conf.d/%{name}-%{cpuarch}.conf @@ -331,7 +350,7 @@ rm -rf %{buildroot} %exclude %{_libdir}/%{name}-%{version}/driver/db/* %{_libdir}/%{name}-%{version}/* %{_datadir}/applications/*%{name}.desktop -%{_datadir}/pixmaps/%{name}.png +%{_datadir}/icons/hicolor/*/apps/%{name}.png %dir %{_datadir}/locale/*/LC_MESSAGES %{_mandir}/man1/*.1grass* @@ -353,6 +372,8 @@ rm -rf %{buildroot} %changelog * Thu Oct 3 2013 Volker Fröhlich - 6.4.3-3 - Add patch for release name encoding crash +- Use upstream desktop file (BZ #986852) +- Install icons of different sizes * Sat Sep 14 2013 Volker Fröhlich - 6.4.3-2 - Remove gcc patch (upstream)