Blob Blame History Raw
Summary: A program for calculating tide all over the world
Name: xtide
Version: 2.6.4
Release: 0.fdr.4.rh90
Epoch: 0
URL: http://www.flaterco.com/xtide/
Source0: ftp://ftp.flaterco.com/xtide/%{name}-%{version}.tar.gz
Source1: ftp://harmonics.unh.edu/xtide/harmonics.tcd.gz
Source2: %{name}.desktop
Patch0: %{name}-%{version}.patch
License: GPL
Group: Applications/Engineering
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
# BuildRequires: wget
BuildRequires: libpng-devel
BuildRequires: XFree86-devel
BuildRequires: zlib-devel
Buildrequires: desktop-file-utils
Buildrequires: flex
Buildrequires: bison
Provides: xttpd = %{epoch}:%{version}-%{release}

%description 
XTide is a package that provides tide and current
predictions in a wide variety of formats.  Graphs, text listings, and
calendars can be generated, or a tide clock can be provided on your
desktop.

XTide can work with X-windows, plain text terminals, or the web.  This
is accomplished with three separate programs: the interactive
interface (xtide), the non-interactive or command line interface
(tide), and the web interface (xttpd).

The algorithm that XTide uses to predict tides is the one used by the
National Ocean Service in the U.S.  It is significantly more accurate
than the simple tide clocks that can be bought in novelty stores.
However, it takes more to predict tides accurately than just a spiffy
algorithm -- you also need some special data for each and every
location for which you want to predict tides.  XTide reads this data
from harmonics files.  See http://www.flaterco.com/xtide/files.html
for details on where to get these.

Ultimately, XTide's predictions can only be as good as the available
harmonics data.  Due to issues of data availability and of
compatibility with non-U.S. tide systems, the predictions for
U.S. locations tend to be a lot better on average than those for
locations outside of the U.S.  It is up to you to verify that the
predictions for your locale match up acceptably well with the
officially sanctioned ones.

    * Deviations of 1 minute from official predictions are typical for
      U.S. locations having the latest data.

    * Deviations of 20 minutes are typical for non-U.S. locations or
      U.S. locations that are using obsolete data.

    * Much longer deviations indicate a problem.

%prep
%setup -q -T -b 0
%patch -p1 -b .buildroot 
cp %{SOURCE1} ./
cp %{SOURCE2} ./

%build
%configure

# Generates xml parsing routines.  Requires bison and flex.
./do_xml.sh

make %{?_smp_mflags}

# # Get harmonics file
# wget ftp://anonymous:$USER%40$HOSTNAME@harmonics.unh.edu/xtide/harmonics.tcd.gz

# Unzip harmonics file
gunzip harmonics.tcd.gz

%install
rm -rf $RPM_BUILD_ROOT

%makeinstall

# Install harmonics file.
mkdir -p ${RPM_BUILD_ROOT}%{_datadir}/%{name}
cp harmonics.tcd ${RPM_BUILD_ROOT}%{_datadir}/%{name}/

# Add configuration file
mkdir ${RPM_BUILD_ROOT}%{_sysconfdir}
echo "%{_datadir}/%{name}/harmonics.tcd" > ${RPM_BUILD_ROOT}%{_sysconfdir}/%{name}.conf

# Add desktop entry
mkdir -p $RPM_BUILD_ROOT%{_datadir}/applications
desktop-file-install --vendor fedora --delete-original      \
  --dir $RPM_BUILD_ROOT%{_datadir}/applications             \
  --add-category X-Fedora                            \
  %{name}.desktop

%clean
rm -rf $RPM_BUILD_ROOT

%files

%defattr(-,root,root,-)

# Documentation
%doc DOCUMENTATION/{GPL,qui,ver}*
%{_mandir}/man1/*
%{_mandir}/man8/*

# Harmonics dir
%dir %{_datadir}/%{name}

# TCD file
%config(missingok) %{_datadir}/%{name}/harmonics.tcd

# Config file
%config(noreplace) %{_sysconfdir}/*

# Desktop entry
%{_datadir}/applications/*

# Executables
%{_bindir}/*
%{_sbindir}/*

%changelog
* Mon Dec  8 2003 David M. Kaplan <dmk@erizo.ucdavis.edu> 0:2.6.4-0.fdr.4
- Removed 644 permissions.

* Tue Dec  2 2003 David M. Kaplan <dmk@erizo.ucdavis.edu> 0:2.6.4-0.fdr.3
- Fixed problem with debuginfo rpm and lex.xml.c.
- Changed attributes to 644/755 to agree with Fedora specification.

* Mon Nov 17 2003 David M. Kaplan <dmk@erizo.ucdavis.edu> 0:2.6.4-0.fdr.1
- Updated to 2.6.4 version of xtide

* Mon Oct 20 2003 David M. Kaplan <dmk@erizo.ucdavis.edu> 0:2.6.3-0.fdr.2
- Made changes to spec and patch as per Michael Schwendt's suggestions

* Fri Oct 17 2003 David M. Kaplan <dmk@erizo.ucdavis.edu> 0:2.6.3-0.fdr.1
- Modified spec file to meet requirements for fedora

* Tue Oct 14 2003 David M. Kaplan <dmk@erizo.ucdavis.edu> 2.6.3-0.fdr.0
- Modify for Fedora submission

* Tue Oct 14 2003 David M. Kaplan <dmkaplan@ucdavis.edu> 2.6.3-0
- Update to XTide 2.6.3

* Fri Sep 05 2003 David M. Kaplan <dmkaplan@ucdavis.edu>
- Updated to XTide 2.6.2

* Thu Feb 17 2003 David M. Kaplan <dmkaplan@ucdavis.edu>
- Updated to XTide 2.6 FINAL (2003-02-12)

* Thu Feb 17 2003 David M. Kaplan <dmkaplan@ucdavis.edu>
- Updated to XTide 2.6 DEVELOPMENT (2003-02-12)

* Thu Jan 23 2003 David M. Kaplan <dmkaplan@ucdavis.edu>
- Updated to XTide 2.6 DEVELOPMENT (2003-01-17)

* Sat Dec 28 2002 David M. Kaplan <dmkaplan@ucdavis.edu>
- First RPM build.