diff --git a/emptyepsilon.spec b/emptyepsilon.spec index 7a6bf26..379aea0 100644 --- a/emptyepsilon.spec +++ b/emptyepsilon.spec @@ -25,12 +25,11 @@ Group: Amusements/Games/Other URL: https://daid.github.io/EmptyEpsilon/ Source: EmptyEpsilon-%{version}.tar.gz Source1: SeriousProton-%{version}.tar.gz -Source3: download.sh -Source4: basis_universal.zip -Source5: use_bundled_basis_universal.patch -Source6: meshoptimizer.zip -Source7: use_bundled_meshoptimizer.patch -Source8: fix_unique_ptr_in_namespace_std_does_not_name_a_template_type.patch +Source2: download.sh +Source3: basis_universal.zip +Source5: meshoptimizer.zip +Patch0: use_bundled_basis_universal.patch +Patch1: use_bundled_meshoptimizer.patch BuildRequires: SDL2-devel BuildRequires: bsdtar BuildRequires: cmake @@ -50,40 +49,40 @@ EmptyEpsilon places you in the roles of a spaceship's bridge officers, like thos Each officer fills a unique role: Captain, Helms, Weapons, Relay, Science, and Engineering. Except for the Captain, each officer operates part of the ship through a specialized screen. The Captain relies on their trusty crew to report information and follow orders. %prep -cd $RPM_SOURCE_DIR -tar xf SeriousProton-%{version}.tar.gz -tar xf EmptyEpsilon-%{version}.tar.gz +# extract EE and SP inside the EE dir +%setup -q -a1 -n EmptyEpsilon-EE-%{version} find -name .gitignore | xargs rm -patch -p0 < use_bundled_basis_universal.patch -patch -p0 < use_bundled_meshoptimizer.patch -patch -p0 < fix_unique_ptr_in_namespace_std_does_not_name_a_template_type.patch - -%build +pushd SeriousProton-EE-%{version} +%patch0 -p1 +popd +%patch1 -p1 +# extract bundled dependencies mkdir -p SeriousProton/externals/basis bsdtar xvf $RPM_SOURCE_DIR/basis_universal.zip --strip-components=1 -C SeriousProton/externals/basis mkdir -p externals/meshoptimizer bsdtar xvf $RPM_SOURCE_DIR/meshoptimizer.zip --strip-components=1 -C externals/meshoptimizer + +%build %if 0%{?sle_version:1} # if sle_version is defined, this is not tumbleweed export CC=gcc-10 export CXX=g++-10 %endif -cmake -DSERIOUS_PROTON_DIR="$RPM_SOURCE_DIR/SeriousProton-EE-%{version}" \ +cmake -DSERIOUS_PROTON_DIR="SeriousProton-EE-%{version}" \ -DCMAKE_INSTALL_PREFIX=%{_prefix} \ -DCMAKE_BUILD_TYPE=Release \ -DCPACK_PACKAGE_VERSION_MAJOR="$(echo %{version} | cut -d. -f1)" \ -DCPACK_PACKAGE_VERSION_MINOR="$(echo %{version} | cut -d. -f2)" \ -DCPACK_PACKAGE_VERSION_PATCH="$(echo %{version} | cut -d. -f3)" \ -DOpenGL_GL_PREFERENCE=GLVND \ - $RPM_SOURCE_DIR/EmptyEpsilon-EE-%{version} + . %make_build -j 8 %install %make_install -install -Dvm 644 $RPM_SOURCE_DIR/EmptyEpsilon-EE-%{version}/README.md -t "%{buildroot}%{_datadir}/doc/EmptyEpsilon" %files -# You may have to add additional files here (documentation and binaries mostly) +%doc README.md %{_bindir}/EmptyEpsilon %{_datadir}/doc/EmptyEpsilon/ %{_datadir}/emptyepsilon/ diff --git a/fix_unique_ptr_in_namespace_std_does_not_name_a_template_type.patch b/fix_unique_ptr_in_namespace_std_does_not_name_a_template_type.patch deleted file mode 100644 index c7f47f9..0000000 --- a/fix_unique_ptr_in_namespace_std_does_not_name_a_template_type.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- SeriousProton-EE-2023.06.17/src/io/http/websocket.h 2022-03-15 23:05:53.000000000 +0100 -+++ /var/tmp/build-root/openSUSE_Tumbleweed-x86_64/home/abuild/rpmbuild/SOURCES/SeriousProton-EE-2022.03.16/src/io/http/websocket.h 2022-09-14 17:02:50.866384537 +0200 -@@ -4,6 +4,7 @@ - #include - #include - #include -+#include - - - namespace sp {