File unnamed-sdvx-clone-git.spec of Package unnamed-sdvx-clone

#
# spec file for package unnamed-sdvx-clone-git
#
# Copyright (c) 2024 SUSE LLC and Maddie Mewmews
#
# 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 https://bugs.opensuse.org/
#

Name:           unnamed-sdvx-clone
Version:        0.6.0
Release:        0
Summary:        A game based on K-Shoot MANIA and Sound Voltex
License:        MIT
URL:            https://github.com/Drewol/unnamed-sdvx-clone
Source0:        unnamed-sdvx-clone-%version.tar.zst
Source1:        unnamed-sdvx-clone.desktop
Source2:        uscdm.png
Source3:        usc-game.sh
Patch1:         usc-game-reproduce.patch
BuildRequires:  update-desktop-files
BuildRequires:  freetype2-devel
BuildRequires:  pkgconfig(ogg)
BuildRequires:  cmake
BuildRequires:  hicolor-icon-theme
BuildRequires:  pkgconfig(vorbis)
BuildRequires:  libgit2-devel
BuildRequires:  libgit2-glib-devel
BuildRequires:  git
BuildRequires:  pkgconfig(SDL2_image)
BuildRequires:  pkgconfig(SDL2_mixer)
BuildRequires:  pkgconfig(SDL2_net)
BuildRequires:  pkgconfig(sdl2)
BuildRequires:  pkgconfig(zlib)
BuildRequires:  pkgconfig(libcurl)
BuildRequires:  pkgconfig(libpng)
BuildRequires:  pkgconfig(libjpeg)
BuildRequires:  pkgconfig(glew)
BuildRequires:  pkgconfig(glx)
BuildRequires:  pkgconfig(opengl)
BuildRequires:  pkgconfig(gl)
BuildRequires:  pkgconfig(sqlite3)
BuildRequires:  libarchive-devel
BuildRequires:  rapidjson-devel
BuildRequires:  cpr-devel
BuildRequires:  discord-rpc-devel
BuildRequires:  Mesa-devel
BuildRequires:  clang-devel
BuildRequires:  llvm-polly
BuildRequires:  ninja
BuildRequires:  llvm-polly-devel
BuildRequires:  lld
BuildRequires:  pkgconfig(openssl)
ExclusiveArch:  x86_64 x86_64_v3 aarch64

%description
A game based on K-Shoot MANIA and Sound Voltex.

%prep
%autosetup -n unnamed-sdvx-clone-%version -p2

%build
export CC=clang
export CCX=clang++
export CXX=clang++
#export LD=lld
cmake -DCMAKE_BUILD_TYPE=Release -DUSE_SYSTEM_CPR=ON -DCMAKE_C_FLAGS='-O3 -march=x86-64-v3 -Xclang -load -Xclang LLVMPolly.so -lgomp -mllvm -polly -mllvm -polly-parallel -mllvm -polly-omp-backend=LLVM -mllvm -polly-vectorizer=stripmine -lgomp -DGIT_BRANCH=\"develop\" -DGIT_COMMIT=\"2024-02-25_f264d380\" -Wno-unused-command-line-argument -Wno-inconsistent-missing-override -Wno-macro-redefined' -DCMAKE_CXX_FLAGS='-O3 -march=x86-64-v3 -Xclang -load -Xclang LLVMPolly.so -lgomp -mllvm -polly -mllvm -polly-parallel -mllvm -polly-omp-backend=LLVM -mllvm -polly-vectorizer=stripmine -lgomp -DGIT_BRANCH=\"develop\" -DGIT_COMMIT=\"2024-02-25_f264d380\" -Wno-unused-command-line-argument -Wno-inconsistent-missing-override -Wno-macro-redefined' -G Ninja
ninja -v

%install
DESTDIR=%{buildroot}%{_datadir} ninja install
# Install
mkdir -p %{buildroot}%{_datadir}/icons/hicolor/128x128/apps/
mkdir -p %{buildroot}%{_bindir}

#cp -dr "%{buildroot}/unnamed-sdvx-clone" "%{buildroot}%{_datadir}/"
#cp -dr "%{buildroot}/usr/local/lib64" "%{buildroot}/opt/unnamed-sdvx-clone/"
mv "%{buildroot}%{_datadir}/usr/local/bin/usc-game" "%{buildroot}%{_datadir}/unnamed-sdvx-clone/usc-game"
install -Dm0777 %{SOURCE3} %{buildroot}%{_bindir}/usc-game
#chmod -R 777 "%{buildroot}%{_datadir}/unnamed-sdvx-clone"
install -Dm0644 %{SOURCE2} %{buildroot}%{_datadir}/icons/hicolor/128x128/apps/usc-game.png
desktop-file-install --dir %{buildroot}%{_datadir}/applications %{SOURCE1}
rm -rf %{buildroot}/usr/local
#rm -rf %{buildroot}/unnamed-sdvx-clone
%files
%{_bindir}/usc-game
%{_datadir}/applications/unnamed-sdvx-clone.desktop
%{_datadir}/unnamed-sdvx-clone
%{_datadir}/unnamed-sdvx-clone/*
%{_datadir}/icons/hicolor/128x128/apps/usc-game.png


%changelog

openSUSE Build Service is sponsored by