File grads.spec of Package grads

#  spec file for package GrADS

# norootforbuild

Name:		grads
Version:	2.0.1
%define  supplibver 2.2.0 	
Release:	1
Summary:	The Grid Analysis and Display System (GrADS)
Source:		%{name}-%{version}-src.tar.bz2
Source1:	supplibs-%{supplibver}.tar.bz2
Patch:		%{name}_gaddir.patch
Patch1:         supplibs-%{supplibver}.patch

Group:		Productivity/Scientific/Physics
License:	GPL
BuildRoot:	%{_tmppath}/build-%{name}-%{version}
BuildRequires:  libpng-devel libjasper-devel udunits-devel libsz2-devel
BuildRequires:  gd-devel xorg-x11-proto-devel readline-devel cairo-devel hdf-devel
%if 0%{?suse_version} || 0%{?sles_version}
BuildRequires:	xorg-x11-libX11-devel xorg-x11-libXmu-devel gcc-c++ gcc-fortran
%if 0%{?suse_version} > 1229
BuildRequires:	netcdf-devel
BuildRequires:  libnetcdf-devel
BuildRequires:	libX11-devel libXmu-devel netcdf-devel
BuildRequires:  gcc cpp bison flex automake autoconf rsync
Requires:	wgrib


The Grid Analysis and Display System (GrADS) is an interactive desktop
tool that is used for easy access, manipulation, and visualization of
earth science data. GrADS has two data models for handling gridded and
station data. GrADS supports many data file formats, including binary
(stream or sequential), GRIB (version 1 and 2), NetCDF, HDF (version 4 
and 5), and BUFR (for station data). GrADS has been implemented worldwide
on a variety of commonly used operating systems and is freely distributed
over the Internet.

GrADS uses a 5-Dimensional data environment: the four conventional dimensions
(longitude, latitude, vertical level, and time) plus an optional 5th dimension 
for grids that is generally implemented but designed to be used for ensembles.
Data sets are placed within the 5-D space by use of a data descriptor file.
GrADS handles grids that are regular, non-linearly spaced, gaussian, or of
variable resolution. Data from different data sets may be graphically overlaid,
with correct spatial and time registration. Operations are executed interactively
by entering FORTRAN-like expressions at the command line. A rich set of built-in
functions are provided, but users may also add their own functions as external
routines written in any programming language.

Data may be displayed using a variety of graphical techniques: line and bar graphs,
scatter plots, smoothed contours, shaded contours, streamlines, wind vectors,
grid boxes, shaded grid boxes, and station model plots. Graphics may be output
in PostScript or image formats. GrADS provides geophysically intuitive defaults,
but the user has the option to control all aspects of graphics output.

GrADS has a programmable interface (scripting language) that allows for sophisticated
analysis and display applications. Use scripts to display buttons and dropmenus as
well as graphics, and then take action based on user point-and-clicks. GrADS can be
run in batch mode, and the scripting language facilitates using GrADS to do long
overnight batch jobs.


Jennifer M. Adams, Reinhard Budich, Luigi Calori, Brian E. Doty, Wesley Ebisuzaki, 
Mike Fiorino, Tom Holt, Don Hooper, James L. Kinter, Steve Lord, Gary Love,
Karin Meier, Matthias Munnich, Uwe Schulzweida, Arlindo da Silva, Michael Timlin, 
Pedro Tsai, Joe Wielgosz, Brian Wilkinson, and Katja Winger.

%define debug_package %{nil}


%setup -n grads-%{version} 0 -a 1
%patch -p0
cd supplibs-%{supplibver}/src
%patch1 -p0

# get the name where supplied libs will be installed
export SUPPDIR_BUILD=`./config.guess`

cd ../..
ln -s supplibs-%{supplibver}/${SUPPDIR_BUILD} supplibs


# first it have to build all that supplied libs
cd supplibs-%{supplibver}/src
mkdir hdf4-nc
make install
cd ../.. 

# then we have to build 'grads' package

./configure --prefix=/usr 

%{__mkdir_p} ${RPM_BUILD_ROOT}%{_bindir} 
make DESTDIR=${RPM_BUILD_ROOT} install

# we build wgrib in a extrenal package
rm -f ${RPM_BUILD_ROOT}%{_bindir}/wgrib

/bin/mkdir -p ${RPM_BUILD_ROOT}/usr/lib
cp -pr data ${RPM_BUILD_ROOT}/usr/lib/grads

%__rm -rf %{buildroot}

%doc INSTALL doc

* Mon Jul 01 2013 Guillermo Ballester Valor <> 2.0.1
- Fixed dependencies for opensuse 12.3
* Sat Nov 26 2011 Guillermo Ballester valor <> 2.0.1
- Updated to 2.0.1
- Fixed som new bugs in supplibs-2.2.0 because of new rpmlint and compiler
  in openSUSE 12.1
* Fri Apr 22 2011 Guillermo Ballester valor <> 2.0.a9
- Deleted wgrib. Now requires external wgrib instead of conflict it.
* Tue Apr 19 2011 Guillermo Ballester Valor <> 2.0.a9
- Fixed dependencies.
- Added more fixes to pass the big brother rpmlint
* Mon Apr 18 2011 Guillermo Ballester Valor <> 2.0.a9
- Updated to 2.0.a9
- To avoid the hell of dependencies and problems with other packages 
  now the build is based on the colection of supplied libraries and 
  packages joined by grads mantainers (supplibs tarball).
- Because is mostly statically linked debug packages are disabled 
* Mon Feb 15 2010 Guillermo Ballester <> 2.0.a7.1
- Added missed dependencies to add readline support
- Added gradsdap support
* Wed Oct 21 2009 Guillermo Ballester <> 2.0.a7.1
- Fisrt attempt to include in OBS
* Sat Sep 25 2009 Guillermo Ballester <> 2.0.a7.1
- Added support for netcdf and hdf4
* Wed Sep 23 2009 Guillermo Ballester <> 2.0.a7.1
- First version for 2.0.a7.1