Summary: ssystem is an OpenGL Solar System simulator.
Summary(ja): OpenGL を使用した太陽系探索シミュレータ
Name: ssystem
Version: 1.6
Release: 2%{?_dist_release}
Group: Applications/Other
Source: http://www1.las.es/~amil/ssystem/ssystem-1.6.tar.gz
Patch: ssystem-vine.patch
Patch1: ssystem-non-ix86.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-root
BuildRequires: mesa-libGL-devel
BuildRequires: freeglut-devel
License: GPL
Vendor: Project Vine
Distribution: Vine Linux

%description
ssystem is an OpenGL Solar System simulator.
Visit the Sun, the nine planets and a few major satellites
(catalog based background stars are also supported) with four camera modes.

%description -l ja
OpenGLを使用した太陽系探索シミュレータで、太陽と９個の惑星、
及び、いくつかのメジャーな衛星を訪れることができます。
また、４つのカメラモードを持っています。

%prep
%setup -q
%patch -p1
%ifnarch i386 i586 i686
%patch1 -p1
%endif

%build
%ifarch x86_64
make LDFLAGS="-L/usr/X11R6/%{_lib} -L$(MESADIR)/lib -ljpeg -lglut -lGLU -lGL -lXext -lXmu -lXi -lX11 -lm"
%else
make
%endif

%install
rm -rf $RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT%{_bindir}
mkdir -p $RPM_BUILD_ROOT%{_datadir}/ssystem

cp -p *.jpg $RPM_BUILD_ROOT%{_datadir}/ssystem
cp -p stars.dat $RPM_BUILD_ROOT%{_datadir}/ssystem
cp -p ssystem.conf $RPM_BUILD_ROOT%{_datadir}/ssystem
cp -p ssystem $RPM_BUILD_ROOT%{_bindir}

%clean
rm -rf $RPM_BUILD_ROOT

%files
%doc CHANGES INSTALAR INSTALL LEEME LICENSE README README.3D TODO hires
%{_bindir}/ssystem
%{_datadir}/ssystem

%changelog
* Sun Oct 12 2008 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 1.6-2vl5
- added BuildRequires: freeglut-devel

* Sat Oct 11 2008 Shu KONNO <owa@bg.wakwak.com> 1.6-1vl5
- applied new versioning policy, spec in utf-8

* Fri Dec 28 2007 Shu KONNO <owa@bg.wakwak.com> 1.6-0vl4
- updated LDFLAGS (if x86_64)

* Wed Aug  2 2006 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 1.6-0vl3
- rebuilt with new toolchains, used more macros
- s/Copyright/License/
- changed Group to Applications/Other

* Mon Jun 12 2000 MATSUBAYASHI 'Shaolin' Kohji <shaolin@rhythmaning.org>
- 1.6-0vl2
- added a small patch for non-ix86 archtecture
