]> git.pld-linux.org Git - packages/et.git/blob - et.spec
df26628f75e70252de80b7e1f1ac1462c7393dc6
[packages/et.git] / et.spec
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 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
19
20 %define         no_install_post_strip   1
21 %define         no_install_post_chrpath 1
22 %define         _gamelibdir     %{_libdir}/games/et
23 %define         _gamedatadir    %{_datadir}/games/et
24
25 %description
26 Return to Castle Wolfenstein: Enemy Territory - standalone
27 multi-player game based on Return to Castle Wolfenstein.
28
29 %if %{with data}
30 %package data
31 Summary:        Enemy Territory data files.
32 Group:          Applications/Games
33
34 %description data
35 This package contains the data files for Enemy Territory.
36 %endif
37
38 %prep
39 %setup -qcT
40 sh %{SOURCE0} --tar xf
41
42 %build
43
44 %install
45 rm -rf $RPM_BUILD_ROOT
46 install -d $RPM_BUILD_ROOT{%{_bindir},%{_pixmapsdir},%{_desktopdir}} \
47     $RPM_BUILD_ROOT{%{_gamelibdir},%{_gamedatadir}}
48
49 install bin/Linux/x86/et.x86 $RPM_BUILD_ROOT%{_gamelibdir}/%{name}
50
51 cat << EOF > $RPM_BUILD_ROOT%{_bindir}/%{name}
52 #!/bin/sh
53 # Needed to make symlinks/shortcuts work.
54 # the binaries must run with correct working directory
55 cd %{_gamelibdir}
56 export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:.
57 exec ./%{name} "\$@"
58 EOF
59
60 install ET.xpm $RPM_BUILD_ROOT%{_pixmapsdir}/%{name}.xpm
61 install %{SOURCE1} $RPM_BUILD_ROOT%{_desktopdir}
62 ln -s ../../../share/games/et/etmain $RPM_BUILD_ROOT%{_gamelibdir}
63
64 cp -a pb $RPM_BUILD_ROOT%{_gamelibdir}
65 # in DOCS
66 rm -f $RPM_BUILD_ROOT%{_gamelibdir}/pb/PB_EULA.txt
67
68 %if %{with data}
69 cp -a etmain $RPM_BUILD_ROOT%{_gamedatadir}
70 %endif
71
72 %clean
73 rm -rf $RPM_BUILD_ROOT
74
75 %files
76 %defattr(644,root,root,755)
77 %doc CHANGES v1.02_Readme.htm Docs pb/PB_EULA.txt
78 %attr(755,root,root) %{_bindir}/*
79
80 %dir %{_gamelibdir}
81 %attr(755,root,root) %{_gamelibdir}/et
82 %{_gamelibdir}/etmain
83
84 %dir %{_gamelibdir}/pb
85 %{_gamelibdir}/pb/htm
86 %attr(755,root,root) %{_gamelibdir}/pb/*.x86
87 %attr(755,root,root) %{_gamelibdir}/pb/*.so
88 %{_gamelibdir}/pb/*.db
89
90 %{_desktopdir}/%{name}.desktop
91 %{_pixmapsdir}/%{name}.xpm
92
93 %if %{with data}
94 %files data
95 %{_gamedatadir}
96 %endif
This page took 0.087632 seconds and 3 git commands to generate.