]>
Commit | Line | Data |
---|---|---|
f76541bb ER |
1 | %define _ver %(echo %{version} | tr . _) |
2 | Summary: Enemy Territory - ETpro | |
3 | Name: etpro | |
4 | Version: 3.1.0 | |
5 | Release: 0.4 | |
6 | Epoch: 0 | |
7 | License: as-is | |
8 | Group: Applications/Games | |
9 | Source0: http://bani.anime.net/etpro/etpro-%{_ver}.zip | |
10 | # Source0-md5: e2e47a25f92e4824a742832c2bca7c51 | |
11 | Source1: %{name}.desktop | |
12 | URL: http://bani.anime.net/etpro/ | |
13 | Requires: et | |
14 | Requires: et-data | |
15 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
16 | ||
17 | %define no_install_post_strip 1 | |
18 | %define no_install_post_chrpath 1 | |
19 | %define _gamelibdir %{_libdir}/games/et | |
20 | %define _gamedatadir %{_datadir}/games/et | |
21 | ||
22 | %description | |
23 | Enemy Territory - ETpro | |
24 | ||
25 | %prep | |
26 | %setup -q -n %{name} | |
27 | ||
28 | %build | |
29 | ||
30 | %install | |
31 | rm -rf $RPM_BUILD_ROOT | |
32 | install -d $RPM_BUILD_ROOT{%{_bindir},%{_desktopdir},{%{_gamelibdir},%{_gamedatadir}}/etpro} | |
33 | ||
34 | cat << EOF > $RPM_BUILD_ROOT%{_bindir}/%{name} | |
35 | #!/bin/sh | |
36 | # Needed to make symlinks/shortcuts work. | |
37 | # the binaries must run with correct working directory | |
38 | cd %{_gamelibdir} | |
39 | exec ./et +set fs_game etpro "\$@" | |
40 | EOF | |
41 | ||
42 | cp -a animations configs etpromapscripts maps $RPM_BUILD_ROOT%{_gamelibdir}/etpro | |
43 | ||
44 | install *.pk3 $RPM_BUILD_ROOT%{_gamedatadir}/etpro | |
45 | ln -s ../../../../share/games/et/etpro/etpro-%{_ver}.pk3 $RPM_BUILD_ROOT%{_gamelibdir}/etpro | |
46 | ||
47 | install etpro_cheats.dat example.cfg $RPM_BUILD_ROOT%{_gamelibdir}/etpro | |
48 | install *.so $RPM_BUILD_ROOT%{_gamelibdir}/etpro | |
49 | ||
50 | install %{SOURCE1} $RPM_BUILD_ROOT%{_desktopdir} | |
51 | ||
52 | %clean | |
53 | rm -rf $RPM_BUILD_ROOT | |
54 | ||
55 | %files | |
56 | %defattr(644,root,root,755) | |
57 | %attr(755,root,root) %{_bindir}/* | |
58 | %dir %{_gamelibdir}/etpro | |
59 | %attr(755,root,root) %{_gamelibdir}/etpro/*.so | |
60 | %{_gamelibdir}/etpro/etpro_cheats.dat | |
61 | %{_gamelibdir}/etpro/animations | |
62 | %{_gamelibdir}/etpro/configs | |
63 | %{_gamelibdir}/etpro/etpromapscripts | |
64 | %{_gamelibdir}/etpro/maps | |
65 | %{_gamelibdir}/etpro/*.cfg | |
66 | %{_gamelibdir}/etpro/*.pk3 | |
67 | %dir %{_gamedatadir}/etpro | |
68 | %{_gamedatadir}/etpro/*.pk3 | |
69 | %{_desktopdir}/%{name}.desktop |