]> git.pld-linux.org Git - packages/openttd.git/blob - openttd.spec
Release 3 (by relup.sh)
[packages/openttd.git] / openttd.spec
1 Summary:        An open source reimplementation of the Microprose game "Transport Tycoon Deluxe"
2 Summary(pl.UTF-8):      Otwarta reimplementacja gry Transport Tycoon Deluxe
3 Name:           openttd
4 Version:        12.1
5 Release:        3
6 License:        GPL v2+
7 Group:          X11/Applications/Games
8 Source0:        https://cdn.openttd.org/openttd-releases/%{version}/%{name}-%{version}-source.tar.xz
9 # Source0-md5:  40111762304f5c5dcab83b1540bfbde9
10 Source1:        %{name}.desktop
11 Source2:        %{name}-server.desktop
12 Patch0:         %{name}-create-grf.patch
13 URL:            http://www.openttd.org/
14 BuildRequires:  SDL2-devel
15 BuildRequires:  fontconfig-devel
16 BuildRequires:  freetype-devel
17 BuildRequires:  grfcodec >= 6.0.2
18 BuildRequires:  libicu-devel
19 BuildRequires:  libpng-devel
20 BuildRequires:  libstdc++-devel
21 BuildRequires:  lzo-devel
22 BuildRequires:  pkgconfig
23 BuildRequires:  sed >= 4.0
24 BuildRequires:  xz-devel
25 BuildRequires:  zlib-devel
26 Requires:       %{name}-data = %{version}-%{release}
27 Suggests:       %{name}-ai
28 Suggests:       %{name}-opengfx
29 Suggests:       %{name}-openmsx
30 Suggests:       %{name}-opensfx
31 Provides:       %{name}-binary = %{version}-%{release}
32 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
33
34 %description
35 OpenTTD is modeled after the original Transport Tycoon game by Chris
36 Sawyer and enhances the game experience dramatically. Many features
37 were inspired by TTDPatch while others are original.
38
39 It requires the original Transport Tycoon Deluxe data files.
40
41 %description -l pl.UTF-8
42 OpenTTD powstał na bazie gry Transport Tycoon stworzonej przez Chrisa
43 Sawyera, jego grywalność jest jednak dużo większa. Wiele rzeczy
44 zostało zainspirowanych przez TTDPatch, dużo jest jednak oryginalnych
45 pomysłów.
46
47 Do uruchomienia wymagane są pliki danych z Transport Tycoon Deluxe.
48
49 %package data
50 Summary:        OpenTTD data files
51 Summary(pl.UTF-8):      Pliki danych OpenTTD
52 Group:          X11/Applications/Games
53
54 %description data
55 OpenTTD data files.
56
57 %description data -l pl.UTF-8
58 Pliki danych OpenTTD.
59
60 %package server
61 Summary:        OpenTTD dedicated server
62 Summary(pl.UTF-8):      Dedykowany serwer OpenTTD
63 Group:          X11/Applications/Games
64 Requires:       %{name}-data = %{version}-%{release}
65 Provides:       %{name}-binary = %{version}-%{release}
66
67 %description server
68 This package contains OpenTTD dedicated server. Note that
69 graphics-enabled OpenTTD client also has this functionality.
70
71 %description server -l pl.UTF-8
72 Ten pakiet zawiera dedykowany serwer OpenTTD. Należy zwrócić uwagę, że
73 graficzny klient OpenTTD również zawiera taką funkcjonalność.
74
75 %prep
76 %setup -q
77 %patch0 -p1
78
79 # Let's pldize
80 find src/lang/ -type f -exec %{__sed} -i 's/:Unix/:PLD Linux/' \{\} \;
81
82 %build
83
84 # dedicated
85 install -d dedicated
86 cd dedicated
87 %cmake .. \
88         -DOPTION_DEDICATED:BOOL=ON \
89         -DCMAKE_INSTALL_BINDIR="bin" \
90         -DCMAKE_INSTALL_DATADIR="share"
91
92 %{__make}
93
94 mv openttd{,-dedicated}
95
96 cd ..
97
98 # client
99 install -d build
100 cd build
101 %cmake .. \
102         -DCMAKE_INSTALL_BINDIR="bin" \
103         -DCMAKE_INSTALL_DATADIR="share" \
104         -DOPTION_DEDICATED:BOOL=OFF
105
106 %{__make}
107
108 %install
109 rm -rf $RPM_BUILD_ROOT
110
111 install -d $RPM_BUILD_ROOT{%{_desktopdir},%{_mandir}/man6,%{_pixmapsdir}}
112 install -d $RPM_BUILD_ROOT%{_datadir}/%{name}/{ai/library,scenario/heightmap}
113
114 %{__make} -C build install \
115         DESTDIR=$RPM_BUILD_ROOT
116
117 install dedicated/openttd-dedicated $RPM_BUILD_ROOT%{_bindir}
118 install %{SOURCE1} $RPM_BUILD_ROOT%{_desktopdir}
119 install %{SOURCE2} $RPM_BUILD_ROOT%{_desktopdir}
120 install docs/openttd.6 $RPM_BUILD_ROOT%{_mandir}/man6
121 install media/openttd.256.png $RPM_BUILD_ROOT%{_pixmapsdir}/openttd.png
122
123 %{__rm} $RPM_BUILD_ROOT%{_docdir}/{COPYING.md,README.md,changelog.txt,known-bugs.txt,multiplayer.md}
124
125 %clean
126 rm -rf $RPM_BUILD_ROOT
127
128 %post
129 %update_icon_cache hicolor
130
131 %postun
132 %update_icon_cache hicolor
133
134 %files
135 %defattr(644,root,root,755)
136 %doc COPYING.md changelog.txt known-bugs.txt README.md docs/multiplayer.md
137 %attr(755,root,root) %{_bindir}/%{name}
138 %{_desktopdir}/%{name}.desktop
139 %{_mandir}/man6/openttd.*
140 %{_iconsdir}/hicolor/*x*/apps/openttd.png
141
142 %files data
143 %defattr(644,root,root,755)
144 %doc bin/scripts
145 %{_datadir}/%{name}
146 %{_pixmapsdir}/openttd.*
147
148 %files server
149 %defattr(644,root,root,755)
150 %attr(755,root,root) %{_bindir}/%{name}-dedicated
151 %{_desktopdir}/%{name}-server.desktop
This page took 0.066765 seconds and 3 git commands to generate.