%define PACKAGE_NAME grass %define PACKAGE_VERSION 5.7.0 %define PACKAGE_URL http://grass.itc.it/index.html %define _prefix /usr/lib %define _bindir /usr/bin Summary: GRASS - Geographic Resources Analysis Support System Name: %PACKAGE_NAME Version: %PACKAGE_VERSION Release: 1.fdr.2 Epoch: 1 Source: grass-5.7.0.tar.gz Patch0: grass-readline.patch Patch1: grass-zrange.patch License: GPL; Copyright by the GRASS Development Team Group: Applications/Productivity BuildRequires:gdal-devel, tcl-devel >= 0:8, tk-devel >= 0:8, unixODBC-devel, readline-devel, proj-devel, zlib-devel, libpng-devel, libtiff-devel, postgresql-devel Requires: gdal, tcl >= 0:8, tk >= 0:8, readline, proj, unixODBC, postgresql-libs, libtiff, libpng, zlib BuildRoot: %{_builddir}/%{name}-root Prefix: %{_prefix} %description GRASS (Geographic Resources Analysis Support System) is a raster-based GIS, vector GIS, image processing system, graphics production system, data management system, and spatial modeling system. A graphical user interface for X-Windows is provided. %prep %setup -n %{name}-%{version} %patch0 -p0 %patch1 -p0 CFLAGS="-O2" LDFLAGS="-s" ./configure --prefix=%{_prefix} --bindir=%{_bindir} --with-gdal --with-readline --with-fftw=no %build make # compiling grass make prefix=%{buildroot}%{_prefix} BINDIR=%{buildroot}%{_bindir} \ PREFIX=%{buildroot}%{_prefix} install-strip %install make prefix=%{buildroot}%{_prefix} BINDIR=%{buildroot}%{_bindir} \ PREFIX=%{buildroot}%{_prefix} install-strip # changing GISBASE (deleting %{buildroot} from path) mv %{buildroot}%{_bindir}/grass57 %{buildroot}%{_bindir}/grass57.tmp cat %{buildroot}%{_bindir}/grass57.tmp | sed -e "1,\$s&^GISBASE.*&GISBASE=%{_prefix}/%{name}-%{version}&" | cat - > %{buildroot}%{_bindir}/grass57 rm %{buildroot}%{_bindir}/grass57.tmp chmod +x %{buildroot}%{_bindir}/grass57 if grep -q ignored error.log ; then echo An error occurred and was ignored. echo I will print the error.log and stop for you. cat error.log exit 1 fi %clean rm -rf %{_builddir}/%{name}-%{version} echo `pwd` rm -rf %{buildroot} %files %defattr(-,root,root) %{_bindir} %{_prefix} %doc CHANGES AUTHORS INSTALL COPYING GPL.TXT README REQUIREMENTS.html TODO %Changelog * Tue Aug 10 2004 Silke Reimer - small changes to fit to Fedora naming conventions * Thu Jul 01 2004 Silke Reimer - Initial build