From 16fea4a91a5b0f4a60732e854d731241becb695d Mon Sep 17 00:00:00 2001 From: CoprDistGit Date: Fri, 1 Nov 2024 03:00:53 +0000 Subject: automatic import of openttd --- .gitignore | 1 + openttd-14.1-link-against-icu-uc.patch | 19 +++++ openttd.spec | 147 +++++++++++++++++++++++++++++++++ sources | 1 + 4 files changed, 168 insertions(+) create mode 100644 openttd-14.1-link-against-icu-uc.patch create mode 100644 openttd.spec create mode 100644 sources diff --git a/.gitignore b/.gitignore index e69de29..940f2f3 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1 @@ +/openttd-14.1-source.tar.xz diff --git a/openttd-14.1-link-against-icu-uc.patch b/openttd-14.1-link-against-icu-uc.patch new file mode 100644 index 0000000..ada23bb --- /dev/null +++ b/openttd-14.1-link-against-icu-uc.patch @@ -0,0 +1,19 @@ +--- openttd-14.1/CMakeLists.txt.orig 2024-11-01 09:10:31.760952957 +0800 ++++ openttd-14.1/CMakeLists.txt 2024-11-01 09:14:32.607945862 +0800 +@@ -152,7 +152,7 @@ + find_package(Fontconfig) + endif() + find_package(Harfbuzz) +- find_package(ICU OPTIONAL_COMPONENTS i18n) ++ find_package(ICU OPTIONAL_COMPONENTS i18n uc) + endif() + endif() + endif() +@@ -331,6 +331,7 @@ + link_package(Fontconfig TARGET Fontconfig::Fontconfig) + link_package(Harfbuzz TARGET harfbuzz::harfbuzz) + link_package(ICU_i18n) ++ link_package(ICU_uc) + + if(SDL2_FOUND AND OPENGL_FOUND AND UNIX) + # SDL2 dynamically loads OpenGL if needed, so do not link to OpenGL when diff --git a/openttd.spec b/openttd.spec new file mode 100644 index 0000000..12ed4db --- /dev/null +++ b/openttd.spec @@ -0,0 +1,147 @@ +Name: openttd +Version: 14.1 +Release: 2 +Summary: Transport system simulation game + +License: GPL-2.0-only AND BSD-3-Clause AND LGPL-2.1-or-later AND MIT AND Zlib +URL: https://www.openttd.org +Source0: https://cdn.openttd.org/openttd-releases/%{version}/%{name}-%{version}-source.tar.xz +Patch0: openttd-14.1-link-against-icu-uc.patch + +BuildRequires: cmake +BuildRequires: desktop-file-utils +BuildRequires: doxygen +BuildRequires: fontconfig-devel +BuildRequires: fluidsynth-devel +BuildRequires: freetype-devel +BuildRequires: gcc-c++ +BuildRequires: libicu-devel +BuildRequires: libpng-devel +BuildRequires: lzo-devel +BuildRequires: SDL2-devel +BuildRequires: xz-devel +BuildRequires: zlib-devel + +Requires: hicolor-icon-theme + +Recommends: openttd-opengfx => 0.5.0 +Recommends: fluid-soundfont-gm + +%description +OpenTTD is modeled after a popular transportation business simulation game +by Chris Sawyer and enhances the game experience dramatically. Many features +were inspired by TTDPatch while others are original. + + +%package docs +Summary: Documentation for OpenTTD +BuildArch: noarch +Requires: %{name} = %{version}-%{release} + +%description docs +Development documentation for OpenTTD. Includes information on how to program +the AI. + + +%prep +%autosetup -p1 -n %{name}-%{version}%{?prever:-%{prever}} + +sed -i "s|/usr/share|%{_datadir}|g" src/music/fluidsynth.cpp + +%build +mkdir build +cd build +%cmake \ + -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_INSTALL_BINDIR=bin \ + -DCMAKE_INSTALL_DATADIR=%{_datadir} \ + -DGLOBAL_DIR:PATH=%{_datadir}/%{name} .. + +%make_build + +%install +cd build +%make_install + +# Remove the installed docs - we will install subset of those +rm -rf $RPM_BUILD_ROOT%{_docdir} + +# install documentation +install -dpm 755 $RPM_BUILD_ROOT%{_datadir}/%{name}/docs/ +cp -a docs/* $RPM_BUILD_ROOT%{_datadir}/%{name}/docs/ +# this is installed into the proper path earlier +#rm $RPM_BUILD_ROOT%{_datadir}/%{name}/docs/%{name}.6 + + +desktop-file-install --dir=$RPM_BUILD_ROOT%{_datadir}/applications \ + --add-category=StrategyGame \ + $RPM_BUILD_ROOT%{_datadir}/applications/openttd.desktop + +# Register as an application to be visible in the software center +# +# NOTE: It would be *awesome* if this file was maintained by the upstream +# project, translated and installed into the right place during `make install`. +# +# See http://www.freedesktop.org/software/appstream/docs/ for more details. +# +mkdir -p $RPM_BUILD_ROOT%{_datadir}/appdata +cat > $RPM_BUILD_ROOT%{_datadir}/appdata/%{name}.appdata.xml < + + + + openttd.desktop + CC0-1.0 + A highly detailed transport simulation game + +

+ OpenTTD is a transport tycoon simulation game that enhances the + original Transport Tycoon game developed by Chris Sawyer. + The game includes road, air, train and naval transport with a large + selection of industries and passenger services that need to be provided. +

+

+ The game can be played in both single and multiplayer modes where + you compete with other transport companies to dominate the markets. +

+
+ https://www.openttd.org + + https://www.openttd.org/screenshots/1.4-02-opengfx-1920x1200.png + https://www.openttd.org/screenshots/1.9-darkuk-3.png + + info@openttd.org +
+EOF + +%files +%license COPYING.md +%doc changelog.txt CONTRIBUTING.md CREDITS.md known-bugs.txt README.md +%{_bindir}/%{name} +%{_datadir}/appdata/%{name}.appdata.xml +%{_datadir}/applications/%{name}.desktop +%{_mandir}/man6/%{name}.6* +%{_datadir}/%{name} +%{_datadir}/pixmaps/%{name}.32.xpm +%{_datadir}/pixmaps/%{name}.64.xpm +%{_datadir}/icons/hicolor/*/apps/%{name}.png +%exclude %{_datadir}/%{name}/docs + +%files docs +# These are really devel docs, but as we don't have -devel subpackage, we put it here +# Could be useful for people making graphics, AI scripts or translations +%{_datadir}/%{name}/docs/ + + +%changelog +* Fri Nov 01 2024 Funda Wang - 14.1-2 +- fix build with icu >= 76.1 + +* Tue Jul 16 2024 zhangxingrong- - 14.1-1 +- update to version 14.1 + +* Wed May 24 2023 wangtaozhi - 13.0-1 +- Package init diff --git a/sources b/sources new file mode 100644 index 0000000..37abe87 --- /dev/null +++ b/sources @@ -0,0 +1 @@ +cb708ae418a12175385267e0dd74b4f6 openttd-14.1-source.tar.xz -- cgit v1.2.3