Use cmake macros
OBS-URL: https://build.opensuse.org/package/show/games/emptyepsilon?expand=0&rev=9
This commit is contained in:
parent
51a601466c
commit
d6b8fb5b90
@ -41,7 +41,8 @@ BuildRequires: sfml2-devel
|
||||
BuildRequires: xorg-x11
|
||||
%if 0%{?sle_version:1}
|
||||
# if sle_version is defined, this is not tumbleweed
|
||||
BuildRequires: gcc10 gcc10-c++
|
||||
BuildRequires: gcc10
|
||||
BuildRequires: gcc10-c++
|
||||
%endif
|
||||
|
||||
%description
|
||||
@ -56,30 +57,38 @@ 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
|
||||
|
||||
# symlink dependencies into build dir
|
||||
mkdir -p build
|
||||
pushd build
|
||||
ln -s ../SeriousProton-EE-%{version}
|
||||
ln -s ../SeriousProton
|
||||
ln -s ../externals
|
||||
popd
|
||||
|
||||
%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="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 \
|
||||
.
|
||||
%make_build -j 8
|
||||
-DOpenGL_GL_PREFERENCE=GLVND
|
||||
%cmake_build -j 8
|
||||
|
||||
%install
|
||||
%make_install
|
||||
%cmake_install
|
||||
|
||||
%files
|
||||
%doc README.md
|
||||
|
Loading…
Reference in New Issue
Block a user