]> git.pld-linux.org Git - packages/doomlegacy.git/blob - doomlegacy.spec
- build on x32
[packages/doomlegacy.git] / doomlegacy.spec
1 #
2 # Conditional build:
3 %bcond_with             x11     # build with System Media Interface (broken, seems unsupported)
4 %bcond_without  sdl     # build with SDL System Media Interface
5
6 %define         rel     3
7 %define         svnrev  817
8 Summary:        DOOM Legacy for Linux
9 Summary(pl.UTF-8):      DOOM Legacy dla Linuksa
10 Name:           doomlegacy
11 Version:        1.44
12 Release:        0.alpha2.r%{svnrev}.%{rel}
13 License:        GPL, perhaps except for legacy.wad
14 Group:          Applications/Games
15 #Source0:       http://doomlegacy.sourceforge.net/releases/%{name}_144_alpha2_src_r777.zip
16 # no upstream source, so create our own
17 # svn co https://doomlegacy.svn.sourceforge.net/svnroot/doomlegacy/legacy_one/trunk legacy_one
18 # rm -rf doomlegacy_144_alpha2 && svn export legacy_one doomlegacy_144_alpha2
19 # zip -r doomlegacy_144_alpha2_src_r$(svnversion legacy_one).zip doomlegacy_144_alpha2
20 Source0:        %{name}_144_alpha2_src_r817.zip
21 # Source0-md5:  28b564983eec5106f6cc3b39bd793dca
22 # legacy wad extracted from binary archive: doomlegacy_144_alpha2_linux2.4_32bit.zip
23 Source1:        http://carme.pld-linux.org/~glen/legacy.wad
24 # Source1-md5:  2c29a4d7cedcf95d09dec71c41025aa5
25 Source4:        %{name}-x11.desktop
26 Source5:        %{name}-sdl.desktop
27 Source6:        %{name}.png
28 Patch0:         %{name}-paths.patch
29 Patch1:         %{name}-Makefile.patch
30 Patch2:         %{name}-nosndstat.patch
31 Patch3:         %{name}-sound.patch
32 Patch4:         svnversion.patch
33 URL:            http://doomlegacy.sourceforge.net/
34 BuildRequires:  OpenGL-GLU-devel
35 %{?with_sdl:BuildRequires:      SDL_mixer-devel}
36 BuildRequires:  nasm
37 BuildRequires:  rpmbuild(macros) >= 1.595
38 BuildRequires:  unzip
39 BuildRequires:  xorg-lib-libXext-devel
40 ExclusiveArch:  %{ix86} %{x8664} x32
41 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
42
43 %define         debugcflags             -O1 -g
44 %define         _noautoreqdep   libGL.so.1 libGLU.so.1
45
46 %description
47 DOOM Legacy for Linux.
48
49 %description -l pl.UTF-8
50 DOOM Legacy dla Linuksa.
51
52 %package common
53 Summary:        DOOM Legacy for Linux - common files
54 Summary(pl.UTF-8):      DOOM Legacy dla Linuksa - pliki wspólne
55 Group:          X11/Applications/Games
56
57 %description common
58 Common files for both versions of DOOM Legacy.
59
60 %description common -l pl.UTF-8
61 Pliki wspólne dla obu wersji DOOM Legacy.
62
63 %package X11
64 Summary:        DOOM Legacy for Linux - X Window and OpenGL version
65 Summary(pl.UTF-8):      DOOM Legacy dla Linuksa - wersja korzystająca z X Window i OpenGL
66 Group:          X11/Applications/Games
67 Requires:       %{name}-common = %{version}-%{release}
68 Obsoletes:      doomlegacy-x11
69
70 %description X11
71 This is DOOM Legacy for Linux - X11 and OpenGL version.
72
73 %description X11 -l pl.UTF-8
74 To jest DOOM Legacy dla Linuksa - wersja korzystająca z X Window i
75 OpenGL.
76
77 %package sdl
78 Summary:        DOOM Legacy for Linux - SDL version
79 Summary(pl.UTF-8):      DOOM Legacy dla Linuksa - wersja korzystająca z SDL
80 Group:          X11/Applications/Games
81 Requires:       %{name}-common = %{version}-%{release}
82
83 %description sdl
84 This is DOOM Legacy for Linux - SDL version.
85
86 %description sdl -l pl.UTF-8
87 To jest DOOM Legacy dla Linuksa - wersja SDL.
88
89 %prep
90 %setup -qc
91 mv doomlegacy_144_alpha2 src
92 cd src
93 %patch0 -p1
94 %patch1 -p2
95 %patch2 -p1
96 %patch3 -p1
97 cd -
98 %patch4 -p1
99 echo %{svnrev} > src/svnrev.txt
100
101 %build
102 install -d objs bin src/linux_x/{mus,snd}serv/linux
103 cd src
104
105 # build musserv/sndserv first. with our flags
106 %{__make} -C linux_x/musserv -f Makefile.linux \
107         CC="%{__cc}" \
108         OPTFLAGS="%{rpmcflags} %{!?debug:-fomit-frame-pointer}"
109         LDFLAGS="%{rpmldflags}"
110 install -p linux_x/musserv/linux/musserver ../bin
111
112 %{__make} -C linux_x/sndserv \
113         CC="%{__cc}" \
114         OPTFLAGS="%{rpmcflags} %{!?debug:-fomit-frame-pointer}"
115         LDFLAGS="%{rpmldflags}"
116 install -p linux_x/sndserv/linux/llsndserv ../bin
117
118 %if %{with sdl}
119 %{__make} -j1 \
120         SMIF=SDL \
121         CC="%{__cc}" \
122         LDFLAGS="%{rpmldflags}" \
123         OPTFLAGS="%{rpmcflags} %{!?debug:-fomit-frame-pointer}"
124 %endif
125
126 %if %{with x11}
127 %{__make} clean
128 %{__make} \
129         SMIF=LINUX_X11 \
130         CC="%{__cc}" \
131         LDFLAGS="%{rpmldflags}" \
132         OPTFLAGS="%{rpmcflags} %{!?debug:-fomit-frame-pointer}"
133 %endif
134
135 %install
136 rm -rf $RPM_BUILD_ROOT
137 install -d $RPM_BUILD_ROOT{%{_bindir},%{_libdir}/doomlegacy,%{_datadir}/doomlegacy} \
138         $RPM_BUILD_ROOT{%{_pixmapsdir},%{_desktopdir}}
139
140 install -p bin/llsndserv $RPM_BUILD_ROOT%{_libdir}/doomlegacy
141 install -p bin/musserver $RPM_BUILD_ROOT%{_libdir}/doomlegacy
142
143 %if %{with x11}
144 install -p bin/llxdoom  $RPM_BUILD_ROOT%{_bindir}
145 install -p bin/r_opengl.so      $RPM_BUILD_ROOT%{_libdir}/doomlegacy
146 cp -p %{SOURCE4} $RPM_BUILD_ROOT%{_desktopdir}
147 %endif
148 %if %{with sdl}
149 install -p bin/doomlegacy $RPM_BUILD_ROOT%{_bindir}
150 cp -p %{SOURCE5} $RPM_BUILD_ROOT%{_desktopdir}
151 %endif
152
153 cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_datadir}/doomlegacy/legacy.wad
154 cp -p %{SOURCE6} $RPM_BUILD_ROOT%{_pixmapsdir}
155
156 %clean
157 rm -rf $RPM_BUILD_ROOT
158
159 %post common
160 %banner -o -e %{name}-common <<'EOF'
161 To run doomlegacy you need some WAD file: either freedoom package
162 or some shareware or commercial WAD from Doom or Heretic:
163 Doom.wad, Doom1.wad, Doom2.wad, Tnt.wad, Plutonia.wad,
164 Heretic.wad or Heretic1.wad .
165 EOF
166
167 %files common
168 %defattr(644,root,root,755)
169 %doc src/_doc/*.txt
170 %dir %{_libdir}/doomlegacy
171 %attr(755,root,root) %{_libdir}/doomlegacy/*serv*
172 %{_datadir}/doomlegacy
173 %{_pixmapsdir}/*.png
174
175 %if %{with x11}
176 %files X11
177 %defattr(644,root,root,755)
178 %attr(755,root,root) %{_bindir}/llxdoom
179 %attr(755,root,root) %{_libdir}/doomlegacy/r_opengl.so
180 %{_desktopdir}/*x11.desktop
181 %endif
182
183 %if %{with sdl}
184 %files sdl
185 %defattr(644,root,root,755)
186 %attr(755,root,root) %{_bindir}/doomlegacy
187 %{_desktopdir}/*sdl.desktop
188 %endif
This page took 0.046372 seconds and 4 git commands to generate.