|
1 # |
|
2 # spec file for package openttd (trunk) |
|
3 # |
|
4 # Copyright (c) 2007 The OpenTTD team. |
|
5 # This file and all modifications and additions to the pristine |
|
6 # package are under the same license as the package itself |
|
7 # |
|
8 Name: openttd |
|
9 Version: svn |
|
10 Release: head |
|
11 Group: Applications/Games |
|
12 Source: %{name}-%{version}-%{release}.tar.gz |
|
13 License: GPL |
|
14 URL: http://www.openttd.org |
|
15 Packager: Denis Burlaka <burlaka@yandex.ru> |
|
16 Summary: OpenTTD is an Open Source clone of Chris Sawyer's Transport Tycoon Deluxe |
|
17 Requires: SDL zlib libpng freetype2 fontconfig |
|
18 BuildRequires: gcc SDL-devel zlib-devel libpng-devel fontconfig-devel |
|
19 %if %{_vendor}=="suse" |
|
20 BuildRequires: freetype2-devel |
|
21 %endif |
|
22 %if %{_vendor}=="fedora" |
|
23 BuildRequires: freetype-devel |
|
24 %endif |
|
25 %if %{_vendor}=="mandriva" |
|
26 BuildRequires: libfreetype6-devel |
|
27 %endif |
|
28 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot |
|
29 Prefix: /usr |
|
30 |
|
31 %description |
|
32 OpenTTD is a clone of the Microprose game "Transport Tycoon Deluxe", a popular game originally written by Chris Sawyer. It attempts to mimic the original game as closely as possible while extending it with new features. |
|
33 |
|
34 OpenTTD is licensed under the GNU General Public License version 2.0. For more information, see the file 'COPYING' included with every release and source download of the game. |
|
35 |
|
36 %prep |
|
37 %setup |
|
38 |
|
39 %build |
|
40 ./configure --prefix-dir=%{prefix} --binary-dir=bin --install-dir="$RPM_BUILD_ROOT" |
|
41 make |
|
42 |
|
43 %install |
|
44 make ROOT="$RPM_BUILD_ROOT" install |
|
45 |
|
46 mkdir -p $RPM_BUILD_ROOT/%{_datadir}/applications |
|
47 cat << EOF > $RPM_BUILD_ROOT/%{_datadir}/applications/%{name}.desktop |
|
48 [Desktop Entry] |
|
49 Categories=Games; |
|
50 Encoding=UTF-8 |
|
51 Exec=/usr/bin/openttd |
|
52 Name=OpenTTD |
|
53 Icon=openttd.32 |
|
54 Terminal=false |
|
55 Type=Application |
|
56 EOF |
|
57 |
|
58 %clean |
|
59 rm -Rf "$RPM_BUILD_ROOT" |
|
60 |
|
61 %files |
|
62 %dir %{_datadir}/games/%{name} |
|
63 %dir %{_datadir}/games/%{name}/lang |
|
64 %dir %{_datadir}/games/%{name}/data |
|
65 %dir %{_datadir}/games/%{name}/gm |
|
66 %dir %{_datadir}/games/%{name}/docs |
|
67 %dir %{_datadir}/pixmaps |
|
68 %defattr(644, root, games, 755) |
|
69 %attr(755, root, games) %{_bindir}/%{name} |
|
70 %{_datadir}/games/%{name}/lang/* |
|
71 %{_datadir}/games/%{name}/data/* |
|
72 %{_datadir}/games/%{name}/docs/* |
|
73 %{_datadir}/pixmaps/* |
|
74 %{_datadir}/applications/%{name}.desktop |
|
75 |