%define	__prefix   /usr/local

Summary:      Atmospheric Radiative Transfer System
Name:         ARTS
Version:      @VERSION@
Release:      1
Copyright:    GPL
Packager:     olemke@uni-bremen.de
Vendor:       IUP-SAT
Group:        Applications/Scientific
Source:       %{name}-%{version}.tar.bz2
BuildRoot:    %{_tmppath}/%{name}-%{version}-root

%description


%prep
%setup

%build
export CFLAGS="$RPM_OPT_FLAGS" CPPFLAGS="" CXXFLAGS=""
./configure --prefix=%{__prefix} --enable-docs
make

%install
[ -d $RPM_BUILD_ROOT ] && rm -rf $RPM_BUILD_ROOT;

make prefix=$RPM_BUILD_ROOT%{__prefix} install

mkdir -p $RPM_BUILD_ROOT%{_docdir}/%{name}
install -m 644 AUTHORS ChangeLog COPYING README THANKS TODO $RPM_BUILD_ROOT%{_docdir}/%{name}

%clean
[ -d $RPM_BUILD_ROOT ] && rm -rf $RPM_BUILD_ROOT;

%files
%defattr(-, root, root)
%doc %{_docdir}/%{name}
%attr(755,root,root) %{__prefix}/bin/*
%dir                 %{__prefix}/share/arts
%attr(644,root,root) %{__prefix}/share/arts/ami
%attr(644,root,root) %{__prefix}/share/arts/data
%attr(644,root,root) %{__prefix}/share/arts/doc
