Blob Blame History Raw
Name:           wgrib2
Version:        1.9.3
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/
# To make the Source0 tarball, uncomment this line and comment the second.
# spectool -g wgrib2.spec
# make prep
# tar czf wgrib2-%{version}.tar.gz grib2
# The original tar ball is kept in the lookaside cache as well
#Source0:        ftp://ftp.cpc.ncep.noaa.gov/wd51we/wgrib2/wgrib2.tgz.v%{version}
Source0:        wgrib2-%{version}.tar.gz
Source1:        config.h
Patch0:         wgrib2-1.9.3-ifdef.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

BuildRequires:  g2clib-static, zlib-devel, netcdf-devel
BuildRequires:  mysql-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
%patch0 -p1 -b .ifdef
rm -rf g2clib-* *.tar.gz
cp %SOURCE1 wgrib2/config.h


%build
cd wgrib2
export CFLAGS="-I%{_includedir}/netcdf -I%{_includedir}/mysql $RPM_OPT_FLAGS"
export LDFLAGS="-lgrib2c -ljasper -lnetcdf -lpng -L%{_libdir}/mysql -lmysqlclient -lz -lm"
make


%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-wgrib2
%{_bindir}/wgrib2


%changelog
* Thu May 26 2011 Orion Poplawski <orion@cora.nwra.com> - 1.9.3-1
- Update to 1.9.3
- Add patch to fix ifdef typo
- Drop parallel make, not safe

* Thu Mar 31 2011 Orion Poplawski <orion@cora.nwra.com> - 1.9.1.c-1
- Update to 1.9.1.c

* Wed Mar 23 2011 Dan Horák <dan@danny.cz> - 1.9.1-5
- rebuilt for mysql 5.5.10 (soname bump in libmysqlclient)

* Fri Feb 18 2011 Orion Poplawski <orion@cora.nwra.com> - 1.9.1-4
- Rebuild for new g2clib - fix grib handling on 64-bit machines

* Thu Feb 17 2011 Orion Poplawski <orion@cora.nwra.com> - 1.9.1-3
- Rebuild for new g2clib - fix grib handling on 64-bit machines

* Mon Feb 07 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.9.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild

* Thu Dec 2 2010 Orion Poplawski <orion@cora.nwra.com> - 1.9.1-1
- Update to 1.9.1

* Mon Nov 8 2010 Orion Poplawski <orion@cora.nwra.com> - 1.9.0-1
- Update to 1.9.0

* Wed Aug 11 2010 Orion Poplawski <orion@cora.nwra.com> - 1.8.6-1
- Update to 1.8.6

* Thu Jul 1 2010 Orion Poplawski <orion@cora.nwra.com> - 1.8.5-1
- Update to 1.8.5

* Mon May 17 2010 Orion Poplawski <orion@cora.nwra.com> - 1.8.4-1
- Update to 1.8.4

* Mon Mar 8 2010 Orion Poplawski <orion@cora.nwra.com> - 1.8.3-1
- Update to 1.8.3

* Tue Dec  8 2009 Michael Schwendt <mschwendt@fedoraproject.org> - 1.8.2-3
- Explicitly BR g2clib-static in accordance with the Packaging
  Guidelines (g2clib-devel is still static-only).

* Thu Nov 12 2009 Orion Poplawski <orion@cora.nwra.com> - 1.8.2-2
- Rebuild for netcdf 4.1.0

* Fri Nov 6 2009 Orion Poplawski <orion@cora.nwra.com> - 1.8.2-1
- Update to 1.8.2

* Mon Aug 24 2009 Orion Poplawski <orion@cora.nwra.com> - 1.8.1-1
- Update to 1.8.1

* Thu Aug 20 2009 Orion Poplawski <orion@cora.nwra.com> - 1.8.0-1
- Update to 1.8.0
- Only ship the wgrib2 source
- Compile with mysql and netcdf4 support

* Mon Jul 27 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.7.8j-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild

* Thu Jul 16 2009 Orion Poplawski <orion@cora.nwra.com> - 1.7.8j-1
- Update to 1.7.8j
- Drop flags patch, can now pass flags to make

* Fri Apr 10 2009 Orion Poplawski <orion@cora.nwra.com> - 1.7.8g-1
- Update to 1.7.8g
- Fix up flags patch to preserve CFLAGS from environment

* Wed Feb 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.7.7.i-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild

* Sat Dec 21 2008 Orion Poplawski <orion@cora.nwra.com> - 1.7.7.i-1
- Update to 1.7.7.i

* Sun Sep 21 2008 Ville Skyttä <ville.skytta at iki.fi> - 1.7.2b-2
- Fix Patch0:/%%patch mismatch.

* 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