]> git.pld-linux.org Git - packages/doom3.git/blob - doom3.spec
- one current dir in LD_LIBRARY_PATH is enough
[packages/doom3.git] / doom3.spec
1 # NOTE: You could add to your 'mirrors', to get stuff downloaded:
2 #  ftp://dl.xs4all.nl/pub/mirror/idsoftware/idstuff/doom3/linux/
3 # TODO:
4 #  - package dedicated server - doomded.x86
5 #  - check if system libstdc++ and libgcc_s can be used
6 #    answered here: http://zerowing.idsoftware.com/linux/doom/#head-d15dfbca9b3ba90b9bacb7476ad2f0afe3bb0f72
7 #    so? we are not gentoo.
8 #  - check license?
9 #
10 # Conditional build:
11 %bcond_with     demo    # package demo data
12 %define         demo_version 1.1.1286
13 #
14 Summary:        Doom III - 3rd installment of the classic id 3D first-person shooter
15 Summary(de.UTF-8):      Doom III - der dritte Teil des FPP Klassikers von id Software
16 Summary(pl.UTF-8):      Doom III - trzecia część klasyki FPP z id Software
17 Name:           doom3
18 Version:        1.3.1302
19 Release:        0.8
20 Vendor:         id Software
21 License:        DOOM3
22 Group:          Applications/Games
23 Source0:        ftp://ftp.idsoftware.com/idstuff/doom3/linux/old/%{name}-linux-%{version}.x86.run
24 # NoSource0-md5:        b1d04da2d64bb8d54f64cbaa2fdb4490
25 Source1:        ftp://ftp.idsoftware.com/idstuff/doom3/linux/%{name}-linux-%{demo_version}-demo.x86.run
26 # NoSource1-md5:        81dcf8ead198f14844c554b25e07abbe
27 Source2:        %{name}.desktop
28 NoSource:       0
29 NoSource:       1
30 URL:            http://www.doom3.com/
31 ExclusiveArch:  %{ix86}
32 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
33
34 %define         _noautoprov             libgcc_s.so.1 libstdc++.so.5
35 %define         _noautoreq              libgcc_s.so.1 libstdc++.so.5
36 %define         _gamelibdir             %{_libdir}/games/doom3
37 %define         _gamedatadir            %{_datadir}/games/doom3
38
39 %description
40 Doom III for Linux.
41
42 To play the game you need to copy data files from your Doom III CD or
43 you could try playing demo by installing %{name}-demo package.
44
45 %description -l de.UTF-8
46 Doom III für Linux.
47
48 Um das Spiel zu spielen musst du die Dateien aus deiner Doom III CD
49 kopieren oder du kannst das Demo ausprobieren indem du %{name}-demo
50 installierst.
51
52 %description -l pl.UTF-8
53 Doom III dla Linuksa.
54
55 Do grania trzeba skopiować pliki danych z płyty Doom III, albo można
56 spróbować grać w wersji demo instalując pakiet %{name}-demo.
57
58 %package demo
59 Summary:        Doom III Demo data files
60 Summary(de.UTF-8):      Doom III Demo Dateien
61 Summary(pl.UTF-8):      Pliki danych Doom III Demo
62 Group:          Applications/Games
63 Version:        %{demo_version}
64 # main package version is mostly bigger than demo itself.
65 Requires:       %{name} >= %{demo_version}
66
67 %description demo
68 This package contains the data files for Doom III Demo.
69
70 %description demo -l de.UTF-8
71 Dieses Packet enthält Dateien für das Doom III Demo.
72
73 %description demo -l pl.UTF-8
74 Ten pakiet zawiera pliki danych dla gry Doom III Demo.
75
76 %prep
77 %setup -qcT
78 %if %{with demo}
79 sh %{SOURCE1} --tar xf
80 %endif
81 # here we overwrite files which are shared with demo package. that's intentional
82 sh %{SOURCE0} --tar xf
83
84 %install
85 rm -rf $RPM_BUILD_ROOT
86 install -d $RPM_BUILD_ROOT{%{_gamelibdir},%{_gamedatadir}/{demo,base}} \
87         $RPM_BUILD_ROOT{%{_pixmapsdir},%{_desktopdir},%{_bindir}}
88
89 install libgcc_s.so.1 libstdc++.so.5 $RPM_BUILD_ROOT%{_gamelibdir}
90 install bin/Linux/x86/doom.x86 $RPM_BUILD_ROOT%{_gamelibdir}
91
92 install %{name}.png $RPM_BUILD_ROOT%{_pixmapsdir}
93 install %{SOURCE2} $RPM_BUILD_ROOT%{_desktopdir}/%{name}.desktop
94
95 cat << 'EOF' > $RPM_BUILD_ROOT%{_bindir}/%{name}
96 #!/bin/sh
97 # Needed to make symlinks/shortcuts work.
98 # the binaries must run with correct working directory
99 cd %{_gamelibdir}
100 export LD_LIBRARY_PATH=${LD_LIBRARY_PATH:+$LD_LIBRARY_PATH:}.
101 exec ./doom.x86 "$@"
102 EOF
103
104 %if %{with demo}
105 install gamex86.so $RPM_BUILD_ROOT%{_gamelibdir}
106 install demo/* $RPM_BUILD_ROOT%{_gamedatadir}/demo
107 ln -s %{_gamedatadir}/demo $RPM_BUILD_ROOT%{_gamelibdir}/demo
108 %endif
109
110 install base/* $RPM_BUILD_ROOT%{_gamedatadir}/base
111 ln -s %{_gamedatadir}/base $RPM_BUILD_ROOT%{_gamelibdir}/base
112
113 %clean
114 rm -rf $RPM_BUILD_ROOT
115
116 %files
117 %defattr(644,root,root,755)
118 %doc License.txt README version.info
119 %attr(755,root,root) %{_bindir}/%{name}
120 %dir %{_gamelibdir}
121 %attr(755,root,root) %{_gamelibdir}/doom.x86
122 %attr(755,root,root) %{_gamelibdir}/libgcc_s.so.1
123 %attr(755,root,root) %{_gamelibdir}/libstdc++.so.5
124 %{_desktopdir}/%{name}.desktop
125 %{_pixmapsdir}/%{name}.png
126 %dir %{_gamedatadir}
127 %dir %{_gamedatadir}/base
128 %{_gamedatadir}/base/*
129 %{_gamelibdir}/base
130
131 %if %{with demo}
132 %files demo
133 %defattr(644,root,root,755)
134 %attr(755,root,root) %{_gamelibdir}/gamex86.so
135 %dir %{_gamedatadir}/demo
136 %{_gamedatadir}/demo/*
137 %{_gamelibdir}/demo
138 %endif
This page took 0.067417 seconds and 3 git commands to generate.