%define PACKAGE_NAME grass %define PACKAGE_VERSION 5.7.0 %define PACKAGE_URL http://grass.itc.it/index.html %define _bindir /usr/bin Summary: GRASS - Geographic Resources Analysis Support System Name: %PACKAGE_NAME Version: %PACKAGE_VERSION Release: 2.fdr.2 Epoch: 0 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, fftw-devel BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) %description GRASS GIS (Geographic Resources Analysis Support System) is an open source, Free Software Geographical Information System (GIS) with raster, topological vector, image processing, and graphics production functionality that operates on various platforms through a graphical user interface and shell in X-Window. %prep %setup -n %{name}-%{version} %patch0 -p0 %patch1 -p0 %configure --with-gdal --with-readline #CFLAGS="-O2" LDFLAGS="-s" ./configure --prefix=%{_prefix} --bindir=%{_bindir} --with-gdal --with-readline %build # compiling grass make %{?_smp_mflags} #make %{?_smp_mflags} prefix=%{buildroot}%{_prefix} \ #BINDIR=%{buildroot}%{_bindir} \ #PREFIX=%{buildroot}%{_prefix} install-strip %install make %{?_smp_mflags} 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} rm -rf %{buildroot} %files %defattr(-,root,root) %{_bindir} %{_prefix} %doc CHANGES AUTHORS INSTALL COPYING GPL.TXT README REQUIREMENTS.html TODO %Changelog * Wed Sep 29 2004 Silke Reimer 0:5.7.0-2.fdr.2 - Changed BuildRoot according to standard specfile. - Added %{?_smp_mflags} to make * Tue Aug 10 2004 Silke Reimer 0:5.7.0-1.fdr.2 - small changes to fit to Fedora naming conventions * Thu Jul 01 2004 Silke Reimer 0:5.7.0-0.fdr.2 - Initial build