Blob Blame History Raw
%global		_release_date	2017-09-03
%global		_commit0	139ffd9b323ab7e9f9eeae3483a9c2f4eee87fcd
%global		_shortcommit0	%(c=%{_commit0}; echo ${c:0:7})

Name:		freeorion
Version:	0.4.7.1
Release:	1%{?dist}
Summary:	Turn-based space empire and galactic conquest (4X) computer game
Group:		Amusements/Games

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:	cmake
BuildRequires:	python2-devel >= 2.7
BuildRequires:	boost-devel >= 1.47.0
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

Requires:	hicolor-icon-theme
Requires:	dejavu-sans-fonts
Requires:	google-roboto-fonts
Requires:	%{name}-data = %{version}-%{release}

%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


%build
%cmake -DCMAKE_INSTALL_LIBDIR=%{_lib} .
# disable parallel builds on ppc64le
%ifarch ppc64le
%__make -j1
%else
%make_build
%endif

%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


%post
/bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null || :
/sbin/ldconfig

%postun
if [ $1 -eq 0 ] ; then
    /bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null
    /usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
fi
/sbin/ldconfig

%posttrans
/usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :


%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
* 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