fheroes2/fheroes2.spec

74 lines
2.2 KiB
RPMSpec
Raw Normal View History

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
Name: fheroes2
Epoch: 1
2022-09-12 09:55:37 +03:00
Version: 0.9.19
Release: 1
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
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)
BuildRequires: pkgconfig(sdl2)
BuildRequires: pkgconfig(SDL2_image)
BuildRequires: pkgconfig(SDL2_mixer)
BuildRequires: pkgconfig(SDL2_net)
BuildRequires: pkgconfig(SDL2_ttf)
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
into your /usr/share/games/fheroes2/{maps,data} directories respectively.
%files
%doc changelog.txt LICENSE README.md
%{_gamesbindir}/*
%{_gamesdatadir}/%{name}
%{_datadir}/pixmaps/%{name}.png
%{_datadir}/applications/%{name}.desktop
#----------------------------------------------------------------------------
2012-02-02 02:15:30 +04:00
%prep
%setup -q
2012-02-02 02:15:30 +04:00
%build
%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
2012-02-02 02:15:30 +04:00
%install
# No automated install:
# 1) Create directory structure
2012-10-24 20:31:19 +11:00
mkdir -p %{buildroot}%{_gamesbindir}
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
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