# starplot.spec
#
# Copyright (c) 2003 Kevin B. McCarty kmccarty@princeton.edu
#
%define name starplot
%define version @VERSION@
%define release 1
%define manifest %{_builddir}/%{name}-%{version}-%{release}.manifest

# required items
Name: %{name}
Version: %{version}
Release: %{release}
Copyright: GPL
Group: Application/Science

# optional items
Vendor: Kevin B. McCarty
#Distribution:
#Icon:
URL: http://starplot.org/
Packager: Kevin B. McCarty kmccarty@princeton.edu

# source + patches
Source: %{name}-%{version}.tar.gz
#Source1:
#Patch:
#Patch1:

# RPM info
#Provides:
Requires: gtk2-devel
#Conflicts:
#Prereq:

Prefix: /usr
BuildRoot: /var/tmp/%{name}-%{version}

Summary: A viewer for 3-dimensional perspective maps of stars

%description
A viewer for 3-dimensional perspective maps of stars
@configure_input@
StarPlot is a GTK+ based program that can be used interactively to view
three-dimensional perspective charts of stars.  Charts can be re-centered,
rotated, or zoomed in or out with a mouse click (this can also, of course,
be done via dialog boxes for more precision).  Stars may be viewed (or
ignored) by spectral class and absolute magnitude.
.
StarPlot is packaged with starconvert, a utility that converts
line-oriented stellar data records to StarPlot format.  Most star data
files available on the Internet can be converted this way if a short file
describing the original file format is provided to starconvert.

%prep
%setup -q
#%patch0 -p1

%build
%configure
make

%install
rm -rf $RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT
%makeinstall

# __os_install_post is implicitly expanded after the
# %install section... do it now, and then disable it,
# so all work is done before building manifest.

%{?__os_install_post}
%define __os_install_post %{nil}

# build the file list automagically into %{manifest}

cd $RPM_BUILD_ROOT
rm -f %{manifest}
find . -type d \
        | sed '1,2d;s,^\.,\%attr(-\,root\,root) \%dir ,' >> %{manifest}
find . -type f \
        | sed 's,^\.,\%attr(-\,root\,root) ,' >> %{manifest}
find . -type l \
        | sed 's,^\.,\%attr(-\,root\,root) ,' >> %{manifest}

#%pre
#%post
#%preun
#%postun

%clean
rm -f %{manifest}
rm -rf $RPM_BUILD_ROOT

%files -f %{manifest}
%defattr(-,root,root)
#%doc README
#%docdir
#%config

%changelog
