# This the rpm spec file for GMT programs
%define name GMT
%define version 4.5.1

Summary: Generic Mapping Tools
Name: %{name}
Version: %{version}
Release: 1%{?_dist_release}
Source0: GMT%{version}_src.tar.bz2
Source1: GMT%{version}_share.tar.bz2
Source4: GMT%{version}_suppl.tar.bz2
Source8: GMT%{version}_doc.tar.bz2

License: GPL
Group: Applications/Engineering
URL: http://imina.soest.hawaii.edu/gmt/

BuildRoot: %{_tmppath}/%{name}-%{version}-root
Requires: netcdf >= 4.0
BuildRequires: netcdf-devel >= 4.0

%description
GMT is a free, public-domain collection of ~60 UNIX tools
that allow users to manipulate (x,y) and (x,y,z) data sets
(including filtering, trend fitting, gridding, projecting,
etc.) and produce Encapsulated PostScript File (EPS)
illustrations ranging from simple x-y plots through contour
maps to artificially illuminated surfaces and 3-D perspective
views in black and white, gray tone, hachure patterns, and
24-bit color. GMT supports 25 common map projections plus
linear, log, and power scaling, and comes with support data
such as coastlines, rivers, and political boundaries. 

%prep
%setup -D -b1 -b4 -b8 -n GMT%{version}

%build
CFLAGS="$RPM_OPT_FLAGS -I/usr/include/netcdf" \
%configure --enable-shared --disable-flock
%__make

%install
rm -rf %{buildroot}
%makeinstall
%makeinstall-suppl
%makeinstall-data
%makeinstall-man

%clean
rm -rf %{buildroot}

%post -p /sbin/ldconfig

%postun -p /sbin/ldconfig


%files
%defattr(-,root,root)
%doc README 
%{_bindir}
%{_includedir}
%{_libdir}
%{_datadir}

%changelog
* Sat Jan 16 2010 Yoji TOYODA <bsyamato@sea.plala.or.jp> 4.5.1-1
- new upstream release
- remove SOURCE2 (GMT%{version}_man.tar.bz2)
- remove SOURCE3 (GMT%{version}_web.tar.bz2)
- remove SOURCE5 (GMT%{version}_pdf.tar.bz2)
- remove SOURCE6 (GMT%{version}_scripts.tar.bz2)
- remove SOURCE7 (GMT%{version}_tut.tar.bz2)
- remove Patch0 (GMT-conf.patch)
- add SOURCE8 (GMT%{version}_doc.tar.bz2)

* Sat Apr 14 2007 Daisuke SUZUKI <daisuke@linux.or.jp> 4.1.4-0vl1
- new upstream major version

* Sat Apr 14 2007 Daisuke SUZUKI <daisuke@linux.or.jp> 3.4.6-0vl1
- new upstream release
- fix <BTS:435>

* Sat Oct 22 2005 MATSUBAYASHI Kohji <shaolin@vinelinux.org> 3.4.2-0vl2
- added BuildRequires: netcdf-devel > 3.6
- BTW the changelog of 3.4.2-0vl1 was empty!

* Fri Oct 21 2005 Daisuke SUZUKI <daisuke@linux.or.jp> 3.4.2-0vl1
- initial build

