Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:munix9
celestia
celestia.spec
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File celestia.spec of Package celestia
# # spec file for package celestia # # copyright (c) 2024 munix9@googlemail.com # %define _cspc 711ffdb91865c48018ba2efef963ed645ed2557b %define _desc Celestia is a free 3D astronomy program. Based on the Hipparcos\ Catalogue, it allows users to display objects ranging in scale from\ artificial satellites to entire galaxies in three dimensions using\ OpenGL. Unlike most planetarium software, the user is free to travel\ about the Universe. Name: celestia Version: 1.6.4 Release: 0 Summary: Real-time visual space simulation License: GPL-2.0-or-later AND CC-BY-SA-4.0 URL: https://celestiaproject.space/ #Source0: https://github.com/CelestiaProject/Celestia/archive/%%{version}/Celestia-%%{version}.tar.gz #Source0: https://github.com/CelestiaProject/Celestia/releases/download/%%{version}/%%{name}-%%{version}.tar.xz Source0: %{name}-%{version}.tar.gz Source2: space.%{name}project.%{name}_gtk.metainfo.xml Source3: x-%{name}-script.xml Source10: %{name}.rpmlintrc Source20: README-LEGAL.JPL Source21: README-LEGAL.ScottHudsonModels Source22: README-LEGAL.ShroxModels Source50: https://github.com/OpenSpace/Spice/archive/%{_cspc}/Spice-%{_cspc}.tar.gz Source51: diff-spice-call-to-mktemp.patch Patch0: fix-configure-lua.patch Patch1: fix-celestia_cfg.patch Patch2: fix-appimage_dir.patch Patch3: fix-desktop-file.patch Patch4: fix-copyright-date.patch BuildRequires: autoconf BuildRequires: automake BuildRequires: cmake BuildRequires: fdupes BuildRequires: gettext-tools BuildRequires: libtool BuildRequires: pkgconfig BuildRequires: pkgconfig(cairo) BuildRequires: pkgconfig(fmt) BuildRequires: pkgconfig(glew) BuildRequires: pkgconfig(glu) BuildRequires: pkgconfig(gtk+-2.0) BuildRequires: pkgconfig(gtkglext-1.0) BuildRequires: pkgconfig(libjpeg) BuildRequires: pkgconfig(libpng) BuildRequires: pkgconfig(luajit) BuildRequires: pkgconfig(theora) BuildRequires: pkgconfig(zlib) Requires: %{name}-common = %{version} Requires: %{name}-data = %{version} Requires: %{name}-ui = %{version} Recommends: %{name}-gtk = %{version} Suggests: %{name}-tools = %{version} %if 0%{?suse_version} < 1600 BuildRequires: gcc10-PIE BuildRequires: gcc10-c++ %else BuildRequires: gcc-c++ %endif %description %{_desc} This is a dummy package that selects at least one frontend for Celestia. %package common Summary: Real-time visual space simulation Requires: %{name} = %{version} Obsoletes: %{name}-doc < %{version}-%{release} Provides: %{name}-doc = %{version}-%{release} Obsoletes: %{name}-lang < %{version}-%{release} Provides: %{name}-lang = %{version}-%{release} BuildArch: noarch %description common %{_desc} This package contains the files common for all Celestia frontends. %package data Summary: Real-time visual space simulation Requires: %{name} = %{version} Provides: %{name}-data-bin = %{version} Obsoletes: %{name}-data-bin < %{version} Provides: %{name}-data-common = %{version} Obsoletes: %{name}-data-common < %{version} BuildArch: noarch %description data %{_desc} This package contains the data files for Celestia. %package glut Summary: Real-time visual space simulation (GLUT frontend) BuildRequires: pkgconfig BuildRequires: pkgconfig(glut) BuildRequires: pkgconfig(xi) BuildRequires: pkgconfig(xmu) Requires: %{name} = %{version} Provides: %{name}-ui = %{version} %description glut %{_desc} This package contains a minimal frontend for Celestia. %package gtk Summary: Real-time visual space simulation (GTK frontend) Requires: %{name} = %{version} Provides: %{name}-ui = %{version} %description gtk %{_desc} This package contains the GTK frontend for Celestia. %package tools Summary: Real-time visual space simulation Suggests: %{name} = %{version} %description tools %{_desc} This package contains tools for Celestia. %prep %autosetup -p1 # cspice rm -rf thirdparty/Spice mkdir -p thirdparty/Spice tar -xf %{SOURCE50} --strip-components=1 -C thirdparty/Spice patch -p1 -i %{SOURCE51} # fix wrong-file-end-of-line-encoding sed -i 's/\r$//' README help/CelestiaGuide.html # fix/hack 'celestia.mo differs at offset' (for now) mkdir -p $PWD/.bin ln -sf %{_bindir}/true $PWD/.bin/msgmerge cp -p %{SOURCE20} %{SOURCE21} %{SOURCE22} . %build export PATH=$PWD/.bin:$PATH %if 0%{?suse_version} < 1600 export CC="gcc-10" export CXX="g++-10" %endif # cspice pushd thirdparty/Spice _spc="$PWD" %cmake -DSPICE_BUILD_SHARED_LIBRARY=OFF %cmake_build popd export SPICE_CFLAGS="-DUSE_SPICE -I${_spc}/include/linux -I${_spc}/include" export SPICE_LIBS="${_spc}/build/libspice.a" export CFLAGS="%{optflags} $SPICE_CFLAGS -std=gnu++11" export CXXFLAGS="$CFLAGS" autoreconf -fiv _list="$(ls | grep -vE '^build-|^macosx$|^thirdparty$|^windows$')" for _flavor in glut gtk do rm -rf build-$_flavor mkdir -p build-$_flavor for _tmp in $_list; do cp -ldpR $_tmp build-$_flavor; done pushd build-$_flavor test "$_flavor" = "gtk" && _gtk_args="--enable-cairo --enable-theora" %configure --disable-rpath $_gtk_args --with-$_flavor --with-lua --without-arts %make_build popd done %install # glut pushd build-glut/src/celestia/ GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL=yes %make_install popd mv %{buildroot}%{_bindir}/{%{name},%{name}-glut} install -D -m 0644 src/%{name}/gtk/data/%{name}.desktop \ %{buildroot}%{_datadir}/applications/%{name}-glut.desktop install -D -m 0644 %{SOURCE2} \ %{buildroot}%{_datadir}/metainfo/space.%{name}project.%{name}_glut.metainfo.xml sed -e 's/gtk/glut/g;s/GTK/GLUT/g' \ -i %{buildroot}%{_datadir}/applications/%{name}-glut.desktop \ %{buildroot}%{_datadir}/metainfo/space.%{name}project.%{name}_glut.metainfo.xml # gtk pushd build-gtk GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL=yes %make_install popd mv %{buildroot}%{_bindir}/{%{name},%{name}-gtk} mv %{buildroot}%{_datadir}/applications/{%{name},%{name}-gtk}.desktop install -D -m 0644 -t %{buildroot}%{_datadir}/metainfo %{SOURCE2} sed -e 's/^\(Categories=.*\)/\1GTK;/' \ -i %{buildroot}%{_datadir}/applications/%{name}-gtk.desktop # mime install -D -m 0644 -t %{buildroot}%{_datadir}/mime/packages %{SOURCE3} # move celestia.cfg to /etc/ install -D -m 0644 -t %{buildroot}%{_sysconfdir} %{buildroot}%{_datadir}/%{name}/%{name}.cfg ln -sf %{_sysconfdir}/%{name}.cfg %{buildroot}%{_datadir}/%{name}/ # tools install -m 0755 -t %{buildroot}%{_bindir} build-gtk/src/buildstardb src/tools/xyzv2bin/xyzv2bin.pl # help cp -a help %{buildroot}%{_datadir}/%{name} %find_lang %{name} --all-name %fdupes -s %{buildroot}%{_datadir} %files %license COPYING README-LEGAL.{JPL,ScottHudsonModels,ShroxModels} %doc AUTHORS README TRANSLATORS ChangeLog %dir %{_datadir}/%{name} %files common -f %{name}.lang %{_datadir}/%{name}/%{name}.cfg %{_datadir}/%{name}/%{name}-logo.png %{_datadir}/%{name}/COPYING* %{_datadir}/%{name}/controls*.txt %{_datadir}/%{name}/demo*.cel %{_datadir}/%{name}/fonts %{_datadir}/%{name}/guide*.cel %{_datadir}/%{name}/help %{_datadir}/%{name}/scripts %{_datadir}/%{name}/shaders %{_datadir}/%{name}/splash %{_datadir}/%{name}/start*.cel %{_datadir}/mime/packages/x-%{name}-script.xml %{_datadir}/pixmaps/%{name}.png %config(noreplace) %{_sysconfdir}/%{name}.cfg %files data %license COPYING README-LEGAL.{JPL,ScottHudsonModels,ShroxModels} %{_datadir}/%{name}/data %{_datadir}/%{name}/extras %{_datadir}/%{name}/extras-standard %{_datadir}/%{name}/models %{_datadir}/%{name}/textures %files glut %{_bindir}/%{name}-glut %{_datadir}/applications/%{name}-glut.desktop %{_datadir}/metainfo/space.%{name}project.%{name}_glut.metainfo.xml %files gtk %{_bindir}/%{name}-gtk %{_datadir}/%{name}/%{name}ui.xml %{_datadir}/applications/%{name}-gtk.desktop %{_datadir}/metainfo/space.%{name}project.%{name}_gtk.metainfo.xml %files tools %license COPYING %{_bindir}/buildstardb %{_bindir}/xyzv2bin.pl %changelog
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor