diff --git a/.cvsignore b/.cvsignore index e69de29..1d9a55c 100644 --- a/.cvsignore +++ b/.cvsignore @@ -0,0 +1 @@ +grass-6.2.1-fedora.tar.gz diff --git a/grass-license.patch b/grass-license.patch new file mode 100644 index 0000000..1bf5ab9 --- /dev/null +++ b/grass-license.patch @@ -0,0 +1,23 @@ +diff -Nru grass-6.2.1-fedora.orig/gui/tcltk/menus/menu.tcl grass-6.2.1-fedora/gui/tcltk/menus/menu.tcl +--- gui/tcltk/menus/menu.tcl 2006-12-12 10:02:38.000000000 +0100 ++++ gui/tcltk/menus/menu.tcl 2007-03-20 15:46:56.000000000 +0100 +@@ -292,7 +292,6 @@ + {command {[G_msg "Carve stream channels into elevation map using vector streams map"]} {} "r.carve" {} -command {execute r.carve }} + {command {[G_msg "Depressionless elevation map and flowline map"]} {} "r.fill.dir" {} -command {execute r.fill.dir }} + {command {[G_msg "Fill lake from seed point to specified level"]} {} "r.lake" {} -command {execute r.lake }} +- {command {[G_msg "Flow accumulation for massive grids"]} {} "r.terraflow" {} -command {execute r.terraflow }} + {command {[G_msg "Generate flow lines for raster map"]} {} "r.flow" {} -command {execute r.flow }} + {command {[G_msg "SIMWE overland flow modeling"]} {} "r.sim.water" {} -command {execute r.sim.water }} + {command {[G_msg "SIMWE sediment erosion, transport, & deposition modeling"]} {} "r.sim.sediment" {} -command {execute r.sim.sediment }} +diff -Nru grass-6.2.1-fedora.orig/raster/Makefile grass-6.2.1-fedora/raster/Makefile +--- raster/Makefile 2006-12-02 06:31:11.000000000 +0100 ++++ raster/Makefile 2007-03-20 15:47:01.000000000 +0100 +@@ -110,7 +110,7 @@ + + PNGBASED = r.out.png + +-CXXBASED = r.terraflow ++CXXBASED = + + TIFFBASED = r.out.tiff + diff --git a/grass-overflow.patch b/grass-overflow.patch new file mode 100644 index 0000000..7523321 --- /dev/null +++ b/grass-overflow.patch @@ -0,0 +1,11 @@ +--- imagery/i.ortho.photo/photo.elev/main.c.orig 2007-02-07 01:30:13.000000000 +0100 ++++ imagery/i.ortho.photo/photo.elev/main.c 2007-02-07 01:21:40.000000000 +0100 +@@ -88,7 +88,7 @@ + + error: + strcat (buf, "Please select a target for group"); +- strcat (buf, group); ++// strcat (buf, group); + G_suppress_warnings(0); + G_fatal_error (buf); + } diff --git a/grass-pkgconf.patch b/grass-pkgconf.patch new file mode 100644 index 0000000..c28ece7 --- /dev/null +++ b/grass-pkgconf.patch @@ -0,0 +1,22 @@ +--- grass.pc.in.orig 2007-03-15 20:00:25.000000000 +0100 ++++ grass.pc.in 2007-03-15 20:00:33.000000000 +0100 +@@ -1,12 +1,13 @@ + # Package Information for pkg-config + +-prefix=@prefix@/grass-@GRASS_VERSION_MAJOR@.@GRASS_VERSION_MINOR@.@GRASS_VERSION_RELEASE@ +-exec_prefix=@prefix@/grass-@GRASS_VERSION_MAJOR@.@GRASS_VERSION_MINOR@.@GRASS_VERSION_RELEASE@ +-libdir=@prefix@/grass-@GRASS_VERSION_MAJOR@.@GRASS_VERSION_MINOR@.@GRASS_VERSION_RELEASE@/lib +-includedir=@prefix@/grass-@GRASS_VERSION_MAJOR@.@GRASS_VERSION_MINOR@.@GRASS_VERSION_RELEASE@/include ++prefix=@prefix@ ++exec_prefix=@prefix@ ++libdir=@libdir@ ++includedir=@includedir@ + + Name: GRASS + Description: GRASS GIS + Version: @GRASS_VERSION_MAJOR@.@GRASS_VERSION_MINOR@.@GRASS_VERSION_RELEASE@ +-Libs: -L@prefix@/grass-@GRASS_VERSION_MAJOR@.@GRASS_VERSION_MINOR@.@GRASS_VERSION_RELEASE@/lib -lgrass_I -lgrass_vask -lgrass_gmath -lgrass_gis -lgrass_datetime -lgrass_gproj -lgrass_vect -lgrass_dbmibase -lgrass_dbmiclient +-Cflags: -I@prefix@/grass-@GRASS_VERSION_MAJOR@.@GRASS_VERSION_MINOR@.@GRASS_VERSION_RELEASE@/include ++Libs: -L${libdir} -lgrass_I -lgrass_vask -lgrass_gmath -lgrass_gis -lgrass_datetime -lgrass_gproj -lgrass_vect -lgrass_dbmibase -lgrass_dbmiclient ++Cflags: -I${includedir}/grass ++Requires: xt x11 xproto glproto gdal diff --git a/grass-shlib-soname.patch b/grass-shlib-soname.patch new file mode 100644 index 0000000..7c2adce --- /dev/null +++ b/grass-shlib-soname.patch @@ -0,0 +1,29 @@ +--- include/Make/Shlib.make.shlibver~ 2006-02-10 16:31:42.000000000 +0100 ++++ include/Make/Shlib.make 2007-02-07 08:55:42.000000000 +0100 +@@ -1,9 +1,12 @@ + # common dependencies and rules for building shared libraries + ++GRASS_MAJOR=6 ++GRASS_MINOR=2 ++ + ifdef MINGW + SHLIB = $(ARCH_LIBDIR)/$(SHLIB_NAME)$(SHLIB_SUFFIX) + else +-SHLIB = $(ARCH_LIBDIR)/$(SHLIB_PREFIX)$(SHLIB_NAME).$(GRASS_VERSION_NUMBER)$(SHLIB_SUFFIX) ++SHLIB = $(ARCH_LIBDIR)/$(SHLIB_PREFIX)$(SHLIB_NAME)$(SHLIB_SUFFIX).$(GRASS_VERSION_NUMBER) + endif + + #for i18N support +@@ -15,7 +18,11 @@ + LDFLAGS += $(SHLIB_LDFLAGS) + + $(SHLIB): $(SHLIB_OBJS) +- $(SHLIB_LD) -o $@ $(LDFLAGS) $^ $(EXTRA_LIBS) && if [ -z "${MINGW}" ] ; then ln -f -s $(notdir $@) $(patsubst %.$(GRASS_VERSION_NUMBER)$(SHLIB_SUFFIX),%$(SHLIB_SUFFIX),$@); fi ++ $(SHLIB_LD) -o $@ -Wl,-soname,lib$(SHLIB_NAME)$(SHLIB_SUFFIX).$(GRASS_MAJOR).$(GRASS_MINOR) $(LDFLAGS) $^ $(EXTRA_LIBS) && \ ++ if [ -z "${MINGW}" ] ; then \ ++ ln -f -s $(notdir $@) $(patsubst %$(SHLIB_SUFFIX).$(GRASS_VERSION_NUMBER),%$(SHLIB_SUFFIX),$@); \ ++ ln -f -s $(notdir $@) $(patsubst %$(SHLIB_SUFFIX).$(GRASS_VERSION_NUMBER),%$(SHLIB_SUFFIX).$(GRASS_MAJOR).$(GRASS_MINOR),$@); \ ++ fi + + shlib: $(SHLIB) + diff --git a/grass.desktop b/grass.desktop new file mode 100644 index 0000000..fcd0111 --- /dev/null +++ b/grass.desktop @@ -0,0 +1,45 @@ +[Desktop Entry] +Encoding=UTF-8 +Name=GRASS +Comment=Geographical Information System (GIS) +Exec=grass62 +Icon=grass.png +Terminal=true +Type=Application +Categories=Utility; +Version=6.2.1 + +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[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[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[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 new file mode 100644 index 0000000..306f740 --- /dev/null +++ b/grass.spec @@ -0,0 +1,318 @@ +Name: grass +Version: 6.2.1 +Release: 13%{?dist} +Summary: GRASS - Geographic Resources Analysis Support System +Group: Applications/Engineering +License: GPL +URL: http://grass.itc.it/index.php +Source0: http://grass.itc.it/grass62/source/grass-%{version}-fedora.tar.gz +Source1: grass.desktop +Source2: http://grass.itc.it/images/grasslogo_vector_small.png +Patch0: grass-overflow.patch +Patch1: grass-pkgconf.patch +Patch2: grass-shlib-soname.patch +Patch3: grass-license.patch +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) + +BuildRequires: gettext +BuildRequires: bison flex pkgconfig +BuildRequires: desktop-file-utils libjpeg-devel +BuildRequires: libtiff-devel libpng-devel freetype-devel +BuildRequires: zlib-devel readline-devel ncurses-devel tk-devel +BuildRequires: unixODBC-devel mysql-devel postgresql-devel sqlite-devel +BuildRequires: mesa-libGLU-devel mesa-libGLw-devel libXmu-devel lesstif-devel +BuildRequires: proj-devel geos-devel blas-devel lapack-devel fftw2-devel gdal-devel + +%description +GRASS (Geographic Resources Analysis Support System) is a Geographic +Information System (GIS) used for geospatial data management and +analysis, image processing, graphics/maps production, spatial +modeling, and visualization. GRASS is currently used in academic and +commercial settings around the world, as well as by many governmental +agencies and environmental consulting companies. + +%package libs +Summary: GRASS (Geographic Resources Analysis Support System) runtime libraries +Group: Applications/Engineering +Requires: python tk + +%description libs +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: pkgconfig +Requires: lesstif-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}-fedora -q +%patch0 -p0 -b .overflow~ +%patch1 -p0 -b .pkgconf~ +%patch2 -p0 -b .shlibver~ +%patch3 -p0 -b .license~ + +# readline requires ncurses, so workaround +# correct mysql_config query +sed -i 's|-lreadline|-lreadline -lcurses|g' configure +sed -i 's|--libmysqld-libs|--libs|g' configure + +# preserve timestamp during install process +sed -i 's|^cp |cp -p |' tools/build_html_index.sh +sed -i 's|-cp |-cp -p |' Makefile + +%build + +# configure without optimizations. +# code may contain sensible buffer overflows triggered by gcc ssp flag (mustfixupstream). +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 \ + --enable-shared \ + --with-nls \ + --with-blas \ + --with-lapack \ + --with-fftw \ + --with-gdal \ + --with-proj \ + --with-proj-includes=%{_includedir} \ + --with-proj-libs=%{_libdir} \ + --with-proj-share=%{_libdir} \ + --with-readline \ + --with-readline-includes=%{_includedir}/readline \ + --with-readline-libs=%{_libdir} \ + --with-sqlite \ + --with-odbc \ + --with-odbc-libs=%{_libdir} \ + --with-odbc-includes=%{_includedir} \ + --with-mysql \ + --with-mysql-includes=%{_includedir}/mysql \ + --with-mysql-libs=%{_libdir}/mysql \ + --with-postgres \ + --with-postgres-includes=%{_includedir}/pgsql \ + --with-postgres-libs=%{_libdir} \ + --with-freetype=yes \ + --with-freetype-includes=%{_includedir}/freetype2 \ + --with-glw \ + --with-glw-libs=%{_libdir} \ + --with-motif \ + --with-opengl \ + --with-x \ +%ifarch x86_64 ia64 ppc64 s390x sparc64 alpha + --enable-64bit \ +%endif +%ifarch sparcv9 sparc64 + --enable-64bit-vis \ +%endif + --enable-largefile \ + --with-cxx \ + --with-python + +# WARNING !!! +# dont use %{?_smp_mflags} its broken +make + +%install +rm -rf %{buildroot} + +# make install +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}/grass62 %{buildroot}%{_bindir}/grass62.tmp +cat %{buildroot}%{_bindir}/grass62.tmp | \ + sed -e "1,\$s&^GISBASE.*&GISBASE=%{_libdir}/%{name}-%{version}&" | \ + cat - > %{buildroot}%{_bindir}/grass62 +rm %{buildroot}%{_bindir}/grass62.tmp +chmod +x %{buildroot}%{_bindir}/grass62 + +# fix docs lookup path +sed -i -e 's/$env(GISBASE)\/docs\//\/usr\/share\/doc\/%{name}-%{version}\/docs\//' \ + %{buildroot}%{_prefix}/%{name}-%{version}/etc/gis_set.tcl +sed -i -e 's/$env(GISBASE)\/docs\//\/usr\/share\/doc\/%{name}-%{version}\/docs\//' \ + %{buildroot}%{_prefix}/%{name}-%{version}/etc/gui.tcl +sed -i -e 's/$env(GISBASE)\/docs\//\/usr\/share\/doc\/%{name}-%{version}\/docs\//' \ + %{buildroot}%{_prefix}/%{name}-%{version}/etc/nviz2.2/scripts/nviz2.2_script +sed -i -e 's|C_BASE="$GISBASE"|C_BASE=\"\/usr\/share\/doc\/%{name}-%{version}\/docs"|g' \ + %{buildroot}%{_prefix}/%{name}-%{version}/scripts/g.manual + +# make grass libraries available on the system +mv %{buildroot}%{_prefix}/grass-%{version}/lib/ %{buildroot}%{_libdir} + +# make grass headers available on the system +mv %{buildroot}%{_prefix}/grass-%{version}/include %{buildroot}%{_prefix}/ +rm %{buildroot}%{_includedir}/portable.h + +# make man pages aviable in system, convert some in utf8. +for manpage in {displaydrivers.1,r.sun.1,m.proj.1}; do + iconv -f iso88592 -t utf8 \ + %{buildroot}%{_prefix}/grass-%{version}/man/man1/$manpage > \ + %{buildroot}%{_prefix}/grass-%{version}/man/man1/$manpage.tmp + mv %{buildroot}%{_prefix}/grass-%{version}/man/man1/$manpage.tmp \ + %{buildroot}%{_prefix}/grass-%{version}/man/man1/$manpage +done +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}%{_datadir}/locale/ +mv %{buildroot}%{_prefix}/grass-%{version}/locale %{buildroot}%{_datadir}/ +mv %{buildroot}%{_datadir}/locale/pt_br %{buildroot}%{_datadir}/locale/pt_BR + +# pack lang sets +%find_lang grassmods +%find_lang grasslibs +cat grassmods.lang > %{name}.lang +cat grasslibs.lang >> %{name}.lang + +# install pkg-config file +mkdir -p %{buildroot}%{_libdir}/pkgconfig +install -p -m 644 grass.pc %{buildroot}%{_libdir}/pkgconfig/ + +# install desktop icon +mkdir %{buildroot}%{_datadir}/pixmaps/ +install -p -m 644 %{SOURCE2} %{buildroot}%{_datadir}/pixmaps/grass.png +desktop-file-install --vendor="fedora" \ + --dir=%{buildroot}%{_datadir}/applications %{SOURCE1} + +# fixup spurious exec flags here +find %{buildroot} -name "*.tcl" -exec chmod +r-x '{}' \; +chmod -x dist.%{_host}/docs/html/nviz/help_frame.tcl +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}/docs/html/nviz/help_frame.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 +done + +# 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 +mv %{buildroot}%{_prefix}/%{name}-%{version} %{buildroot}%{_libdir}/ + +%clean +rm -rf %{buildroot} + +%post libs -p /sbin/ldconfig +%postun libs -p /sbin/ldconfig + +%files -f %{name}.lang +%defattr(-,root,root,-) +%doc AUTHORS COPYING GPL.TXT README README-fedora +%doc REQUIREMENTS.html CHANGES +%doc doc dist.%{_host}/docs +%{_bindir}/grass62 +%{_bindir}/gem +%dir %{_libdir}/%{name}-%{version} +%{_libdir}/%{name}-%{version}/* +%{_datadir}/applications/fedora-grass.desktop +%{_datadir}/pixmaps/grass.png +%{_mandir}/man1/* + +%files libs +%doc AUTHORS COPYING GPL.TXT README +%defattr(-,root,root,-) +%{_libdir}/libgrass_*.so.* + +%files devel +%defattr(-,root,root,-) +%doc AUTHORS COPYING GPL.TXT README TODO +%doc ChangeLog_%{version}.gz doc/raster doc/vector +%exclude %{_libdir}/libgrass_*.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 +%{_libdir}/libgrass_*.so + +%changelog +* Tue Mar 20 2007 Balint Cristian 6.2.1-13 +- see README-fedora for license fix in redistributed tarball +- r.terraflow plugin removal from -fedora tarball + +* Fri Mar 13 2007 Balint Cristian 6.2.1-12 +- more spec review + +* Fri Mar 13 2007 Balint Cristian 6.2.1-11 +- more spec review + +* Fri Mar 13 2007 Balint Cristian 6.2.1-10 +- more spec review + +* Fri Mar 2 2007 Balint Cristian 6.2.1-9 +- require missing libjpeg-devel + +* Tue Feb 27 2007 Balint Cristian 6.2.1-8 +- more buildfixes, should build now in mock for any arches +- estetic changes in spec file + +* Sat Feb 25 2007 Balint Cristian 6.2.1-7 +- fix mock build on any arch. + +* Sat Feb 23 2007 Balint Cristian 6.2.1-6 +- fix mock build, more spec cleanup. +- fix docs lookup from g.manual +- disable fedora c flags, ssp break functionality for now. + +* Sat Feb 23 2007 Balint Cristian 6.2.1-5 +- use macros if posible. + +* Sat Feb 10 2007 Balint Cristian 6.2.1-4 +- fix more nits in specs +- fix require list. + +* Fri Feb 09 2007 Balint Cristian 6.2.1-3 +- fix more nits in specs + +* Wed Feb 07 2007 Balint Cristian 6.2.1-2 +- fix nits in specs +- disable static libs pack +- use macros in file lists if possible. + +* Wed Feb 07 2007 Balint Cristian 6.2.1-1 +- first build for fedora-extras +- enable all options for packages aviable in fedora +- fix buffer overflow problem during compile with ssp +- fix paths in pkconfig file +- add desktop icon +- relocate lang and man page folders in the right places +- sanitize shared library names, fix -soname versioning in libs. +- fix some non utf8 manpage +- fix pt_BR locale path +- fix some nviz script headers +- fix exec rights across some scripts, remove exec from tcl scripts +- move out GISBASE in lib and fixup script enviroment for this +- switch help-doc to datadir/doc/grass and fixit up in grass paths \ No newline at end of file diff --git a/grasslogo_vector_small.png b/grasslogo_vector_small.png new file mode 100644 index 0000000..d79bf44 Binary files /dev/null and b/grasslogo_vector_small.png differ diff --git a/sources b/sources index e69de29..d8e36f6 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +85718f596a118edfe8647d35e6f191e1 grass-6.2.1-fedora.tar.gz