Blob Blame Raw
Name:           stellarium
Version:        0.6.2
Release:        4
Summary:        Photo-realistic nightsky renderer

Group:          Amusements/Graphics
License:        GPL
URL:            http://stellarium.free.fr/
Source0:        http://dl.sf.net/stellarium/stellarium-0.6.2.tar.gz
Source1:        stellarium.desktop
Patch0:         stellarium-0.6.2-optflags.patch
Patch1:         stellarium-0.6.2-gcc4.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

BuildRequires:  SDL-devel
BuildRequires:  desktop-file-utils
BuildRequires:  ImageMagick

%description
Stellarium is a real-time 3D photo-realistic nightsky renderer. It can
generate images of the sky as seen through the Earth's atmosphere with
more than one hundred thousand stars from the Hipparcos Catalogue,
constellations, planets, major satellites and nebulas.


%prep
%setup -q
%patch0 -p6
%patch1 -p1 -b .gcc4


%build
%configure
make %{?_smp_mflags}
convert data/stellarium.ico stellarium.png


%install
rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT

desktop-file-install                            \
  --vendor fedora                               \
  --dir $RPM_BUILD_ROOT%{_datadir}/applications \
  --add-category X-Fedora                       \
  %{SOURCE1}
iconv -f iso-8859-1 -t utf-8 $RPM_BUILD_ROOT%{_mandir}/man1/stellarium.1 \
  -o $RPM_BUILD_ROOT%{_mandir}/man1/stellarium.1.utf8
mv $RPM_BUILD_ROOT%{_mandir}/man1/stellarium.1.utf8 $RPM_BUILD_ROOT%{_mandir}/man1/stellarium.1
mkdir -p $RPM_BUILD_ROOT%{_datadir}/pixmaps/
install -m 0644 -p stellarium-2.png $RPM_BUILD_ROOT%{_datadir}/pixmaps/stellarium.png
rm $RPM_BUILD_ROOT%{_datadir}/stellarium/data/{icon.bmp,files_format.txt,stellarium.ico}


%clean
rm -rf $RPM_BUILD_ROOT


%files
%defattr(-,root,root,-)
%doc AUTHORS ChangeLog COPYING NEWS README TODO
%{_bindir}/stellarium
%{_datadir}/%{name}
%{_datadir}/applications/*%{name}.desktop
%{_datadir}/pixmaps/%{name}.png
%{_mandir}/man1/*


%changelog
* Thu Apr 14 2005 Michael Schwendt <mschwendt[AT]users.sf.net> - 0.6.2-4
- Fix build for GCC4.
- Fix desktop icon installation.

* Fri Apr  7 2005 Michael Schwendt <mschwendt[AT]users.sf.net>
- rebuilt

* Sun Jan 23 2005 Marius L. Jøhndal <mariuslj at ifi.uio.no> - 0:0.6.2-2
- Fixed broken patch.

* Sun Jan 16 2005 Marius L. Jøhndal <mariuslj at ifi.uio.no> - 0:0.6.2-0.fdr.1
- Updated to 0.6.2.

* Sun Oct 17 2004 Marius L. Jøhndal <mariuslj at ifi.uio.no> - 0:0.6.1-0.fdr.1
- Updated to 0.6.1.

* Sat Aug 21 2004 Marius L. Jøhndal <mariuslj at ifi.uio.no> - 0:0.6.0-0.fdr.2
- Patched to honour optflags.
- Added nvidia specific patch.

* Sat Jul 17 2004 Marius L. Jøhndal <mariuslj at ifi.uio.no> - 0:0.6.0-0.fdr.1
- Initial RPM release.