Name: wgrib2
Version: 1.7.2b
Release: 1%{?dist}
Summary: Manipulate, inventory and decode GRIB2 files
Group: Applications/Engineering
# most files are public domain, geo.c and Netcdf.c are GPL+, gribtab.c is GPLv2+
License: GPLv2+
URL: http://www.cpc.ncep.noaa.gov/products/wesley/wgrib2/
Source0: ftp://ftp.cpc.ncep.noaa.gov/wd51we/wgrib2/wgrib2.tgz.v%{version}
#Upstream makefile doesn't allow you to add flags, points to local library
#versions. This patch fixes that.
Patch0: wgrib2-1.7.2-flags.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: g2clib-devel, zlib-devel, netcdf-devel
%description
Wgrib2 is a swiss army knife for grib2 files. You can use it inventory or
extract data. You can do basic database operations and other nifty things.
%prep
%setup -q -n grib2
rm -r g2clib-* jasper-*.tar.gz libpng-*.tar.gz \
zlib-*.tar.gz netcdf.tar.gz
%patch -p1 -b .flags
%build
cd wgrib2
export CFLAGS="$RPM_OPT_FLAGS"
make %{?_smp_mflags} netcdf_inc="-I%{_includedir}/netcdf-3"
%install
rm -rf $RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT%{_bindir}
install wgrib2/wgrib2 $RPM_BUILD_ROOT%{_bindir}/wgrib2
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(-,root,root,-)
%doc README wgrib2/LICENSE-wgrib
%{_bindir}/wgrib2
%changelog
* Mon May 19 2008 Orion Poplawski <orion@cora.nwra.com> - 1.7.2b-1
- Update to 1.7.2b
- Update makefile patch
* Wed Mar 19 2008 Orion Poplawski <orion@cora.nwra.com> - 1.7.2-1
- Initial Fedora package