%global _release_date 2018-08-23
%global _commit0 26f16b0597251d358f8757d6bdc85f6c731930cf
%global _shortcommit0 %(c=%{_commit0}; echo ${c:0:7})
# we have some memory limits on the build-system
%ifarch armv7hl
%global _smp_mflags -j1
%global __global_compiler_flags %__global_compiler_flags -g1
%endif
Name: freeorion
Version: 0.4.8
Release: 7%{?dist}
Summary: Turn-based space empire and galactic conquest (4X) computer game
License: GPLv2 and LGPLv2+
URL: http://freeorion.org
Source0: https://github.com/freeorion/freeorion/releases/download/v%{version}/FreeOrion_v%{version}_%{_release_date}.%{_shortcommit0}_Source.tar.gz
Source1: freeorion.appdata.xml
BuildRequires: gcc-c++
BuildRequires: cmake
BuildRequires: python2-devel >= 2.7
BuildRequires: boost-devel >= 1.47.0
BuildRequires: boost-python2-devel
BuildRequires: mesa-libGL-devel
BuildRequires: freetype-devel
BuildRequires: mesa-libGLU-devel
BuildRequires: SDL2-devel
BuildRequires: glew-devel
BuildRequires: openal-soft-devel
BuildRequires: libogg-devel
BuildRequires: libvorbis-devel
BuildRequires: desktop-file-utils
BuildRequires: libappstream-glib
BuildRequires: doxygen
BuildRequires: graphviz
BuildRequires: cppcheck
BuildRequires: python2-pycodestyle
Requires: hicolor-icon-theme
Requires: dejavu-sans-fonts
Requires: google-roboto-fonts
Requires: %{name}-data = %{version}-%{release}
%if 0%{?fedora} >= 30
Patch1: freeorion-remove_boost_signals.patch
Patch2: freeorion-remove_boost_signals2.patch
%endif
Patch3: freeorion-3e840f8-fix-LoadSaveGamePreviewData.patch
%description
FreeOrion, an open-source game inspired by Master of Orion, is a turn-based game
of epic space strategy that builds on the classic '4X' model by incorporating
the nation-building elements of games such as Europa Universalis 2 and a
versatile tactical combat engine. While its modular, open-source design allows
for a significant degree of customization of the game engine and the story
elements by the community, the FreeOrion team is dedicated to the construction
of a living, breathing universe in a 'grand campaign' model.
%package data
Summary: Game data for %{name}
License: CC-BY-SA
BuildArch: noarch
%description data
Images, sound and game data for %{name}.
%prep
%autosetup -n src-tarball -p1
%build
# https://bugzilla.redhat.com/show_bug.cgi?id=1491093
# switch to -std=gnu++11 for vector handling
%ifarch ppc64le
sed -i 's/CMAKE_CXX_EXTENSIONS OFF/CMAKE_CXX_EXTENSIONS ON/' CMakeLists.txt
sed -i 's/CMAKE_CXX_EXTENSIONS OFF/CMAKE_CXX_EXTENSIONS ON/' GG/CMakeLists.txt
%endif
%cmake -DCMAKE_INSTALL_LIBDIR=%{_lib} .
%make_build
%install
%make_install
install -m644 -D %SOURCE1 %{buildroot}%{_datadir}/appdata/%{name}.appdata.xml
rm -rf %{buildroot}%{_datadir}/%{name}/default/python/tests
rm -rf %{buildroot}%{_datadir}/%{name}/default/data/fonts/*
ln -s %{_datadir}/fonts/google-roboto/Roboto-{Regular,Bold}.ttf %{buildroot}%{_datadir}/%{name}/default/data/fonts/
ln -s %{_datadir}/fonts/dejavu/DejaVuSans{,-Bold}.ttf %{buildroot}%{_datadir}/%{name}/default/data/fonts/
mv GG/COPYING GG/COPYING.libgigi
%check
ctest -V %{?_smp_mflags} .
appstream-util validate-relax --nonet %{buildroot}%{_datadir}/appdata/%{name}.appdata.xml
desktop-file-validate %{name}.desktop
%ldconfig_scriptlets
%files
%license default/COPYING GG/COPYING.libgigi
%doc README.md ChangeLog.md
%{_bindir}/%{name}
%{_bindir}/%{name}{ca,d}
%{_libdir}/%{name}
%{_datadir}/applications/*.desktop
%{_datadir}/appdata/%{name}.appdata.xml
%{_datadir}/icons/hicolor/*/apps/%{name}.png
%files data
%license default/COPYING
%{_datadir}/%{name}
%changelog
* Mon Jun 24 2019 Link Dupont <linkdupont@fedoraproject.org> - 0.4.8-7
- fix load save game crash (RHBZ#1665748)
* Mon Feb 11 2019 josef radinger <cheese@nosuchhost.net> - 0.4.8-6
- fix FTBFS on fc30
- add BuildRequires on doxygen + dot
- add BuildRequires on cppcheck
- add BuildRequires on python2-pycodestyle
- add Patch1+2 for building with boost 1.69
* Thu Jan 31 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.4.8-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
* Fri Nov 09 2018 josef radinger <cheese@nosuchhost.net> - 0.4.8-4
- modify __global_compiler_flags on armv7hl
* Fri Nov 09 2018 josef radinger <cheese@nosuchhost.net> - 0.4.8-3
- fix typo
* Fri Nov 09 2018 josef radinger <cheese@nosuchhost.net> - 0.4.8-2
- fix build for armv7hl by using make -j1
* Mon Oct 08 2018 josef radinger <cheese@nosuchhost.net> - 0.4.8-1
- bump version
- remove patch1
- remove patch2
- remove patch3
* Thu Aug 23 2018 Nicolas Chauvet <kwizart@gmail.com> - 0.4.7.1-12
- Rebuilt for glew 2.1.0
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.4.7.1-11
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
* Sat Jun 30 2018 Link Dupont <linkdupont@fedoraproject.org> - 0.4.7.1-10
- Patch to fix crash during save game save/load
* Wed Jun 27 2018 Link Dupont <linkdupont@fedoraproject.org> - 0.4.7.1-9.1
- Patch set to fix assertion crashes (RHBZ#1575292)
* Tue May 01 2018 Jonathan Wakely <jwakely@redhat.com> - 0.4.7.1-9
- Add BuildRequires: boost-python2-devel to fix build with boost-1.66.0-7.fc29
* Wed Mar 07 2018 Adam Williamson <awilliam@redhat.com> - 0.4.7.1-8
- Rebuild to fix GCC 8 mis-compilation
See https://da.gd/YJVwk ("GCC 8 ABI change on x86_64")
* Sun Feb 18 2018 Link Dupont <linkdupont@fedoraproject.org> - 0.4.7.1-7
- Add missing build dependency on gcc-c++
* Sun Feb 18 2018 josef radinger <cheese@nosuchhost.net> - 0.4.7.1-6
- Rebuild for new boost (add fix_boost166.patch)
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.4.7.1-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
* Wed Jan 31 2018 josef radinger <cheese@nosuchhost.net> - 0.4.7.1-4
- Rebuild for new boost
* Thu Jan 11 2018 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 0.4.7.1-3
- Remove obsolete scriptlets
* Wed Sep 13 2017 Dan HorĂ¡k <dan[at]danny.cz> - 0.4.7.1-2
- fix build on ppc64le (#1491093)
* Tue Sep 12 2017 Link Dupont <linkdupont@fedoraproject.org> - 0.4.7.1-1
- New upstream release
* Wed Aug 02 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.4.7-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.4.7-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
* Wed Jul 19 2017 Jonathan Wakely <jwakely@redhat.com> - 0.4.7-4
- Rebuilt for s390x binutils bug
* Tue Jul 18 2017 Jonathan Wakely <jwakely@redhat.com> - 0.4.7-3
- Rebuilt for Boost 1.64
* Mon May 15 2017 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.4.7-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_27_Mass_Rebuild
* Tue May 2 2017 Link Dupont <linkdupont@fedoraproject.org> - 0.4.7-1
- New upstream release
* Thu Feb 23 2017 josef radinger <cheese@nosuchhost.net> - 0.4.6-8
- rebuild for boost-update
- add boost1.62.patch
- add fix_boost163.patch
* Fri Feb 3 2017 Link Dupont <linkdupont@fedoraproject.org> - 0.4.6-7
- Use upstream's fix for #1416197
* Thu Feb 2 2017 Link Dupont <linkdupont@fedoraproject.org> - 0.4.6-6
- Patch to fix crash during MultiMeterStatusBar render (RHBZ#1416197)
* Tue Jan 10 2017 Orion Poplawski <orion@cora.nwra.com> - 0.4.6-6
- Rebuild for glew 2.0.0
* Mon Dec 5 2016 Link Dupont <linkdupont@fedoraproject.org> - 0.4.6-5
- Fix license naming conflict
* Mon Nov 21 2016 Link Dupont <linkdupont@fedoraproject.org> - 0.4.6-4
- Replace fonts with symlinks to system font paths
* Sun Nov 20 2016 Link Dupont <linkdupont@fedoraproject.org> - 0.4.6-3
- Unbundled fonts
- Fixed license identifiers
- Fixed dependencies
* Thu Nov 3 2016 Link Dupont <linkdupont@fedoraproject.org> - 0.4.6-2
- Change build parameters for ppc64le architecture
* Wed Oct 19 2016 Link Dupont <linkdupont@fedoraproject.org> - 0.4.6-1
- Initial package