7b8443f
# Optimize for build time or performance
4a0a52d
%bcond_without release_build
4a0a52d
4a0a52d
%if %{with release_build}
4a0a52d
%else
40ee67a
%global optflags %{optflags} -O0
4a0a52d
%endif
4a0a52d
4a0a52d
Name:           cataclysm-dda
58a94fe
Version:        0.E.3
58a94fe
Release:        1%{?dist}
4a0a52d
Summary:        Turn-based survival game set in a post-apocalyptic world
4a0a52d
4a0a52d
License:        CC-BY-SA
4a0a52d
URL:            http://cataclysmdda.org
58a94fe
Source0:        https://github.com/CleverRaven/Cataclysm-DDA/archive/0.E-3/%{name}-0.E-3.tar.gz
105785c
Patch0:         cataclysm-dda-gcc11.patch
baff5e1
7b8443f
# Due virtual memory exhausted and build fail
1439499
ExcludeArch:    i686
1439499
4a0a52d
BuildRequires:  astyle
4a0a52d
BuildRequires:  desktop-file-utils
4a0a52d
BuildRequires:  gcc-c++ >= 7
4a0a52d
BuildRequires:  git-core
4a0a52d
BuildRequires:  intltool
4a0a52d
BuildRequires:  libappstream-glib
58a94fe
BuildRequires:  make
58a94fe
4a0a52d
BuildRequires:  pkgconfig(ncurses)
4a0a52d
BuildRequires:  pkgconfig(sdl2)
4a0a52d
BuildRequires:  pkgconfig(SDL2_image)
4a0a52d
BuildRequires:  pkgconfig(SDL2_mixer)
4a0a52d
BuildRequires:  pkgconfig(SDL2_ttf)
53e2dc7
4a0a52d
Requires:       %{name}-data = %{version}-%{release}
53e2dc7
4a0a52d
Recommends:     %{name}-tiles%{?_isa} = %{version}-%{release}
4a0a52d
4a0a52d
%description
4a0a52d
Cataclysm - Dark Days Ahead. A turn-based survival game set in a
4a0a52d
post-apocalyptic world.
4a0a52d
4a0a52d
Roguelike set in a post-apocalyptic world. While some have described it as a
4a0a52d
"zombie game", there is far more to Cataclysm than that. Struggle to survive in
4a0a52d
a harsh, persistent, procedurally generated world. Scavenge the remnants of a
4a0a52d
dead civilization for food, equipment, or, if you are lucky, a vehicle with a
4a0a52d
full tank of gas to get you the hell out of Dodge. Fight to defeat or escape
4a0a52d
from a wide variety of powerful monstrosities, from zombies to giant insects to
4a0a52d
killer robots and things far stranger and deadlier, and against the others like
4a0a52d
yourself, who want what you have...
4a0a52d
4a0a52d
4a0a52d
%package        data
4a0a52d
Summary:        Data files for %{name}
4a0a52d
BuildArch:      noarch
4a0a52d
4a0a52d
Requires:       %{name} = %{version}-%{release}
4a0a52d
4a0a52d
%description    data
4a0a52d
Data files for %{name}.
4a0a52d
4a0a52d
4a0a52d
%package        tiles
4a0a52d
Summary:        %{name} version with gfx and sound
4a0a52d
4a0a52d
Requires:       %{name}-data = %{version}-%{release}
4a0a52d
Requires:       %{name}-tiles-data = %{version}-%{release}
4a0a52d
4a0a52d
%description    tiles
4a0a52d
%{name} version with gfx and sound.
4a0a52d
4a0a52d
4a0a52d
%package        tiles-data
4a0a52d
Summary:        Data files for %{name}-tiles
4a0a52d
BuildArch:      noarch
4a0a52d
4a0a52d
Requires:       %{name}-tiles = %{version}-%{release}
4a0a52d
Requires:       hicolor-icon-theme
58a94fe
# Recommends:     unifont-fonts
baff5e1
7b8443f
# Bundled, hardcoded fonts. Tiles version doesn't work if delete.
4a0a52d
Provides:       bundled(fixedsys)
4a0a52d
Provides:       bundled(square)
4a0a52d
Provides:       bundled(Square-Smallcaps)
4a0a52d
Provides:       bundled(unifont-fonts) = 12.0.01
4a0a52d
4a0a52d
%description    tiles-data
4a0a52d
Data files for %{name}-tiles.
4a0a52d
4a0a52d
4a0a52d
%prep
58a94fe
%autosetup -n Cataclysm-DDA-0.E-3 -p1
4a0a52d
4a0a52d
4a0a52d
%build
3b02cf9
%ifarch armv7hl
58a94fe
# This package is triggering a compiler error on armv7hl when LTO is enabled.
58a94fe
# Disable on armv7hl for now.
58a94fe
# Note: Don't use LTO for builds in COPR due to limited resources. COPR build
58a94fe
# will fail because of LTO.
3b02cf9
%define _lto_cflags %{nil}
3b02cf9
%endif
baff5e1
0101474
%set_build_flags
58a94fe
%make_build \
58a94fe
    PREFIX=%{_prefix} \
58a94fe
    USE_HOME_DIR=1 \
4a0a52d
    %if %{with release_build}
58a94fe
    RELEASE=1 \
58a94fe
    %{nil}
4a0a52d
    %endif
4a0a52d
7b8443f
# Version with gfx and sound
58a94fe
%make_build \
58a94fe
    PREFIX=%{_prefix} \
58a94fe
    SOUND=1 \
58a94fe
    TILES=1 \
58a94fe
    USE_HOME_DIR=1 \
4a0a52d
    %if %{with release_build}
58a94fe
    RELEASE=1 \
58a94fe
    %{nil}
4a0a52d
    %endif
4a0a52d
4a0a52d
4a0a52d
%install
58a94fe
%make_install \
58a94fe
    PREFIX=%{_prefix} \
58a94fe
    USE_HOME_DIR=1 \
4a0a52d
    %if %{with release_build}
58a94fe
    RELEASE=1 \
58a94fe
    %{nil}
4a0a52d
    %endif
4a0a52d
7b8443f
# Version with gfx and sound
58a94fe
%make_install \
58a94fe
    PREFIX=%{_prefix} \
58a94fe
    SOUND=1 \
58a94fe
    TILES=1 \
58a94fe
    USE_HOME_DIR=1 \
4a0a52d
    %if %{with release_build}
58a94fe
    RELEASE=1 \
58a94fe
    %{nil}
4a0a52d
    %endif
4a0a52d
7b8443f
# Install desktop file, icon and appdata manifest
4a0a52d
install -m 0644 -Dp data/xdg/%{name}.desktop        %{buildroot}%{_datadir}/applications/%{name}.desktop
4a0a52d
install -m 0644 -Dp data/xdg/%{name}.svg            %{buildroot}%{_datadir}/icons/hicolor/scalable/apps/%{name}.svg
4a0a52d
install -m 0644 -Dp data/xdg/%{name}.appdata.xml    %{buildroot}%{_metainfodir}/%{name}.appdata.xml
baff5e1
58a94fe
### FIXME: Remove bundled fonts
58a94fe
###   * This for next builds and requires some testing
58a94fe
# rm -r   %{buildroot}%{_datadir}/%{name}/font
38262d3
8b1a4be
rm -r   %{buildroot}%{_datadir}/%{name}/font/terminus.fon \
8b1a4be
        %{buildroot}%{_datadir}/%{name}/LICENSE-OFL-Terminus-Font.txt
baff5e1
7b8443f
# Remove duplicate license file
4a0a52d
rm      %{buildroot}%{_datadir}/%{name}/LICENSE.txt
baff5e1
7b8443f
# Move changelog info in proper location
4a0a52d
rm      %{buildroot}%{_datadir}/%{name}/changelog.txt
4a0a52d
4a0a52d
4a0a52d
%check
4a0a52d
appstream-util validate-relax --nonet %{buildroot}%{_metainfodir}/*.xml
4a0a52d
desktop-file-validate %{buildroot}%{_datadir}/applications/*.desktop
4a0a52d
4a0a52d
4a0a52d
%files
4a0a52d
%license LICENSE.txt
38262d3
%doc doc/* README.md CODE_OF_CONDUCT.md data/changelog.txt
4a0a52d
%{_bindir}/cataclysm
4a0a52d
4a0a52d
%files data
4a0a52d
%{_datadir}/%{name}/cataicon.ico
4a0a52d
%{_datadir}/%{name}/core/
4a0a52d
%{_datadir}/%{name}/credits/
4a0a52d
%{_datadir}/%{name}/json/
4a0a52d
%{_datadir}/%{name}/mods/
4a0a52d
%{_datadir}/%{name}/motd/
4a0a52d
%{_datadir}/%{name}/names/
4a0a52d
%{_datadir}/%{name}/raw/
4a0a52d
%{_datadir}/%{name}/title/
4a0a52d
%dir %{_datadir}/%{name}/
4a0a52d
4a0a52d
%files tiles
4a0a52d
%{_bindir}/cataclysm-tiles
4a0a52d
4a0a52d
%files tiles-data
4a0a52d
%{_datadir}/applications/*.desktop
4a0a52d
%{_datadir}/icons/hicolor/scalable/*/*.svg
4a0a52d
%{_datadir}/%{name}/font/
4a0a52d
%{_datadir}/%{name}/fontdata.json
4a0a52d
%{_datadir}/%{name}/gfx/
8b1a4be
%{_datadir}/%{name}/help/
4a0a52d
%{_datadir}/%{name}/sound/
4a0a52d
%{_metainfodir}/*.xml
4a0a52d
4a0a52d
4a0a52d
%changelog
58a94fe
* Sun Apr 18 2021 Artem Polishchuk <ego.cordatus@gmail.com> - 0.E.3-1
58a94fe
- build(update): 0.E-3
58a94fe
82c602e
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.E.2-9
82c602e
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
82c602e
736217e
* Fri Dec 04 2020 Jeff Law <law@redhat.com> - 0.E.2-8
736217e
- More C++ loop fixes for gcc-11
736217e
9e98062
* Mon Oct 19 2020 Jeff Law <law@redhat.com> - 0.E.2-7
9e98062
- Fix range-loop-construct diagnostic from gcc-11
9e98062
105785c
* Tue Sep 15 2020 Jeff Law <law@redhat.com> - 0.E.2-6
105785c
- Fix uninitialized variable caught by gcc-11.  Fix dynamic casts
105785c
  to avoid gcc-11 diagnostic
105785c
0101474
* Sat Aug 01 2020 Artem Polishchuk <ego.cordatus@gmail.com> - 0.E.2-5
0101474
- Fix Fedora build flags invocation
0101474
1480db8
* Sat Aug 01 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.E.2-4
1480db8
- Second attempt - Rebuilt for
1480db8
  https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
1480db8
3b02cf9
* Tue Jul 28 2020 Jeff Law <law@redhat.com> - 0.E.2-3
3b02cf9
- Disable LTO on armv7hl
3b02cf9
7a6f9d4
* Mon Jul 27 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.E.2-2
7a6f9d4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
7a6f9d4
a54001b
* Wed May 20 2020 Artem Polishchuk <ego.cordatus@gmail.com> - 0.E.2-1
a54001b
- Update to 0.E-2
a54001b
- Disable LTO
a54001b
f5be10c
* Tue Apr 14 2020 Artem Polishchuk <ego.cordatus@gmail.com> - 0.E-1
f5be10c
- Update to 0.E
f5be10c
40ee67a
* Sun Apr 05 2020 Artem Polishchuk <ego.cordatus@gmail.com> - 0.D.10491-1.20200405git0f1e6aa
40ee67a
- Update to 10491
40ee67a
53e2dc7
* Tue Mar 24 2020 Artem Polishchuk <ego.cordatus@gmail.com> - 0.D.10444-1.20200324git5cee241
53e2dc7
- Update to 10444
53e2dc7
baff5e1
* Fri Mar 06 2020 Artem Polishchuk <ego.cordatus@gmail.com> - 0.D.10399-1.20200306git3eee117
baff5e1
- Update to 10399
baff5e1
e9e67aa
* Tue Feb 18 2020 Artem Polishchuk <ego.cordatus@gmail.com> - 0.D.10337-1.20200218git9aa8765
e9e67aa
- Update to 10337
e9e67aa
adf430c
* Fri Feb 07 2020 Artem Polishchuk <ego.cordatus@gmail.com> - 0.D.10304-1.20200207gite7271b0
adf430c
- Update to 10304
adf430c
37ca5ae
* Thu Jan 30 2020 Artem Polishchuk <ego.cordatus@gmail.com> - 0.D.10280-1.20200131gitbab7781
37ca5ae
- Update to 10280
37ca5ae
aebf491
* Tue Jan 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.D.10232-2.20200122gitff0f233
aebf491
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
aebf491
4e1cc20
* Wed Jan 22 2020 Artem Polishchuk <ego.cordatus@gmail.com> - 0.D.10232-1.20200122gitff0f233
4e1cc20
- Update to 10232
4e1cc20
cf88592
* Tue Jan 21 2020 Artem Polishchuk <ego.cordatus@gmail.com> - 0.D.10229-1.20200121git0696252
cf88592
- Update to 10229
cf88592
7b8443f
* Sun Jan 12 2020 Artem Polishchuk <ego.cordatus@gmail.com> - 0.D.10174-1.20200112git00699b2
7b8443f
- Update to 10174
7b8443f
1439499
* Sun Dec 22 2019 Artem Polishchuk <ego.cordatus@gmail.com> - 0.D.10053-1.20191222git8761541
1439499
- Update to 10053
1439499
- Exclude i686 arch
1439499
7fa1012
* Sat Dec 21 2019 Artem Polishchuk <ego.cordatus@gmail.com> - 0.D.10047-1.20191221git1e8f27e
7fa1012
- Update to 10047
7fa1012
38262d3
* Sat Dec 21 2019 Artem Polishchuk <ego.cordatus@gmail.com> - 0.D.10045-1.20191128git8d27979
38262d3
- Update to 10045
38262d3
4a0a52d
* Tue Dec 10 2019 Artem Polishchuk <ego.cordatus@gmail.com> - 0.D.9984-1.20191128git8d27979
4a0a52d
- Update to 9984
4a0a52d
4a0a52d
* Thu Nov 28 2019 Artem Polishchuk <ego.cordatus@gmail.com> - 0.0.9940-1.20191128git8d27979
4a0a52d
- Update to 9940
4a0a52d
4a0a52d
* Sun Nov 24 2019 Artem Polishchuk <ego.cordatus@gmail.com> - 0.0.9926-1.20191124git1a06c34
4a0a52d
- Update to 9926
4a0a52d
4a0a52d
* Wed Nov 13 2019 Artem Polishchuk <ego.cordatus@gmail.com> - 0.0.9893-1.20191031git15bd2e1
4a0a52d
- Update to 9893
4a0a52d
4a0a52d
* Sat Nov 02 2019 Artem Polishchuk <ego.cordatus@gmail.com> - 0.0.9853-1.20191031git15bd2e1
4a0a52d
- Update to 9853
4a0a52d
4a0a52d
* Thu Oct 31 2019 Artem Polishchuk <ego.cordatus@gmail.com> - 0.0.9842-1.20191031git15bd2e1
4a0a52d
- Update to 9842
4a0a52d
- Spec file fixes
4a0a52d
4a0a52d
* Tue Oct 29 2019 Artem Polishchuk <ego.cordatus@gmail.com> - 0.0.9822-2.20191029git5c100d7
4a0a52d
- Update to 9822
4a0a52d
4a0a52d
* Thu Oct 24 2019 Artem Polishchuk <ego.cordatus@gmail.com> - 0.0.9799-1.20191024git923c311
4a0a52d
- Initial package