File kde3-celestia.spec of Package kde3-celestia
#
# spec file for package kde3-celestia
#
# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
Name: kde3-celestia
Version: 1.6.1
Release: 0
Summary: OpenGL Space Simulator
License: GPL-2.0+
Group: Productivity/Scientific/Astronomy
Url: http://celestia.sourceforge.net
Source: http://sourceforge.net/projects/celestia/files/Celestia-source/%{version}/celestia-%{version}.tar.gz
Source1: celestia-rpmlintrc
Patch1: celestia-1.6.0-desktop.patch
Patch2: celestia-1.6.0-config.patch
Patch3: celestia-1.6.1-new_glibc.patch
Patch4: celestia-1.6.1-no_copy_dt_needed_entries.patch
Patch5: celestia-gcc47.patch
Patch6: celestia-libpng15.patch
Patch7: celestia-libpng16.patch
BuildRequires: fdupes
BuildRequires: gettext-tools
BuildRequires: kdelibs3-devel
BuildRequires: libtheora-devel
%if %{suse_version}>1210
BuildRequires: lua51-devel
BuildRequires: pkgconfig(glu)
%else
BuildRequires: lua-devel
%endif
BuildRequires: popt-devel
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%define kdedir /opt/kde3
# celestia was last used in openSUSE 11.4
Provides: celestia = %{version}
Obsoletes: celestia < 1.6.1
%description
Celestia is a free real-time space simulation that lets you experience
our universe in three dimensions. Unlike most planetarium software,
Celestia does not confine you to the surface of the Earth. You can
travel throughout the solar system to any of over 100,000 stars or even
beyond the galaxy. All travel in Celestia is seamless; the exponential
zoom feature lets you explore space across a huge range of scales, from
galaxy clusters down to spacecraft only a few meters across. A
'point-and-goto' interface makes it simple to navigate through the
universe to the object you want to visit.
%prep
%setup -q -n celestia-%{version}
%patch1
%patch2
%patch3
%patch4
%patch5
%patch6 -p1
%patch7 -p1
%build
. /etc/opt/kde3/common_options
srcdir=`pwd` CXXFLAGS="%{optflags}" \
./configure --with-kde \
--with-lua \
--enable-theora \
--enable-libsuffix=`/opt/kde3/bin/kde-config --libsuffix` \
--datarootdir=/opt/kde3/share
make %{?_smp_mflags}
%install
. /etc/opt/kde3/common_options
%makeinstall
install -d %{buildroot}%{_datadir}/pixmaps
install -m644 src/celestia/kde/data/hi32-app-celestia.png %{buildroot}%{_datadir}/pixmaps/celestia.png
rm %{buildroot}%{kdedir}/share/doc/HTML/en/celestia/common
%suse_update_desktop_file -G "Space Simulator" celestia Education Astronomy
# I don't really know if it is OK to just rename it.
mv %{buildroot}%{kdedir}/share/locale/no %{buildroot}%{kdedir}/share/locale/nb
%find_lang celestia
%find_lang celestia_constellations
cat celestia_constellations.lang >>celestia.lang
%fdupes -s %{buildroot}
%files -f celestia.lang
%defattr(-,root,root)
%doc AUTHORS COPYING INSTALL README
%{kdedir}/bin/celestia
%{kdedir}/share/applications/kde/celestia.desktop
%{kdedir}/share/celestia
%{kdedir}/share/apps/celestia
%{kdedir}/share/config/celestiarc
%{kdedir}/share/mimelnk/application/x-celestia-script.desktop
%{kdedir}/share/services/celestia.protocol
%{kdedir}/share/icons/hicolor/*
%{_datadir}/pixmaps/*.png
%changelog