]>
Commit | Line | Data |
---|---|---|
aba8c743 ER |
1 | # Conditional build: |
2 | %bcond_with data # build data subpackage (huge and resource consuming) | |
3 | # | |
4 | Summary: Enemy Territory | |
5 | Name: et | |
6 | Version: 2.56 | |
7 | Release: 0.11 | |
8 | Epoch: 0 | |
9 | License: RTCW-ETEULA | |
10 | Group: Applications/Games | |
11 | Source0: http://3dgamers.planetmirror.com/pub/3dgamers/games/wolfensteinet/et-linux-%{version}-2.x86.run | |
12 | # NoSource0-md5: 4dddf1612b9ed5b3fe9d3348ec78c28f | |
13 | Source1: %{name}.desktop | |
14 | NoSource: 0 | |
15 | URL: http://www.idsoftware.com/ | |
16 | # loose dependancy is intentional | |
17 | Requires: %{name}-data = %{version} | |
18 | BuildArch: %{_host_cpu} | |
19 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
20 | ||
21 | %define no_install_post_strip 1 | |
22 | %define no_install_post_chrpath 1 | |
23 | %define _gamelibdir %{_libdir}/games/et | |
24 | %define _gamedatadir %{_datadir}/games/et | |
25 | ||
26 | %description | |
27 | Return to Castle Wolfenstein: Enemy Territory - standalone | |
28 | multi-player game based on Return to Castle Wolfenstein. | |
29 | ||
30 | %if %{with data} | |
31 | %package data | |
32 | Summary: Enemy Territory data files. | |
33 | Group: Applications/Games | |
34 | BuildArch: noarch | |
35 | ||
36 | %description data | |
37 | This package contains the data files for Enemy Territory. | |
38 | %endif | |
39 | ||
40 | %prep | |
41 | %setup -qcT | |
42 | sh %{SOURCE0} --tar xf | |
43 | ||
44 | %build | |
45 | ||
46 | %install | |
47 | rm -rf $RPM_BUILD_ROOT | |
48 | install -d $RPM_BUILD_ROOT{%{_bindir},%{_pixmapsdir},%{_desktopdir}} \ | |
49 | $RPM_BUILD_ROOT{%{_gamelibdir},%{_gamedatadir}} | |
50 | ||
51 | install bin/Linux/x86/et.x86 $RPM_BUILD_ROOT%{_gamelibdir}/%{name} | |
52 | ||
53 | cat << EOF > $RPM_BUILD_ROOT%{_bindir}/%{name} | |
54 | #!/bin/sh | |
55 | # Needed to make symlinks/shortcuts work. | |
56 | # the binaries must run with correct working directory | |
57 | cd %{_gamelibdir} | |
58 | export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:. | |
59 | exec ./%{name} "$@" | |
60 | EOF | |
61 | ||
62 | install ET.xpm $RPM_BUILD_ROOT%{_pixmapsdir}/%{name}.xpm | |
63 | install %{SOURCE1} $RPM_BUILD_ROOT%{_desktopdir} | |
64 | ln -s ../../../share/games/et/etmain $RPM_BUILD_ROOT%{_gamelibdir} | |
65 | ||
66 | cp -a pb $RPM_BUILD_ROOT%{_gamelibdir} | |
67 | # in DOCS | |
68 | rm -f $RPM_BUILD_ROOT%{_gamelibdir}/pb/PB_EULA.txt | |
69 | ||
70 | %if %{with data} | |
71 | cp -a etmain $RPM_BUILD_ROOT%{_gamedatadir} | |
72 | %endif | |
73 | ||
74 | %clean | |
75 | rm -rf $RPM_BUILD_ROOT | |
76 | ||
77 | %files | |
78 | %defattr(644,root,root,755) | |
79 | %doc CHANGES v1.02_Readme.htm Docs pb/PB_EULA.txt | |
80 | %attr(755,root,root) %{_bindir}/* | |
81 | ||
82 | %dir %{_gamelibdir} | |
83 | %attr(755,root,root) %{_gamelibdir}/et | |
84 | %{_gamelibdir}/etmain | |
85 | ||
86 | %dir %{_gamelibdir}/pb | |
87 | %{_gamelibdir}/pb/htm | |
88 | %attr(755,root,root) %{_gamelibdir}/pb/*.x86 | |
89 | %attr(755,root,root) %{_gamelibdir}/pb/*.so | |
90 | %{_gamelibdir}/pb/*.db | |
91 | ||
92 | %{_desktopdir}/%{name}.desktop | |
93 | %{_pixmapsdir}/%{name}.xpm | |
94 | ||
95 | %if %{with data} | |
96 | %files data | |
97 | %{_gamedatadir} | |
98 | %endif |