From b2d9249f8c43b800946de73222aecdd516df7d99 Mon Sep 17 00:00:00 2001 From: Volker Fröhlich Date: Sep 11 2011 19:33:03 +0000 Subject: GENERAL REVISION - Correct license to GPLv2+ - Update URL - Replace define with global macro - Devel package required itself - Simplify setup macro - Don't add -lm manually anymore - Correct FSF postal address - Drop cstdio patch - Correct Exec and Icon entry in desktop file - Remove wrong and unnecessary translation entries from desktop file GRASS didn't start for the first issue - Add numpy as requirement - Delete defattr, as the defaults work right - Use name macro where possible - Devel package required itself - Changelog doesn't need encoding conversion anymore Same goes for translators and infrastructure files - Use mandir macro on one occasion - Introduce "shortversion" macro - Beautify case construction for 64 bit build flags - Update syntax for Require on base package to guidelines - Don't list LOCALE files twice, own directory - Don't ship same documentation in different packages - Drop README - Simplify file list in devel package - Replace extra icon source with one from the tarball --- diff --git a/grass.desktop b/grass.desktop index a581547..31433f4 100644 --- a/grass.desktop +++ b/grass.desktop @@ -2,45 +2,24 @@ Encoding=UTF-8 Name=GRASS Comment=Geographical Information System (GIS) -Exec=grass63 -Icon=grass.png +Exec=grass64 +Icon=grass Terminal=true Type=Application Categories=Utility; -Name[bg]=GRASS Comment[bg]=Географска информационна система (GIS) -Name[cs]=GRASS -Comment[cs]=GIS (Geographical Information System) -Name[de]=GRASS -Comment[de]=Geographical Information System (GIS) -Name[es]=GRASS +Comment[de]=Geoinformationssystem (GIS) Comment[es]=Sistema de Información Geográfica (GIS) -Name[fi]=GRASS Comment[fi]=Graafinen paikkatietojärjestelmä (GIS) -Name[fr]=GRASS -Comment[fr]=Système d'informations géographiques (Geographical Information System, GIS) -Name[hu]=GRASS +Comment[fr]=Système d'informations géographiques (GIS) Comment[hu]=Térinformatikai rendszer (GIS) -Name[it]=GRASS -Comment[it]= Geographical Information System (GIS) -Name[ja]=GRASS Comment[ja]=地理情報システム (GIS) -Name[nb]=GRASS Comment[nb]=Geografisk informasjonssystem (GIS) -Name[nl]=GRASS Comment[nl]=Geografisch Informatie Systeem (GIS) -Name[pl]=GRASS Comment[pl]=System informacji geograficznej (GIS) -Name[pt]=GRASS Comment[pt]=Sistema de Informação Geográfica (GIS) -Name[pt_BR]=GRASS -Comment[pt_BR]=Geographical Information System (GIS) -Name[ro]=GRASS Comment[ro]=Sistem Geoinformatic (GIS) -Name[sk]=GRASS Comment[sk]=Geografický informačný systém (GIS) -Name[zh_CN]=GRASS Comment[zh_CN]=图形信息系统 (GIS) -Name[zh_TW]=GRASS Comment[zh_TW]=地理資訊系統 (GIS) diff --git a/grass.spec b/grass.spec index 701ba8a..00f5877 100644 --- a/grass.spec +++ b/grass.spec @@ -1,19 +1,28 @@ +%global shortversion 64 + +%ifarch x86_64 ia64 ppc64 s390x sparc64 alpha +%global configure_64_bit --enable-64bit +%endif +%ifarch sparcv9 sparc64 +%global configure_64_bit --enable-64bit-vis +%endif + + Name: grass Version: 6.4.0 -Release: 3%{?dist} +Release: 4%{?dist} Summary: GRASS - Geographic Resources Analysis Support System Group: Applications/Engineering -License: GPLv2 -URL: http://grass.itc.it/index.php -Source0: http://grass.itc.it/grass64/source/grass-%{version}.tar.gz -Source1: grass.desktop -Source2: http://grass.itc.it/images/grasslogo_vector_small.png -Patch0: grass-pkgconf.patch -Patch1: grass-shlib-soname.patch -Patch2: grass-gcc44.patch +License: GPLv2+ +URL: http://grass.fbk.eu +Source0: http://grass.fbk.eu/grass64/source/grass-%{version}.tar.gz +Source1: %{name}.desktop +Patch0: %{name}-pkgconf.patch +Patch1: %{name}-shlib-soname.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) Requires: proj-nad proj-epsg wxPython Requires: wxGTK wxGTK-gl +Requires: numpy BuildRequires: gettext BuildRequires: python-devel @@ -29,9 +38,9 @@ BuildRequires: cairo-devel wxGTK-devel # we have multilib triage %if "%{_lib}" == "lib" -%define cpuarch 32 +%global cpuarch 32 %else -%define cpuarch 64 +%global cpuarch 64 %endif %description @@ -52,22 +61,28 @@ GRASS (Geographic Resources Analysis Support System) runtime libraries. %package devel Summary: GRASS (Geographic Resources Analysis Support System) development headers Group: Applications/Engineering -Requires: %{name}-libs = %{version}-%{release} +Requires: %{name}%{?isa}-libs = %{version}-%{release} Requires: pkgconfig -Requires: grass-devel lesstif-devel wxPython-devel +Requires: lesstif-devel wxPython-devel Requires: mesa-libGL-devel libX11-devel libXt-devel Requires: gdal-devel proj-devel xorg-x11-proto-devel + %description devel GRASS (Geographic Resources Analysis Support System) development headers. + %prep -%setup -n %{name}-%{version} -q + +# Version +a=`echo %{version}|sed 's/\([[:digit:]]\)\+$//g'|sed 's/\.//g'` + +%setup -q %patch0 -p0 -b .pkgconf~ %patch1 -p0 -b .shlibver~ -%patch2 -p1 -b .gcc44~ # remove the swap file +# Note: Gone in 6.4.1 rm -rf doc/.howto_release.txt.swp # readline requires ncurses, so workaround @@ -79,22 +94,25 @@ sed -i 's|--libmysqld-libs|--libs|g' configure sed -i 's|^cp |cp -p |' tools/build_html_index.sh sed -i 's|-cp |-cp -p |' Makefile -# convert some offendig file UTF-8 -for file in {translators.csv,doc/infrastructure.txt} ; do - if file $file | grep -q ISO-8859 ; then - iconv -f ISO-8859-1 -t UTF-8 $file > ${file}.tmp && \ - mv -f ${file}.tmp $file - fi +# Update FSF address of different ages +# https://trac.osgeo.org/grass/ticket/1422 +# Already fixed for next version! +for f in `find . -name *.h -o -name *.c -o -name *.rtf` ; do + sed -i -e 's/\(59 Temple Place.*Suite 330\|675 Mass Ave\)/51 Franklin Street, Fifth Floor/' $f + sed -i -e 's/\(Boston, MA.*02111-1307\|Cambridge, MA 02139\)/Boston, MA 02110-1301/' $f +done +for f in `find lib/vector/dglib -type f` ; do + sed -i -e 's/02111-1307/02110-1301/' $f done + %build # code may contain sensible buffer overflows triggered by gcc ssp flag (mustfixupstream). +#TODO: Where is the ticket? CFLAGS=`echo %{optflags}|sed -e 's/-Wp,-D_FORTIFY_SOURCE=2 //g'` # keep timestamp over install section export INSTALL="%{__install} -c -p" -# correct linkage against libm.so -export LDFLAGS="-lm" export CFLAGS %configure \ @@ -127,18 +145,13 @@ export CFLAGS --with-opengl \ --with-x \ --with-cairo \ -%ifarch x86_64 ia64 ppc64 s390x sparc64 alpha - --enable-64bit \ -%endif -%ifarch sparcv9 sparc64 - --enable-64bit-vis \ -%endif --enable-largefile \ --with-cxx \ --with-wxwidgets=wx-config \ --with-python \ --with-glw \ - --with-glw-libs=%{_libdir} + --with-glw-libs=%{_libdir} \ + %{configure_64_bit} make %{?_smp_mflags} @@ -150,20 +163,20 @@ make prefix=%{buildroot}%{_prefix} BINDIR=%{buildroot}%{_bindir} \ PREFIX=%{buildroot}%{_prefix} install # changing GISBASE in startup script to point to systems %{_libdir}%{name}-%{version} -mv %{buildroot}%{_bindir}/grass64 %{buildroot}%{_bindir}/grass64.tmp -cat %{buildroot}%{_bindir}/grass64.tmp | \ +mv %{buildroot}%{_bindir}/%{name}%{shortversion} %{buildroot}%{_bindir}/%{name}%{shortversion}.tmp +cat %{buildroot}%{_bindir}/%{name}%{shortversion}.tmp | \ sed -e "1,\$s&^GISBASE.*&GISBASE=%{_libdir}/%{name}-%{version}&" | \ - cat - > %{buildroot}%{_bindir}/grass64 -rm %{buildroot}%{_bindir}/grass64.tmp -chmod +x %{buildroot}%{_bindir}/grass64 + cat - > %{buildroot}%{_bindir}/%{name}%{shortversion} +rm %{buildroot}%{_bindir}/%{name}%{shortversion}.tmp +chmod +x %{buildroot}%{_bindir}/%{name}%{shortversion} # change to wxWidgets by default -cat %{buildroot}%{_prefix}/grass-%{version}%{_sysconfdir}/Init.sh | \ +cat %{buildroot}%{_prefix}/%{name}-%{version}%{_sysconfdir}/Init.sh | \ sed -e '/default if needed \- currently tcltk/,/fi/ {:ack N; /fi/! b ack s/\"tcltk/\"wxpython/}' \ - > %{buildroot}%{_prefix}/grass-%{version}%{_sysconfdir}/Init.sh.tmp -mv -f %{buildroot}%{_prefix}/grass-%{version}%{_sysconfdir}/Init.sh.tmp \ - %{buildroot}%{_prefix}/grass-%{version}%{_sysconfdir}/Init.sh -chmod 755 %{buildroot}%{_prefix}/grass-%{version}%{_sysconfdir}/Init.sh + > %{buildroot}%{_prefix}/%{name}-%{version}%{_sysconfdir}/Init.sh.tmp +mv -f %{buildroot}%{_prefix}/%{name}-%{version}%{_sysconfdir}/Init.sh.tmp \ + %{buildroot}%{_prefix}/%{name}-%{version}%{_sysconfdir}/Init.sh +chmod 755 %{buildroot}%{_prefix}/%{name}-%{version}%{_sysconfdir}/Init.sh # fix docs lookup path sed -i -e 's/$env(GISBASE)\/docs\//\/usr\/share\/doc\/%{name}-%{version}\/docs\//' \ @@ -180,10 +193,10 @@ sed -i -e 's|(\"GISBASE\"), \"docs\", \"html\", \"icons\", \"silk\")|(\"GISBASE\ %{buildroot}%{_prefix}/%{name}-%{version}/etc/wxpython/icons/icon.py # make grass libraries available on the system -mv %{buildroot}%{_prefix}/grass-%{version}/lib/ %{buildroot}%{_libdir} +mv %{buildroot}%{_prefix}/%{name}-%{version}/lib/ %{buildroot}%{_libdir} # make grass headers available on the system -mv %{buildroot}%{_prefix}/grass-%{version}/include %{buildroot}%{_prefix}/ +mv %{buildroot}%{_prefix}/%{name}-%{version}/include %{buildroot}%{_prefix}/ rm -rf %{buildroot}%{_includedir}/Make # create universal multilib header bz#341391 @@ -213,79 +226,80 @@ cat > %{buildroot}%{_sysconfdir}/prelink.conf.d/%{name}-%{cpuarch}.conf < $manpage.tmp mv -f $manpage.tmp $manpage done popd -mkdir -p %{buildroot}%{_datadir}/man/ -mv %{buildroot}%{_prefix}/grass-%{version}/man/* %{buildroot}%{_mandir} -rm -rf %{buildroot}%{_prefix}/grass-%{version}/man -gzip -d ChangeLog_%{version}.gz -iconv -f iso88592 -t utf8 ChangeLog_%{version} | \ -gzip -9 > ChangeLog_%{version}.gz - -# make locales aviable in system, fix issue for pt_BR. +mkdir -p %{buildroot}%{_mandir} +mv %{buildroot}%{_prefix}/%{name}-%{version}/man/* %{buildroot}%{_mandir} +rm -rf %{buildroot}%{_prefix}/%{name}-%{version}/man + +# make locales available in system, fix issue for pt_BR. mkdir -p %{buildroot}%{_datadir}/locale/ -mv %{buildroot}%{_prefix}/grass-%{version}/locale %{buildroot}%{_datadir}/ +mv %{buildroot}%{_prefix}/%{name}-%{version}/locale %{buildroot}%{_datadir}/ mv %{buildroot}%{_datadir}/locale/pt_br %{buildroot}%{_datadir}/locale/pt_BR # pack lang sets -%find_lang grassmods -%find_lang grasslibs -%find_lang grasswxpy -cat grassmods.lang > %{name}.lang -cat grasslibs.lang >> %{name}.lang -cat grasswxpy.lang >> %{name}.lang +%find_lang %{name}mods +%find_lang %{name}libs +%find_lang %{name}wxpy +cat %{name}mods.lang > %{name}.lang +cat %{name}libs.lang >> %{name}.lang +cat %{name}wxpy.lang >> %{name}.lang # install pkg-config file mkdir -p %{buildroot}%{_libdir}/pkgconfig -install -p -m 644 grass.pc %{buildroot}%{_libdir}/pkgconfig/ +install -p -m 644 %{name}.pc %{buildroot}%{_libdir}/pkgconfig/ # install desktop icon mkdir %{buildroot}%{_datadir}/pixmaps/ -install -p -m 644 %{SOURCE2} %{buildroot}%{_datadir}/pixmaps/grass.png +install -p -m 644 tools/%{name}_logo.png %{buildroot}%{_datadir}/pixmaps/%{name}.png desktop-file-install --vendor="fedora" \ --dir=%{buildroot}%{_datadir}/applications %{SOURCE1} -# fixup spurious exec flags here +# Update Exec entry in desktop file to reflect GRASS version +sed -i 's/\(Exec=\).*$/\1%{name}%{shortversion}/' %{buildroot}%{_datadir}/applications/fedora-%{name}.desktop + +# Correct permissions find %{buildroot} -name "*.tcl" -exec chmod +r-x '{}' \; -chmod +x %{buildroot}%{_prefix}/grass-%{version}%{_sysconfdir}/wxpython/gui_modules/menuform.py -chmod -x %{buildroot}%{_prefix}/grass-%{version}%{_sysconfdir}/nviz2.2/scripts/configIndex -chmod -x %{buildroot}%{_prefix}/grass-%{version}%{_sysconfdir}/nviz2.2/scripts/nviz_params -chmod -x %{buildroot}%{_prefix}/grass-%{version}%{_sysconfdir}/nviz2.2/scripts/tclIndex -chmod -x %{buildroot}%{_prefix}/grass-%{version}%{_sysconfdir}/nviz2.2/scripts/panelIndex -chmod +x %{buildroot}%{_prefix}/grass-%{version}%{_sysconfdir}/gem/skeleton/post -chmod +x %{buildroot}%{_prefix}/grass-%{version}%{_sysconfdir}/gem/skeleton/uninstall -chmod +x %{buildroot}%{_prefix}/grass-%{version}%{_sysconfdir}/g.mapsets.tcl -chmod +x %{buildroot}%{_prefix}/grass-%{version}%{_sysconfdir}/dm/tksys.tcl -chmod +x %{buildroot}%{_prefix}/grass-%{version}%{_sysconfdir}/gm/tksys.tcl -chmod +x %{buildroot}%{_prefix}/grass-%{version}%{_sysconfdir}/gm/animate.tcl +chmod +x %{buildroot}%{_prefix}/%{name}-%{version}%{_sysconfdir}/wxpython/gui_modules/menuform.py +chmod -x %{buildroot}%{_prefix}/%{name}-%{version}%{_sysconfdir}/nviz2.2/scripts/configIndex +chmod -x %{buildroot}%{_prefix}/%{name}-%{version}%{_sysconfdir}/nviz2.2/scripts/nviz_params +chmod -x %{buildroot}%{_prefix}/%{name}-%{version}%{_sysconfdir}/nviz2.2/scripts/tclIndex +chmod -x %{buildroot}%{_prefix}/%{name}-%{version}%{_sysconfdir}/nviz2.2/scripts/panelIndex +chmod +x %{buildroot}%{_prefix}/%{name}-%{version}%{_sysconfdir}/gem/skeleton/post +chmod +x %{buildroot}%{_prefix}/%{name}-%{version}%{_sysconfdir}/gem/skeleton/uninstall +chmod +x %{buildroot}%{_prefix}/%{name}-%{version}%{_sysconfdir}/g.mapsets.tcl +chmod +x %{buildroot}%{_prefix}/%{name}-%{version}%{_sysconfdir}/dm/tksys.tcl +chmod +x %{buildroot}%{_prefix}/%{name}-%{version}%{_sysconfdir}/gm/tksys.tcl +chmod +x %{buildroot}%{_prefix}/%{name}-%{version}%{_sysconfdir}/gm/animate.tcl # fixup few nviz script header, it will anyway allways executed by nviz for nviz in {script_play,nviz2.2_script,script_tools,script_file_tools,script_get_line}; do - cat %{buildroot}%{_prefix}/grass-%{version}%{_sysconfdir}/nviz2.2/scripts/$nviz \ - | grep -v '#!nviz' > %{buildroot}%{_prefix}/grass-%{version}%{_sysconfdir}/nviz2.2/scripts/$nviz.tmp - mv %{buildroot}%{_prefix}/grass-%{version}%{_sysconfdir}/nviz2.2/scripts/$nviz.tmp \ - %{buildroot}%{_prefix}/grass-%{version}%{_sysconfdir}/nviz2.2/scripts/$nviz + cat %{buildroot}%{_prefix}/%{name}-%{version}%{_sysconfdir}/nviz2.2/scripts/$nviz \ + | grep -v '#!nviz' > %{buildroot}%{_prefix}/%{name}-%{version}%{_sysconfdir}/nviz2.2/scripts/$nviz.tmp + mv %{buildroot}%{_prefix}/%{name}-%{version}%{_sysconfdir}/nviz2.2/scripts/$nviz.tmp \ + %{buildroot}%{_prefix}/%{name}-%{version}%{_sysconfdir}/nviz2.2/scripts/$nviz done # move icon folder in GISBASE and set its path to be FHS compliant -mv %{buildroot}%{_prefix}/%{name}-%{version}/docs/html/icons %{buildroot}%{_prefix}/grass-%{version}/ +mv %{buildroot}%{_prefix}/%{name}-%{version}/docs/html/icons %{buildroot}%{_prefix}/%{name}-%{version}/ # switch to the system wide docs to be FHS compliant rm -rf %{buildroot}%{_prefix}/%{name}-%{version}/docs -# hide GISBASE into systems %{_libdir} insted, to be FHS compliant +# hide GISBASE into systems %{_libdir} instead, to be FHS compliant mv %{buildroot}%{_prefix}/%{name}-%{version} %{buildroot}%{_libdir}/ # fix fontpath sed -i -e 's|%{buildroot}%{_prefix}/%{name}-%{version}|%{_libdir}/%{name}-%{version}|' \ %{buildroot}%{_libdir}/%{name}-%{version}/etc/fontcap + %clean rm -rf %{buildroot} @@ -293,48 +307,60 @@ rm -rf %{buildroot} %postun libs -p /sbin/ldconfig %files -f %{name}.lang -%defattr(-,root,root,-) -%doc AUTHORS COPYING GPL.TXT README -#%%doc README-fedora -%doc REQUIREMENTS.html CHANGES -%doc doc dist.*/docs %{_sysconfdir}/prelink.conf.d/%{name}-%{cpuarch}.conf -%{_bindir}/grass64 -%{_bindir}/gem64 +%{_bindir}/%{name}%{shortversion} +%{_bindir}/gem%{shortversion} %dir %{_libdir}/%{name}-%{version} %exclude %{_libdir}/%{name}-%{version}/etc/*.table %exclude %{_libdir}/%{name}-%{version}/driver/db/* %{_libdir}/%{name}-%{version}/* -%{_datadir}/applications/fedora-grass.desktop -%{_datadir}/pixmaps/grass.png -%{_datadir}/locale/*/LC_MESSAGES/grasswxpy.mo +%{_datadir}/applications/fedora-%{name}.desktop +%{_datadir}/pixmaps/%{name}.png +%dir %{_datadir}/locale/*/LC_MESSAGES %{_mandir}/man1/* %files libs -%defattr(-,root,root,-) -%doc AUTHORS COPYING GPL.TXT README -%{_libdir}/libgrass_*.so.* +%doc AUTHORS COPYING GPL.TXT CHANGES ChangeLog_%{version}.gz +%{_libdir}/lib%{name}_*.so.* %{_libdir}/%{name}-%{version}/etc/*.table %{_libdir}/%{name}-%{version}/driver/db/* %files devel -%defattr(-,root,root,-) -%doc AUTHORS COPYING GPL.TXT README TODO -%doc ChangeLog_%{version}.gz doc/raster doc/vector -%exclude %{_libdir}/libgrass_*.a +%doc TODO doc +%exclude %{_libdir}/lib%{name}_*.a %{_libdir}/pkgconfig/%{name}.pc -%dir %{_includedir}/%{name} -%{_includedir}/%{name}/*.h -%dir %{_includedir}/%{name}/dgl -%dir %{_includedir}/%{name}/rtree -%dir %{_includedir}/%{name}/vect -%{_includedir}/%{name}/dgl/*.h -%{_includedir}/%{name}/rtree/*.h -%{_includedir}/%{name}/vect/*.h -%{_includedir}/%{name}/iostream/*.h -%{_libdir}/libgrass_*.so +%{_includedir}/%{name} +%{_libdir}/lib%{name}_*.so %changelog +* Tue Aug 02 2011 Volker Fröhlich - 6.4.0-4 +- Correct license to GPLv2+ +- Update URL +- Replace define with global macro +- Devel package required itself +- Simplify setup macro +- Don't add -lm manually anymore +- Correct FSF postal address +- Drop cstdio patch +- Correct Exec and Icon entry in desktop file +- Remove wrong and unnecessary translation entries from desktop file + GRASS didn't start for the first issue +- Add numpy as requirement +- Delete defattr, as the defaults work right +- Use name macro where possible +- Devel package required itself +- Changelog doesn't need encoding conversion anymore + Same goes for translators and infrastructure files +- Use mandir macro on one occasion +- Introduce "shortversion" macro +- Beautify case construction for 64 bit build flags +- Update syntax for Require on base package to guidelines +- Don't list LOCALE files twice, own directory +- Don't ship same documentation in different packages +- Drop README +- Simplify file list in devel package +- Replace extra icon source with one from the tarball + * Wed Mar 23 2011 Dan Horák - 6.4.0-3 - rebuilt for mysql 5.5.10 (soname bump in libmysqlclient) @@ -407,7 +433,7 @@ rm -rf %{buildroot} - new branch release - enable new wxWidgets support - set wxpython as default instead of tcltk -- fix missing GDI unaviable on unices +- fix missing GDI unavailable on unices - smp build is safe now - r.terraflow license problem fixed - no fedora custom packs anymore, all license clear @@ -491,7 +517,7 @@ rm -rf %{buildroot} * Wed Feb 07 2007 Balint Cristian 6.2.1-1 - first build for fedora-extras -- enable all options for packages aviable in fedora +- enable all options for packages available in fedora - fix buffer overflow problem during compile with ssp - fix paths in pkconfig file - add desktop icon