|
1 #------------------------------------------------------------------------------ |
|
2 # openttd.spec |
|
3 # This SPEC file controls the building of custom OpenTTD RPM |
|
4 # packages. |
|
5 #------------------------------------------------------------------------------ |
|
6 |
|
7 %define name openttd |
|
8 %define version 0.5.0 |
|
9 %define release 1mdk |
|
10 |
|
11 #------------------------------------------------------------------------------ |
|
12 # Prologue information |
|
13 #------------------------------------------------------------------------------ |
|
14 Name: %{name} |
|
15 Version: %{version} |
|
16 Release: %{release} |
|
17 Summary: An open source clone of the Microprose game "Transport Tycoon Deluxe" |
|
18 Group: Games/Strategy |
|
19 License: GPL |
|
20 |
|
21 URL: http://www.openttd.org |
|
22 |
|
23 Source: %{name}-%{version}.tar.gz |
|
24 Packager: Dominik Scherer <dominik@openttd.com> |
|
25 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot |
|
26 BuildRequires: libSDL1.2-devel >= 1.2.7 |
|
27 BuildRequires: libpng3-devel >= 1.2.5 |
|
28 BuildRequires: zlib1-devel >= 1.2.1 |
|
29 |
|
30 #------------------------------------------------------------------------------ |
|
31 # Description |
|
32 #------------------------------------------------------------------------------ |
|
33 %description |
|
34 An enhanced open source clone of the Microprose game "Transport Tycoon Deluxe". |
|
35 You require the data files of the original Transport Tycoon Deluxe |
|
36 for Windows to play the game. You have to MANUALLY copy them to the |
|
37 game data directory! |
|
38 |
|
39 #------------------------------------------------------------------------------ |
|
40 # install scripts |
|
41 #------------------------------------------------------------------------------ |
|
42 %prep |
|
43 rm -rf $RPM_BUILD_ROOT |
|
44 %setup |
|
45 |
|
46 %build |
|
47 make BINARY_DIR=%{_gamesbindir} PREFIX=%{_gamesdatadir} DATA_DIR=openttd INSTALL_DIR=%{_gamesdatadir}/openttd/ USE_HOMEDIR=1 PERSONAL_DIR=.openttd INSTALL=1 RELEASE=%{version} |
|
48 |
|
49 %install |
|
50 mkdir -p $RPM_BUILD_ROOT%{_gamesbindir} |
|
51 mkdir -p $RPM_BUILD_ROOT%{_gamesdatadir}/openttd/lang |
|
52 mkdir -p $RPM_BUILD_ROOT%{_gamesdatadir}/openttd/data |
|
53 mkdir -p $RPM_BUILD_ROOT%{_gamesdatadir}/openttd/scenario |
|
54 |
|
55 cp ./openttd $RPM_BUILD_ROOT%{_gamesbindir}/ |
|
56 cp -r ./lang/*.lng $RPM_BUILD_ROOT%{_gamesdatadir}/openttd/lang/ |
|
57 cp -r ./data/*.grf $RPM_BUILD_ROOT%{_gamesdatadir}/openttd/data/ |
|
58 cp -r ./scenario/*.scn $RPM_BUILD_ROOT%{_gamesdatadir}/openttd/scenario/ |
|
59 cp -r ./data/opntitle.dat $RPM_BUILD_ROOT%{_gamesdatadir}/openttd/data/ |
|
60 |
|
61 # icon |
|
62 install -m644 media/openttd.32.png -D $RPM_BUILD_ROOT%{_miconsdir}/%{name}.png |
|
63 install -m644 media/openttd.64.png -D $RPM_BUILD_ROOT%{_iconsdir}/%{name}.png |
|
64 install -m644 media/openttd.128.png -D $RPM_BUILD_ROOT%{_liconsdir}/%{name}.png |
|
65 |
|
66 # menu entry |
|
67 mkdir -p $RPM_BUILD_ROOT/%{_menudir} |
|
68 cat << EOF > $RPM_BUILD_ROOT/%{_menudir}/%{name} |
|
69 ?package(%{name}):command="%{_gamesbindir}/openttd" icon="%{name}.png" \ |
|
70 needs="X11" section="Amusement/Strategy" title="OpenTTD" \ |
|
71 longtitle="%{Summary}" |
|
72 EOF |
|
73 |
|
74 %clean |
|
75 rm -rf $RPM_BUILD_ROOT |
|
76 |
|
77 %post |
|
78 %{update_menus} |
|
79 |
|
80 %postun |
|
81 %{clean_menus} |
|
82 |
|
83 #------------------------------------------------------------------------------ |
|
84 # Files listing. |
|
85 #------------------------------------------------------------------------------ |
|
86 %files |
|
87 %defattr(-,root,root,0755) |
|
88 %{_gamesbindir}/openttd |
|
89 |
|
90 %{_gamesdatadir}/openttd/lang/american.lng |
|
91 %{_gamesdatadir}/openttd/lang/catalan.lng |
|
92 %{_gamesdatadir}/openttd/lang/czech.lng |
|
93 %{_gamesdatadir}/openttd/lang/danish.lng |
|
94 %{_gamesdatadir}/openttd/lang/dutch.lng |
|
95 %{_gamesdatadir}/openttd/lang/english.lng |
|
96 %{_gamesdatadir}/openttd/lang/finnish.lng |
|
97 %{_gamesdatadir}/openttd/lang/french.lng |
|
98 %{_gamesdatadir}/openttd/lang/galician.lng |
|
99 %{_gamesdatadir}/openttd/lang/german.lng |
|
100 %{_gamesdatadir}/openttd/lang/hungarian.lng |
|
101 %{_gamesdatadir}/openttd/lang/icelandic.lng |
|
102 %{_gamesdatadir}/openttd/lang/italian.lng |
|
103 %{_gamesdatadir}/openttd/lang/norwegian.lng |
|
104 %{_gamesdatadir}/openttd/lang/origveh.lng |
|
105 %{_gamesdatadir}/openttd/lang/polish.lng |
|
106 %{_gamesdatadir}/openttd/lang/portuguese.lng |
|
107 %{_gamesdatadir}/openttd/lang/romanian.lng |
|
108 %{_gamesdatadir}/openttd/lang/slovak.lng |
|
109 %{_gamesdatadir}/openttd/lang/spanish.lng |
|
110 %{_gamesdatadir}/openttd/lang/swedish.lng |
|
111 |
|
112 %{_gamesdatadir}/openttd/data/autorail.grf |
|
113 %{_gamesdatadir}/openttd/data/canalsw.grf |
|
114 %{_gamesdatadir}/openttd/data/openttd.grf |
|
115 %{_gamesdatadir}/openttd/data/opntitle.dat |
|
116 %{_gamesdatadir}/openttd/data/signalsw.grf |
|
117 %{_gamesdatadir}/openttd/data/trkfoundw.grf |
|
118 |
|
119 "%{_gamesdatadir}/openttd/scenario/Linkgame Islands 2004.scn" |
|
120 "%{_gamesdatadir}/openttd/scenario/Mountain Pass.scn" |
|
121 "%{_gamesdatadir}/openttd/scenario/Volcano City.scn" |
|
122 |
|
123 %{_menudir}/%{name} |
|
124 %{_iconsdir}/*.png |
|
125 %{_miconsdir}/*.png |
|
126 %{_liconsdir}/*.png |
|
127 |
|
128 %doc changelog.txt readme.txt COPYING os/linux/README.urpmi |
|
129 |
|
130 #------------------------------------------------------------------------------ |
|
131 # Change Log |
|
132 #------------------------------------------------------------------------------ |
|
133 %changelog |
|
134 * Sun Jan 23 2005 Dominik Scherer <dominik@openttd.com> 0.3.6-1mdk |
|
135 - Upgraded to 0.3.6 |
|
136 - Structured and commented the spec file a bit (inspired by ScummVM) |
|
137 |
|
138 * Fri Dec 24 2004 Dominik Scherer <dominik@openttd.com> 0.3.5-1mdk |
|
139 - Upgraded to 0.3.5 |
|
140 - Added a warning message about the additional required files (only displayed when installing via urpmi) |
|
141 |
|
142 * Wed Sep 15 2004 Dominik Scherer <> 0.3.4-1mdk |
|
143 - Upgraded to 0.3.4 |
|
144 |
|
145 * Wed Jul 31 2004 Dominik Scherer <> 0.3.3-1mdk |
|
146 - Initial release |