]> git.pld-linux.org Git - packages/et.git/blob - et.spec
e14da65a44d3f08ce86d1a91a0023cecc977aace
[packages/et.git] / et.spec
1 # TODO
2 # - create dedicated server subpackage
3 #
4 # Conditional build:
5 %bcond_without  data    # skip build of data subpackage (huge and resource consuming)
6 #
7 Summary:        Enemy Territory
8 Summary(pl.UTF-8):      Enemy Territory - Terytorium wroga
9 Name:           et
10 Version:        2.60
11 Release:        0.3
12 Epoch:          0
13 License:        RTCW-ETEULA
14 Group:          Applications/Games
15 Source0:        http://3dgamers.planetmirror.com/pub/3dgamers/games/wolfensteinet/et-linux-%{version}.x86.run
16 # NoSource0-md5:        2d2373f29f02e18d365d7f1860eee435
17 Source1:        %{name}.desktop
18 NoSource:       0
19 URL:            http://www.idsoftware.com/
20 # loose dependancy is intentional
21 Requires:       %{name}-data = %{version}
22 ExclusiveArch:  %{ix86}
23 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
24
25 %define         no_install_post_strip   1
26 %define         no_install_post_chrpath 1
27 %define         _gamelibdir             %{_libdir}/games/et
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
34 %description -l pl.UTF-8
35 Return to Castle Wolfenstein: Enemy Territory jest to samodzielna gra
36 dla wielu graczy oparta na Return to Castle Wolfenstein.
37
38 %package data
39 Summary:        Enemy Territory data files
40 Summary(pl.UTF-8):      Pliki z danymi dla Enemy Territory
41 Group:          Applications/Games
42
43 %description data
44 This package contains the data files for Enemy Territory.
45
46 %description data -l pl.UTF-8
47 Pakiet ten zawiera pliki z danymi dla gry Enemy Territory.
48
49 %prep
50 %setup -qcT
51 sh %{SOURCE0} --tar xf
52
53 mv pb/PB_EULA.txt .
54
55 %install
56 rm -rf $RPM_BUILD_ROOT
57 install -d $RPM_BUILD_ROOT{%{_bindir},%{_pixmapsdir},%{_desktopdir}} \
58         $RPM_BUILD_ROOT{%{_gamelibdir}/{pb,etmain},%{_gamedatadir}/etmain}
59
60 install bin/Linux/x86/et.x86 $RPM_BUILD_ROOT%{_gamelibdir}/%{name}
61
62 cat << 'EOF' > $RPM_BUILD_ROOT%{_bindir}/%{name}
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:.
68 exec ./%{name} ${1:+"$@"}
69 EOF
70
71 install ET.xpm $RPM_BUILD_ROOT%{_pixmapsdir}/%{name}.xpm
72 install %{SOURCE1} $RPM_BUILD_ROOT%{_desktopdir}
73 install etmain/*.so $RPM_BUILD_ROOT%{_gamelibdir}/etmain
74
75 %if %{with data}
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 -
82 %endif
83
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
89 %clean
90 rm -rf $RPM_BUILD_ROOT
91
92 %files
93 %defattr(644,root,root,755)
94 %doc CHANGES README Docs PB_EULA.txt
95 %attr(755,root,root) %{_bindir}/*
96
97 %dir %{_gamelibdir}
98 %attr(755,root,root) %{_gamelibdir}/et
99 %dir %{_gamelibdir}/etmain
100 %attr(755,root,root) %{_gamelibdir}/etmain/*.so
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
108 %dir %{_gamedatadir}
109 %{_desktopdir}/%{name}.desktop
110 %{_pixmapsdir}/%{name}.xpm
111
112 %if %{with data}
113 %files data
114 %defattr(644,root,root,755)
115 %{_gamedatadir}/*
116 %endif
This page took 0.085544 seconds and 3 git commands to generate.