Name: FreeOrion Version: 0.3.13 %define revision r3353 Release: 1.%{revision}%{?dist} Summary: A free, open source, turn-based space empire and galactic conquest (4X) game Group: Amusements/Games License: GPLv2 and CC-BY-SA URL: http://www.freeorion.org/ # wget -O FreeOrion-0.3.13.r3353.tar.gz "http://freeorion.svn.sourceforge.net/viewvc/freeorion/trunk/FreeOrion.tar.gz?view=tar&pathrev=3353" Source0: %{name}-%{version}.%{revision}.tar.gz # The file is part of newer OGRE, let's provide own version for now Source1: FindOGRE.cmake BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: bullet-devel BuildRequires: desktop-file-utils BuildRequires: freealut-devel BuildRequires: GiGi-devel BuildRequires: graphviz-devel # we use convert to create .png icons BuildRequires: ImageMagick BuildRequires: libogg-devel BuildRequires: libvorbis-devel BuildRequires: python-devel Requires: dejavu-sans-fonts Requires: ogre-cg Requires: opengl-games-utils # ugly workaround to Fedora bug #573672 Requires: GiGi-devel %description FreeOrion is a free, open source, turn-based space empire and galactic conquest (4X) computer game being designed and built by the FreeOrion project. FreeOrion is inspired by the tradition of the Master of Orion games, but is not a clone or remake of that series or any other game. %prep %setup -q -n FreeOrion cp %{SOURCE1} cmake # fix installed files and paths cat <("UI.font")).file_string(); } -std::string ClientUI::BoldFont() { return (GetResourceDir() / GetOptionsDB().Get("UI.font-bold")).file_string(); } -std::string ClientUI::TitleFont() { return (GetResourceDir() / GetOptionsDB().Get("UI.title-font")).file_string(); } +std::string ClientUI::Font() { return (fs::path("%{_datadir}/fonts/dejavu") / GetOptionsDB().Get("UI.font")).file_string(); } +std::string ClientUI::BoldFont() { return (fs::path("%{_datadir}/fonts/dejavu") / GetOptionsDB().Get("UI.font-bold")).file_string(); } +std::string ClientUI::TitleFont() { return (fs::path("%{_datadir}/fonts/dejavu") / GetOptionsDB().Get("UI.title-font")).file_string(); } int ClientUI::Pts() { return GetOptionsDB().Get("UI.font-size"); } int ClientUI::TitlePts() { return GetOptionsDB().Get("UI.title-font-size"); } EOF %build # install executables into /usr/bin # change not to include -O3 %cmake -DCMAKE_INSTALL_PREFIX:PATH="%{_bindir}" -DRELEASE_COMPILE_FLAGS:STRING="-DNDEBUG" . make VERBOSE=1 %{?_smp_mflags} %install rm -rf %{buildroot} make install DESTDIR=%{buildroot} rm %{buildroot}/%{_datadir}/%{name}-%{version}/*.ttf rm %{buildroot}/%{_datadir}/%{name}-%{version}/LICENSE.DejaVu # create png icon; use just the first image from the source .ico mkdir %{buildroot}/%{_datadir}/pixmaps convert -delete 1 client/human/HumanClient.ico %{buildroot}/%{_datadir}/pixmaps/FreeOrion.png # create .desktop file mkdir %{buildroot}/%{_datadir}/applications cat < %{buildroot}/%{_datadir}/applications/%{name}.desktop [Desktop Entry] Name=FreeOrion GenericName=Galaxy conquest strategy game Comment=A free, open source, turn-based space empire and galactic conquest (4X) game Exec=freeorion-wrapper Icon=FreeOrion Terminal=false Type=Application Categories=Game;StrategyGame; EOF desktop-file-validate %{buildroot}/%{_datadir}/applications/%{name}.desktop ln -s opengl-game-wrapper.sh %{buildroot}/%{_bindir}/freeorion-wrapper %clean rm -rf %{buildroot} %files %defattr(-,root,root,-) %doc %{_datadir}/%{name}-%{version}/COPYING %{_datadir}/%{name}-%{version} %{_datadir}/applications/%{name}.desktop %{_datadir}/pixmaps/FreeOrion.png %{_bindir}/freeorion %{_bindir}/freeorionca %{_bindir}/freeoriond %{_bindir}/freeorion-wrapper %changelog * Mon Mar 15 2010 Karel Volný 0.3.13-1.r3353 - Initial release