mirror of
https://abf.rosa.ru/djam/fheroes2.git
synced 2025-02-23 09:42:53 +00:00
1.0.0
This commit is contained in:
parent
0c12eed7c9
commit
a61d069058
1 changed files with 46 additions and 11 deletions
|
@ -24,7 +24,9 @@ BuildRequires: pkgconfig(SDL2_net)
|
|||
BuildRequires: pkgconfig(SDL2_ttf)
|
||||
BuildRequires: pkgconfig(zlib)
|
||||
BuildRequires: clang
|
||||
BuildRequires: llvm
|
||||
BuildRequires: cmake >= 3.20
|
||||
BuildRequires: stdc++-gcc10-devel
|
||||
|
||||
%description
|
||||
Free implementation of Heroes of the Might and Magic II engine.
|
||||
|
@ -32,9 +34,14 @@ You need to copy files from data and maps directories from original game
|
|||
into your /usr/share/games/fheroes2/{maps,data} directories respectively.
|
||||
|
||||
%files
|
||||
#-f %{name}.lang
|
||||
%doc changelog.txt LICENSE README.md
|
||||
%{_gamesbindir}/*
|
||||
%{_gamesdatadir}/%{name}
|
||||
%{_bindir}/%{name}
|
||||
%{_datadir}/%{name}
|
||||
%{_datadir}/metainfo/%{name}.appdata.xml
|
||||
%{_iconsdir}/hicolor/*/apps/%{name}.png
|
||||
#{_gamesbindir}/*
|
||||
#{_gamesdatadir}/%{name}
|
||||
%{_datadir}/pixmaps/%{name}.png
|
||||
%{_datadir}/applications/%{name}.desktop
|
||||
|
||||
|
@ -44,30 +51,58 @@ into your /usr/share/games/fheroes2/{maps,data} directories respectively.
|
|||
%setup -q
|
||||
|
||||
%build
|
||||
export CC=clang
|
||||
export CXX=clang++
|
||||
export AR=llvm-ar
|
||||
export NM=llvm-nm
|
||||
|
||||
export READELF=readelf
|
||||
export LDFLAGS="-lstdc++-gcc10"
|
||||
|
||||
export CXXFLAGS="$CFLAGS"
|
||||
|
||||
|
||||
|
||||
%setup_compile_flags
|
||||
#cmake
|
||||
%clang_gcc_wrapper
|
||||
|
||||
%cmake
|
||||
%cmake \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DUSE_SDL_VERSION=SDL2 \
|
||||
-DENABLE_IMAGE=ON \
|
||||
-DGET_HOMM2_DEMO=ON \
|
||||
-DCMAKE_C_COMPILER=clang \
|
||||
-DCMAKE_CXX_COMPILER=clang++ \
|
||||
-DCMAKE_CXX_FLAGS="-std=c++17" \
|
||||
-DCMAKE_CXX_FLAGS="-nostdinc++ -I/usr/include/libstdc++-gcc10 -I/usr/include/libstdc++-gcc10/%{_host} -Wc++11-narrowing " \
|
||||
-DCMAKE_C_FLAGS="-nostdinc++ -I/usr/include/libstdc++-gcc10 -I/usr/include/libstdc++-gcc10/%{_host} -Wc++11-narrowing " \
|
||||
-DCMAKE_INSTALL_PREFIX=%{buildroot}%{_prefix}
|
||||
|
||||
|
||||
%make \
|
||||
WITH_AI=simple \
|
||||
WITH_SDL2="ON" \
|
||||
CONFIGURE_FHEROES2_DATA="%{_gamesdatadir}/%{name}/"
|
||||
WITH_SDL2="ON"
|
||||
CONFIGURE_FHEROES2_DATA="%{_datadir}/%{name}/"
|
||||
|
||||
|
||||
%install
|
||||
%makeinstall -C build
|
||||
|
||||
# No automated install:
|
||||
# 1) Create directory structure
|
||||
mkdir -p %{buildroot}%{_gamesbindir}
|
||||
#mkdir -p %{buildroot}%{_gamesbindir}
|
||||
mkdir -p %{buildroot}%{_gamesdatadir}/%{name}/{data,maps}
|
||||
mkdir -p %{buildroot}%{_datadir}/applications
|
||||
mkdir -p %{buildroot}%{_datadir}/pixmaps
|
||||
|
||||
# 2) install what we need where we need it
|
||||
install -pm 755 src/dist/%{name} %{buildroot}%{_gamesbindir}/%{name}.bin
|
||||
install -pm 755 %{SOURCE2} %{buildroot}%{_gamesbindir}/%{name}
|
||||
#install -pm 755 build/%{name} %{buildroot}%{_gamesbindir}/%{name}.bin
|
||||
#install -pm 755 %{SOURCE2} %{buildroot}%{_gamesbindir}/%{name}
|
||||
#install -pm 644 %{name}.key %{buildroot}%{_gamesdatadir}/%{name}/
|
||||
install -pm 644 %{SOURCE3} %{buildroot}%{_datadir}/pixmaps/%{name}.png
|
||||
install -pm 644 src/resources/%{name}.png %{buildroot}%{_datadir}/pixmaps/%{name}.png
|
||||
install -pm 644 %{SOURCE4} %{buildroot}%{_datadir}/applications/%{name}.desktop
|
||||
install -pm 644 %{SOURCE5} %{buildroot}%{_gamesdatadir}/%{name}/
|
||||
#install -pm 644 %{SOURCE5} %{buildroot}%{_gamesdatadir}/%{name}/
|
||||
|
||||
#find_lang %{name}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue