]>
Commit | Line | Data |
---|---|---|
c956c757 ER |
1 | # TODO |
2 | # - create dedicated server subpackage | |
2a41f04b | 3 | # - separate 2.60 and 2.60b - some servers needs different version |
505589cb | 4 | # |
aba8c743 | 5 | # Conditional build: |
c956c757 | 6 | %bcond_without data # skip build of data subpackage (huge and resource consuming) |
aba8c743 ER |
7 | # |
8 | Summary: Enemy Territory | |
5579b3c1 | 9 | Summary(pl.UTF-8): Enemy Territory - Terytorium wroga |
aba8c743 | 10 | Name: et |
9ac97e81 | 11 | Version: 2.60 |
2a41f04b | 12 | Release: 0.4 |
aba8c743 ER |
13 | Epoch: 0 |
14 | License: RTCW-ETEULA | |
15 | Group: Applications/Games | |
2a41f04b | 16 | Source0: ftp://ftp.red.telefonica-wholesale.net/GAMES/ET/linux/%{name}-linux-%{version}.x86.run |
4c4b7e62 | 17 | # NoSource0-md5: 2d2373f29f02e18d365d7f1860eee435 |
2a41f04b BZ |
18 | Source1: ftp://ftp.red.telefonica-wholesale.net/GAMES/ET/linux/%{name}-linux-%{version}-update.x86.run |
19 | # NoSource1-md5: 94a7036471b90955a88339d677e467c2 | |
20 | Source2: ftp://ftp.red.telefonica-wholesale.net/GAMES/ET/linux/%{name}-%{version}b.zip | |
21 | # NoSource2-md5: fb83b8732fc7373c277180b663debf57 | |
22 | Source3: %{name}.desktop | |
aba8c743 ER |
23 | NoSource: 0 |
24 | URL: http://www.idsoftware.com/ | |
25 | # loose dependancy is intentional | |
582c2e68 | 26 | BuildRequires: unzip |
aba8c743 | 27 | Requires: %{name}-data = %{version} |
392cb562 | 28 | ExclusiveArch: %{ix86} |
aba8c743 ER |
29 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
30 | ||
4c4b7e62 | 31 | %define _gamelibdir %{_libdir}/games/et |
aba8c743 ER |
32 | %define _gamedatadir %{_datadir}/games/et |
33 | ||
34 | %description | |
35 | Return to Castle Wolfenstein: Enemy Territory - standalone | |
36 | multi-player game based on Return to Castle Wolfenstein. | |
37 | ||
101d7bdf | 38 | %description -l pl.UTF-8 |
b8aadf6a | 39 | Return to Castle Wolfenstein: Enemy Territory jest to samodzielna gra |
40 | dla wielu graczy oparta na Return to Castle Wolfenstein. | |
505589cb | 41 | |
aba8c743 | 42 | %package data |
505589cb | 43 | Summary: Enemy Territory data files |
5579b3c1 | 44 | Summary(pl.UTF-8): Pliki z danymi dla Enemy Territory |
aba8c743 | 45 | Group: Applications/Games |
aba8c743 ER |
46 | |
47 | %description data | |
48 | This package contains the data files for Enemy Territory. | |
505589cb | 49 | |
101d7bdf | 50 | %description data -l pl.UTF-8 |
505589cb | 51 | Pakiet ten zawiera pliki z danymi dla gry Enemy Territory. |
aba8c743 ER |
52 | |
53 | %prep | |
54 | %setup -qcT | |
55 | sh %{SOURCE0} --tar xf | |
2a41f04b BZ |
56 | sh %{SOURCE1} --tar xf |
57 | unzip -j %{SOURCE2} "Enemy Territory 2.60b/linux/et*" | |
58 | mv et*.x86 bin/Linux/x86 | |
82d78adb ER |
59 | mv pb/PB_EULA.txt . |
60 | ||
aba8c743 ER |
61 | %install |
62 | rm -rf $RPM_BUILD_ROOT | |
63 | install -d $RPM_BUILD_ROOT{%{_bindir},%{_pixmapsdir},%{_desktopdir}} \ | |
82d78adb | 64 | $RPM_BUILD_ROOT{%{_gamelibdir}/{pb,etmain},%{_gamedatadir}/etmain} |
aba8c743 ER |
65 | |
66 | install bin/Linux/x86/et.x86 $RPM_BUILD_ROOT%{_gamelibdir}/%{name} | |
67 | ||
527feeaf | 68 | cat << 'EOF' > $RPM_BUILD_ROOT%{_bindir}/%{name} |
aba8c743 ER |
69 | #!/bin/sh |
70 | # Needed to make symlinks/shortcuts work. | |
71 | # the binaries must run with correct working directory | |
72 | cd %{_gamelibdir} | |
73 | export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:. | |
82d78adb | 74 | exec ./%{name} ${1:+"$@"} |
aba8c743 ER |
75 | EOF |
76 | ||
77 | install ET.xpm $RPM_BUILD_ROOT%{_pixmapsdir}/%{name}.xpm | |
2a41f04b | 78 | install %{SOURCE3} $RPM_BUILD_ROOT%{_desktopdir} |
82d78adb | 79 | install etmain/*.so $RPM_BUILD_ROOT%{_gamelibdir}/etmain |
aba8c743 ER |
80 | |
81 | %if %{with data} | |
82d78adb ER |
82 | cp -a etmain/{video,*.{pk3,cfg,dat,txt}} $RPM_BUILD_ROOT%{_gamedatadir}/etmain |
83 | cd $RPM_BUILD_ROOT%{_gamedatadir}/etmain | |
84 | for a in video *.{pk3,cfg,dat,txt}; do | |
85 | ln -s ../../../../share/games/et/etmain/$a $RPM_BUILD_ROOT%{_gamelibdir}/etmain | |
86 | done | |
87 | cd - | |
aba8c743 ER |
88 | %endif |
89 | ||
82d78adb ER |
90 | install pb/*.so $RPM_BUILD_ROOT%{_gamelibdir}/pb |
91 | install pb/*.x86 $RPM_BUILD_ROOT%{_gamelibdir}/pb | |
92 | cp -a pb/*.db $RPM_BUILD_ROOT%{_gamelibdir}/pb | |
93 | cp -a pb/htm $RPM_BUILD_ROOT%{_gamelibdir}/pb | |
94 | ||
aba8c743 ER |
95 | %clean |
96 | rm -rf $RPM_BUILD_ROOT | |
97 | ||
98 | %files | |
99 | %defattr(644,root,root,755) | |
82d78adb | 100 | %doc CHANGES README Docs PB_EULA.txt |
aba8c743 ER |
101 | %attr(755,root,root) %{_bindir}/* |
102 | ||
103 | %dir %{_gamelibdir} | |
104 | %attr(755,root,root) %{_gamelibdir}/et | |
82d78adb ER |
105 | %dir %{_gamelibdir}/etmain |
106 | %attr(755,root,root) %{_gamelibdir}/etmain/*.so | |
aba8c743 ER |
107 | |
108 | %dir %{_gamelibdir}/pb | |
109 | %{_gamelibdir}/pb/htm | |
110 | %attr(755,root,root) %{_gamelibdir}/pb/*.x86 | |
111 | %attr(755,root,root) %{_gamelibdir}/pb/*.so | |
112 | %{_gamelibdir}/pb/*.db | |
113 | ||
c956c757 | 114 | %dir %{_gamedatadir} |
aba8c743 ER |
115 | %{_desktopdir}/%{name}.desktop |
116 | %{_pixmapsdir}/%{name}.xpm | |
117 | ||
118 | %if %{with data} | |
119 | %files data | |
392cb562 | 120 | %defattr(644,root,root,755) |
c956c757 | 121 | %{_gamedatadir}/* |
2a41f04b BZ |
122 | %{_gamelibdir}/etmain/*.cfg |
123 | %{_gamelibdir}/etmain/*.pk3 | |
124 | %{_gamelibdir}/etmain/description.txt | |
125 | %{_gamelibdir}/etmain/hunkusage.dat | |
126 | #%{_gamelibdir}/et/etmain/video | |
aba8c743 | 127 | %endif |