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