]> git.pld-linux.org Git - packages/celestia.git/blobdiff - celestia.spec
- include celestia_constellations.mo files
[packages/celestia.git] / celestia.spec
index ab58a756e0ec271ede7f9cc1b5e9515237197dee..e6c4a9c4f6c0276d8ca9958d72358d80bc08d39a 100644 (file)
@@ -1,30 +1,74 @@
+
+%bcond_without kde             # KDE UI as the default one
+%bcond_with    gtk             # use gtk2 UI instead
+%bcond_with    gnome           # use libgnome2 UI instead
+%bcond_with    glut            # use glut UI instead
+
+%if %{with gtk} || %{with gnome} || %{with glut}
+%undefine      with_kde
+%endif
+
 Summary:       A real-time visual space simulation
-Summary(pl):   Symulacja przestrzeni kosmicznej w czasie rzeczywistym
+Summary(pl.UTF-8):     Symulacja przestrzeni kosmicznej w czasie rzeczywistym
 Name:          celestia
-Version:       1.1.4
-Release:       2
+Version:       1.5.1
+Release:       0.2
 License:       GPL
-Group:         X11/Applications/Games
-Source0:       http://prdownloads.sourceforge.net/celestia/%{name}-%{version}.tar.gz
+Group:         X11/Applications/Science
+Source0:       http://dl.sourceforge.net/celestia/%{name}-%{version}.tar.gz
+# Source0-md5: df6854a2cf62d2e96612398c13b68fd2
+Patch0:                %{name}-as-needed.patch
+Patch1:                %{name}-gcc43.patch
+Patch2:                %{name}-extras.patch
+Patch3:                %{name}-desktop.patch
 URL:           http://www.shatters.net/celestia/
 BuildRequires: OpenGL-devel
 BuildRequires: autoconf
 BuildRequires: automake
-BuildRequires: glut-devel
-BuildRequires: gnome-libs-devel
-BuildRequires: gtk+-devel
-BuildRequires: gtkglarea-devel
+%{?with_glut:BuildRequires:    glut-devel >= 3.7}
+%if %{with gtk} || %{with gnome}
+BuildRequires: cairo-devel
+BuildRequires: gtk+2-devel >= 2.6
+BuildRequires: gtkglext-devel
+%endif
+%{?with_kde:BuildRequires:     kdelibs-devel}
+%{?with_gnome:BuildRequires:   libgnomeui-devel}
 BuildRequires: libjpeg-devel
 BuildRequires: libpng-devel
 BuildRequires: libstdc++-devel
+BuildRequires: libtool
+BuildRequires: lua50-devel
+BuildRequires: pkgconfig
+BuildRequires: sed >= 4.0
 Requires:      OpenGL
+# celestia < 1.4 original packages
+Obsoletes:     celestia-extrasolar
+Obsoletes:     celestia-generator
+Obsoletes:     celestia-stars
+Obsoletes:     celestia-task-default
+# texture replacement addons, virtual provides
+Obsoletes:     celestia-textures-earth
+Obsoletes:     celestia-textures-earth-clouds
+Obsoletes:     celestia-textures-earth-night
+Obsoletes:     celestia-textures-galileanmoons
+Obsoletes:     celestia-textures-mars
+Obsoletes:     celestia-textures-mars-bumpmap
+Obsoletes:     celestia-textures-mercury
+Obsoletes:     celestia-textures-mercury-bumpmap
+Obsoletes:     celestia-textures-moon
+Obsoletes:     celestia-textures-moon-bumpmap
+# celestia addons
+Obsoletes:     celestia-blackhole
+Obsoletes:     celestia-galaxies_extended
+Obsoletes:     celestia-galaxy_clusters
+Obsoletes:     celestia-globular_clusters
+Obsoletes:     celestia-im-starwars
+Obsoletes:     celestia-pathfinder
+Obsoletes:     celestia-voyager
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %define                _noautoreqdep   libGL.so.1 libGLU.so.1 libGLcore.so.1
 
-%define                _prefix         /usr/X11R6
-%define                _mandir         %{_prefix}/man
-
 %description
 Celestia is a free real-time space simulation that lets you experience
 our universe in three dimensions. Unlike most planetarium software,
@@ -36,43 +80,84 @@ 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.
 
-%description -l pl
+%description -l pl.UTF-8
 Celestia to wolny symulator przestrzeni komicznej w czasie
-rzeczywistym, który pozwala do¶wiadczaæ naszego Wszech¶wiata w trzech
-wymiarach. W odró¿nieniu od innych programów planetarnych Celestia nie
-przywi±zuje Ciê do powierzchni ziemi. Mo¿esz podró¿owaæ przez Uk³ad
-S³oneczny do ponad 100,000 gwiazd lub nawet poza galaktykê. Wszystkie
-podró¿e w Celestii s± niezauwa¿alne; funkcja wyk³adniczego
-przybli¿enia pozwala Ci odkrywaæ Kosmos w ró¿nych skalach - od
-spojrzenia na galaktyki do widoku kilkumetrowych statków kosmicznych.
-Interfejs typu 'poka¿-i-leæ' czyni nawigacjê przez Wszech¶wiat prost±.
+rzeczywistym, który pozwala doświadczać naszego Wszechświata w trzech
+wymiarach. W odróżnieniu od innych programów planetarnych Celestia nie
+przywiązuje Cię do powierzchni ziemi. Możesz podróżować przez Układ
+Słoneczny do ponad 100,000 gwiazd lub nawet poza galaktykę. Wszystkie
+podróże w Celestii są niezauważalne; funkcja wykładniczego
+przybliżenia pozwala Ci odkrywać Kosmos w różnych skalach - od
+spojrzenia na galaktyki do widoku kilkumetrowych statków kosmicznych.
+Interfejs typu 'pokaż-i-leć' czyni nawigację przez Wszechświat prostą.
 
 %prep
 %setup -q
+%patch0
+%patch1 -p1
+%patch2 -p1
+%patch3 -p1
+
+# ugly hack not to require GConf2-devel if we're not building gnome version
+%{!?with_gnome:sed -i "s#AM_GCONF_SOURCE_2##g" configure.in}
 
 %build
-rm -f missing
-%{__aclocal} -I macros
-%{__autoconf}
-automake -a -f
-CFLAGS="-I%{_includedir} %{rpmcflags}"
-CPPFLAGS="-I%{_includedir} %{rpmcflags}"
-CXXFLAGS="-I%{_includedir} %{rpmcflags} -fno-rtti -fno-exceptions"
+cp -f /usr/share/automake/config.sub admin
+%{__make} -f admin/Makefile.common
+
 %configure \
-       --enable-gtk
+       %{?with_kde:--with-kde} \
+       %{?with_gtk:--with-gtk} \
+       %{?with_gnome:--with-gnome} \
+       %{?with_glut:--with-glut} \
+       --disable-rpath \
+       --with-lua \
+       --with-xinerama \
+       --with-qt-dir=%{_libdir}
+
 %{__make}
 
 %install
 rm -rf $RPM_BUILD_ROOT
-%{__make} -e DESTDIR=$RPM_BUILD_ROOT install
 
-gzip -9nf README AUTHORS TODO controls.txt
+%{__make} install \
+       DESTDIR=$RPM_BUILD_ROOT \
+       kde_htmldir=%{_kdedocdir} \
+       kde_libs_htmldir=%{_kdedocdir} \
+       appsdir=%{_desktopdir}/kde
+
+# desktop/icon
+install -d $RPM_BUILD_ROOT{%{_desktopdir},%{_pixmapsdir}}
+%{!?with_kde:install src/celestia/kde/data/celestia.desktop $RPM_BUILD_ROOT%{_desktopdir}/%{name}.desktop}
+install src/celestia/kde/data/hi48-app-celestia.png $RPM_BUILD_ROOT%{_pixmapsdir}/celestia.png
+
+%find_lang %{name} --all-name --with-kde
 
 %clean
 rm -rf $RPM_BUILD_ROOT
 
-%files
+%if %{with gnome}
+%post
+%gconf_schema_install celestia.schemas
+
+%preun
+%gconf_schema_uninstall celestia.schemas
+%endif
+
+%files -f %{name}.lang
 %defattr(644,root,root,755)
-%doc *.gz
+%doc README AUTHORS TODO controls.txt ChangeLog
 %attr(755,root,root) %{_bindir}/*
-%{_datadir}/*
+%{_datadir}/celestia
+%{_pixmapsdir}/*
+%if %{with kde}
+%{_datadir}/apps/celestia
+%{_datadir}/config/*
+%{_datadir}/mimelnk/application/*
+%{_datadir}/services/*
+%{_iconsdir}/*/*/apps/%{name}.png
+%{_desktopdir}/kde/*.desktop
+%else
+%{_desktopdir}/*.desktop
+%endif
+%{?with_gnome:%{_sysconfdir}/gconf/schemas/celestia.schemas}
This page took 0.200266 seconds and 4 git commands to generate.