2022-06-12 19:26:58 +03:00
|
|
|
%global optflags %(echo %{optflags} | sed -e 's/-ffat-lto-objects//g' -e 's/-fvar-tracking-assignments//g')
|
|
|
|
|
|
|
|
|
2012-02-02 02:15:30 +04:00
|
|
|
Summary: Free implementation of Heroes of the Might and Magic II engine
|
2015-05-29 02:14:03 +10:00
|
|
|
Name: fheroes2
|
2021-04-15 17:10:42 +02:00
|
|
|
Epoch: 1
|
2022-09-12 09:55:37 +03:00
|
|
|
Version: 0.9.19
|
2021-04-15 17:10:42 +02:00
|
|
|
Release: 1
|
2015-05-29 02:14:03 +10:00
|
|
|
License: GPLv2+
|
2012-02-02 02:15:30 +04:00
|
|
|
Group: Games/Strategy
|
2022-04-09 22:48:35 +03:00
|
|
|
URL: https://ihhub.github.io/fheroes2/
|
2021-06-13 15:23:01 +03:00
|
|
|
Source0: https://github.com/ihhub/fheroes2/archive/refs/tags/%{version}.tar.gz?/%{name}-%{version}.tar.gz
|
2022-04-09 22:48:35 +03:00
|
|
|
Source1000: %{name}.rpmlintrc
|
2015-05-29 02:14:03 +10:00
|
|
|
Source2: fheroes2.sh
|
|
|
|
Source3: fheroes2.png
|
|
|
|
Source4: fheroes2.desktop
|
|
|
|
Source5: fheroes2.cfg
|
2012-10-24 20:31:19 +11:00
|
|
|
BuildRequires: pkgconfig(freetype2)
|
|
|
|
BuildRequires: pkgconfig(libpng)
|
2021-04-15 17:10:42 +02:00
|
|
|
BuildRequires: pkgconfig(sdl2)
|
|
|
|
BuildRequires: pkgconfig(SDL2_image)
|
|
|
|
BuildRequires: pkgconfig(SDL2_mixer)
|
|
|
|
BuildRequires: pkgconfig(SDL2_net)
|
|
|
|
BuildRequires: pkgconfig(SDL2_ttf)
|
2015-05-29 02:14:03 +10:00
|
|
|
BuildRequires: pkgconfig(zlib)
|
2022-05-11 22:26:39 +03:00
|
|
|
BuildRequires: clang
|
2022-07-12 09:52:58 +03:00
|
|
|
BuildRequires: cmake >= 3.20
|
2012-02-02 02:15:30 +04:00
|
|
|
|
|
|
|
%description
|
|
|
|
Free implementation of Heroes of the Might and Magic II engine.
|
|
|
|
You need to copy files from data and maps directories from original game
|
2015-05-29 02:14:03 +10:00
|
|
|
into your /usr/share/games/fheroes2/{maps,data} directories respectively.
|
|
|
|
|
|
|
|
%files
|
2021-04-15 17:10:42 +02:00
|
|
|
%doc changelog.txt LICENSE README.md
|
2015-05-29 02:14:03 +10:00
|
|
|
%{_gamesbindir}/*
|
2021-04-15 17:10:42 +02:00
|
|
|
%{_gamesdatadir}/%{name}
|
2015-05-29 02:14:03 +10:00
|
|
|
%{_datadir}/pixmaps/%{name}.png
|
|
|
|
%{_datadir}/applications/%{name}.desktop
|
|
|
|
|
|
|
|
#----------------------------------------------------------------------------
|
2012-02-02 02:15:30 +04:00
|
|
|
|
|
|
|
%prep
|
2021-04-15 17:10:42 +02:00
|
|
|
%setup -q
|
|
|
|
|
2012-02-02 02:15:30 +04:00
|
|
|
%build
|
2015-05-29 02:14:03 +10:00
|
|
|
%setup_compile_flags
|
2022-05-11 22:26:39 +03:00
|
|
|
#cmake
|
|
|
|
export CXX=clang++
|
|
|
|
export CC=clang
|
2022-07-12 09:52:58 +03:00
|
|
|
%cmake
|
|
|
|
#make \
|
|
|
|
# WITH_AI=simple \
|
|
|
|
# WITH_SDL2="ON" \
|
|
|
|
# CONFIGURE_FHEROES2_DATA="%{_gamesdatadir}/%{name}/"
|
2012-02-02 02:15:30 +04:00
|
|
|
|
2021-04-15 17:10:42 +02:00
|
|
|
|
2012-02-02 02:15:30 +04:00
|
|
|
%install
|
2021-04-15 17:10:42 +02:00
|
|
|
# No automated install:
|
|
|
|
# 1) Create directory structure
|
2012-10-24 20:31:19 +11:00
|
|
|
mkdir -p %{buildroot}%{_gamesbindir}
|
2021-04-15 17:10:42 +02:00
|
|
|
mkdir -p %{buildroot}%{_gamesdatadir}/%{name}/{data,maps}
|
2012-10-24 20:31:19 +11:00
|
|
|
mkdir -p %{buildroot}%{_datadir}/applications
|
|
|
|
mkdir -p %{buildroot}%{_datadir}/pixmaps
|
2012-02-02 02:15:30 +04:00
|
|
|
|
2021-05-20 14:49:09 +02:00
|
|
|
# 2) install what we need where we need it
|
2021-04-15 17:10:42 +02:00
|
|
|
install -pm 755 src/dist/%{name} %{buildroot}%{_gamesbindir}/%{name}.bin
|
|
|
|
install -pm 755 %{SOURCE2} %{buildroot}%{_gamesbindir}/%{name}
|
2022-05-11 22:26:39 +03:00
|
|
|
#install -pm 644 %{name}.key %{buildroot}%{_gamesdatadir}/%{name}/
|
2012-10-24 20:31:19 +11:00
|
|
|
install -pm 644 %{SOURCE3} %{buildroot}%{_datadir}/pixmaps/%{name}.png
|
|
|
|
install -pm 644 %{SOURCE4} %{buildroot}%{_datadir}/applications/%{name}.desktop
|
|
|
|
install -pm 644 %{SOURCE5} %{buildroot}%{_gamesdatadir}/%{name}/
|
2012-08-02 19:04:47 +00:00
|
|
|
|