]> git.pld-linux.org Git - packages/wine.git/blob - wine.spec
- partial sync with HEAD (binfmt-detector, -ncurses.patch)
[packages/wine.git] / wine.spec
1 #
2 # Conditional build:
3 %bcond_without  alsa            # don't build ALSA mm driver
4 %bcond_without  arts            # don't build aRts mm driver
5 %bcond_without  jack            # don't build JACK mm driver
6 %bcond_without  nas             # don't build NAS mm driver
7 %bcond_without  sane            # don't build TWAIN DLL with scanning support (through SANE)
8 %bcond_without  cups            # without CUPS printing support in winspool,wineps DLLs
9 #
10 # NOTE: wine detects the following SONAMES for dlopen at build time:
11 #   libcrypto,libssl (wininet.dll)
12 #   libcups (winspool.dll.so,wineps.dll.so)
13 #   libcurses/libncurses (wineconsole program)
14 #   libfontconfig (gdi32.dll.so)
15 #   libfreetype (wineps.dll.so,gdi32.dll.so)
16 #   libGL (x11drv.dll.so,ddraw.dll.so)
17 #   libjack (winejack.drv.so - explicit dependency in subpackage)
18 #   libX11, libXext, libXi, libXrender (x11drv.dll.so)
19 # thus requires rebuild after change of any of the above.
20 #
21 # JACK requires ALSA
22 %if %{without alsa}
23 %undefine       with_jack
24 %endif
25 Summary:        Program that lets you launch Win applications
26 Summary(es):    Ejecuta programas Windows en Linux
27 Summary(pl):    Program pozwalaj±cy uruchamiaæ aplikacje Windows
28 Summary(pt_BR): Executa programas Windows no Linux
29 Name:           wine
30 Version:        0.9.15
31 Release:        1
32 Epoch:          1
33 License:        LGPL
34 Group:          Applications/Emulators
35 Source0:        http://ibiblio.org/pub/linux/system/emulators/wine/%{name}-%{version}.tar.bz2
36 # Source0-md5:  bfd0d01b04010ae0e6ca374ab8c23eeb
37 Patch0:         %{name}-fontcache.patch
38 Patch1:         %{name}-makedep.patch
39 Patch2:         %{name}-alsa.patch
40 Patch3:         %{name}-ncurses.patch
41 #PatchX:                %{name}-dga.patch
42 URL:            http://www.winehq.org/
43 BuildRequires:  OpenGL-devel
44 BuildRequires:  XFree86-devel
45 %{?with_alsa:BuildRequires:     alsa-lib-devel}
46 %{?with_arts:BuildRequires:     artsc-devel}
47 BuildRequires:  autoconf
48 BuildRequires:  automake
49 BuildRequires:  bison
50 # BuildRequires:        chpax >= 0.20020901-2
51 %{?with_cups:BuildRequires:     cups-devel}
52 BuildRequires:  docbook-dtd31-sgml
53 BuildRequires:  docbook-utils
54 BuildRequires:  flex
55 BuildRequires:  fontconfig-devel
56 BuildRequires:  fontforge
57 BuildRequires:  freetype-devel >= 2.0.5
58 BuildRequires:  glut-devel
59 %{?with_jack:BuildRequires:     jack-audio-connection-kit-devel}
60 BuildRequires:  libjpeg-devel
61 BuildRequires:  libtool
62 BuildRequires:  libungif-devel
63 %{?with_nas:BuildRequires:      nas-devel}
64 BuildRequires:  ncurses-devel
65 # db2* failed previously - probably openjade or opensp bug
66 BuildRequires:  openjade >= 1:1.3.3-0.pre1
67 BuildRequires:  opensp >= 1:1.5.1
68 BuildRequires:  openssl-devel >= 0.9.7d
69 %{?with_sane:BuildRequires:     sane-backends-devel}
70 BuildRequires:  xrender-devel
71 Requires(post,postun):  /sbin/ldconfig
72 Requires:       binfmt-detector
73 # link to wine/ntdll.dll.so, without any SONAME
74 Provides:       libntdll.dll.so
75 ExclusiveArch:  %{ix86}
76 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
77
78 %define         _noautoreqdep           libGL.so.1 libGLU.so.1
79 %define         no_install_post_strip   1
80
81 %define         _winedir                %{_datadir}/%{name}
82
83 %define         getsoname()     %((objdump -p %{1} 2>/dev/null || echo SONAME ERROR) | awk '/SONAME/ { print $2; s=1 }; END { if(s==0) print "ERROR" }')
84
85 %description
86 Wine is a program which allows running Microsoft Windows programs
87 (including DOS, Windows 3.x and Win32 executables) on Unix. It
88 consists of a program loader which loads and executes a Microsoft
89 Windows binary, and a library that implements Windows API calls using
90 their Unix or X11 equivalents. The library may also be used for
91 porting Win32 code into native Unix executables.
92
93 %description -l es
94 Ejecuta programas Windows en Linux.
95
96 %description -l pl
97 Wine jest programem dziêki któremu mo¿na uruchamiaæ programy napisane
98 dla Microsoft Windows pod systemami uniksowymi. Sk³ada siê on z
99 loadera, który pozwala wczytywaæ i uruchamiaæ programy w formacie
100 Microsoft Windows, oraz z biblioteki, która implementuje API Windows
101 przy u¿yciu odpowiedników uniksowych oraz z X11. Biblioteka mo¿e byæ
102 tak¿e wykorzystana do przenoszenia aplikacji Win32 do Uniksa.
103
104 %description -l pt_BR
105 O Wine é um programa que permite rodar programas MS-Windows no X11.
106 Ele consiste de um carregador de programa, que carrega e executa um
107 binário MS-Windows, e de uma biblioteca de emulação que traduz as
108 chamadas da API para as equivalentes Unix/X11.
109
110 %package devel
111 Summary:        Wine - header files
112 Summary(es):    Biblioteca de desarrollo de wine
113 Summary(pl):    Wine - pliki nag³owkowe
114 Summary(pt_BR): Biblioteca de desenvolvimento do wine
115 Group:          Development/Libraries
116 Requires:       %{name} = %{epoch}:%{version}-%{release}
117
118 %description devel
119 Wine - header files.
120
121 %description devel -l es
122 Biblioteca de desarrollo de wine.
123
124 %description devel -l pl
125 Wine - pliki nag³ówkowe.
126
127 %description devel -l pt_BR
128 Arquivos de inclusão e bibliotecas para desenvolver aplicações com o
129 WINE.
130
131 %package programs
132 Summary:        Wine - programs
133 Summary(pl):    Wine - programy
134 Group:          Applications
135 Requires:       %{name} = %{epoch}:%{version}-%{release}
136
137 %description programs
138 Wine - programs.
139
140 %description programs -l pl
141 Wine - programy.
142
143 %package dll-d3d
144 Summary:        Direct3D implementation DLLs for Wine
145 Summary(pl):    Biblioteki DLL z implementacj± Direct3D dla Wine
146 Group:          Applications/Emulators
147 Requires:       %{name} = %{epoch}:%{version}-%{release}
148 Requires:       OpenGL
149
150 %description dll-d3d
151 Direct3D implementation DLLs for Wine (through OpenGL).
152
153 %description dll-d3d -l pl
154 Biblioteki DLL z implementacj± Direct3D dla Wine (poprzez OpenGL).
155
156 %package dll-gl
157 Summary:        OpenGL implementation DLLs for Wine
158 Summary(pl):    Biblioteki DLL z implementacj± OpenGL dla Wine
159 Group:          Applications/Emulators
160 Requires:       %{name} = %{epoch}:%{version}-%{release}
161 Requires:       OpenGL
162
163 %description dll-gl
164 OpenGL implementation DLLs for Wine.
165
166 %description dll-gl -l pl
167 Biblioteki DLL z implementacj± OpenGL dla Wine.
168
169 %package dll-twain
170 Summary:        TWAIN implementation DLL for Wine
171 Summary(pl):    Biblioteka DLL z implementacj± TWAIN dla Wine
172 Group:          Applications/Emulators
173 Requires:       %{name} = %{epoch}:%{version}-%{release}
174
175 %description dll-twain
176 TWAIN implementation DLL for Wine (through SANE).
177
178 %description dll-twain -l pl
179 Biblioteka DLL z implementacj± TWAIN dla Wine (poprzez SANE).
180
181 %package drv-alsa
182 Summary:        ALSA driver for WINE mm.dll implementation
183 Summary(pl):    Sterownik ALSA dla implementacji mm.dll w Wine
184 Group:          Applications/Emulators
185 Requires:       %{name} = %{epoch}:%{version}-%{release}
186
187 %description drv-alsa
188 ALSA driver for WINE mm.dll (multimedia system) implementation.
189
190 %description drv-alsa -l pl
191 Sterownik ALSA dla implementacji mm.dll (systemu multimediów) w Wine.
192
193 %package drv-arts
194 Summary:        aRts driver for WINE mm.dll implementation
195 Summary(pl):    Sterownik aRts dla implementacji mm.dll w Wine
196 Group:          Applications/Emulators
197 Requires:       %{name} = %{epoch}:%{version}-%{release}
198
199 %description drv-arts
200 aRts driver for WINE mm.dll (multimedia system) implementation.
201
202 %description drv-arts -l pl
203 Sterownik aRts dla implementacji mm.dll (systemu multimediów) w Wine.
204
205 %package drv-jack
206 Summary:        JACK driver for WINE mm.dll implementation
207 Summary(pl):    Sterownik JACK-a dla implementacji mm.dll w Wine
208 Group:          Applications/Emulators
209 Requires:       %{name} = %{epoch}:%{version}-%{release}
210 Requires:       jack-audio-connection-kit
211 # dlopened by SONAME detected at build time
212 %{?with_jack:Requires:  %{getsoname /usr/%{_lib}/libjack.so}}
213
214 %description drv-jack
215 JACK driver for WINE mm.dll (multimedia system) implementation.
216
217 %description drv-jack -l pl
218 Sterownik JACK-a dla implementacji mm.dll (systemu multimediów) w
219 Wine.
220
221 %package drv-nas
222 Summary:        NAS driver for WINE mm.dll implementation
223 Summary(pl):    Sterownik NAS dla implementacji mm.dll w Wine
224 Group:          Applications/Emulators
225 Requires:       %{name} = %{epoch}:%{version}-%{release}
226
227 %description drv-nas
228 NAS driver for WINE mm.dll (multimedia system) implementation.
229
230 %description drv-nas -l pl
231 Sterownik NAS dla implementacji mm.dll (systemu multimediów) w Wine.
232
233 %prep
234 %setup -q
235 %patch0 -p1
236 %patch1 -p1
237 %patch2 -p1
238 %patch3 -p1
239
240 # turn off compilation of some tools
241 sed -i -e "s|winetest \\\|\\\|;s|avitools||" programs/Makefile.in
242 #sed -i -e "s|avitools||" programs/Makefile.in
243
244 %build
245 %{__autoconf}
246 %{__autoheader}
247 %configure \
248         %{!?debug:--disable-debug} \
249         %{!?debug:--disable-trace} \
250         --enable-curses \
251         --enable-opengl \
252         --with-x
253 %{__make} depend
254 %{__make}
255 %{__make} -C programs
256 #%{__make} -C programs/regapi
257
258 %install
259 rm -rf $RPM_BUILD_ROOT
260 install -d $RPM_BUILD_ROOT{%{_mandir}/man1,%{_aclocaldir}}
261
262 %{__make} install \
263         DESTDIR=$RPM_BUILD_ROOT
264
265 %{__make} -C programs install \
266         DESTDIR=$RPM_BUILD_ROOT
267
268 install tools/fnt2bdf                   $RPM_BUILD_ROOT%{_bindir}
269
270 install aclocal.m4 $RPM_BUILD_ROOT%{_aclocaldir}/wine.m4
271 #mv -f $RPM_BUILD_ROOT{/usr/X11R6/share/aclocal,%{_aclocaldir}}/wine.m4
272
273 install -d \
274         $RPM_BUILD_ROOT%{_winedir}/windows/{system,Desktop,Favorites,Fonts} \
275         "$RPM_BUILD_ROOT%{_winedir}/windows/Start Menu/Programs/Startup" \
276         $RPM_BUILD_ROOT%{_winedir}/windows/{SendTo,ShellNew,system32,NetHood} \
277         $RPM_BUILD_ROOT%{_winedir}/windows/{Profiles/Administrator,Recent} \
278         $RPM_BUILD_ROOT%{_winedir}/{"Program Files/Common Files","My Documents"}
279
280 touch $RPM_BUILD_ROOT%{_winedir}/{autoexec.bat,config.sys,windows/win.ini}
281 touch $RPM_BUILD_ROOT%{_winedir}/windows/system/{shell.dll,shell32.dll}
282 touch $RPM_BUILD_ROOT%{_winedir}/windows/system/{winsock.dll,wsock32.dll}
283
284 cat >$RPM_BUILD_ROOT%{_winedir}/windows/system.ini <<EOF
285 [mci]
286 cdaudio=mcicda.drv
287 sequencer=mciseq.drv
288 waveaudio=mciwave.drv
289 avivideo=mciavi.drv
290 videodisc=mcipionr.drv
291 vcr=mciviscd.drv
292 MPEGVideo=mciqtz.drv
293 EOF
294
295 %if %{?debug:0}%{!?debug:1}
296 echo "Strip executable binaries and shared object files."
297 filelist=`find $RPM_BUILD_ROOT -type f ! -regex ".*ld-[0-9.]*so.*"`
298 elfexelist=`echo $filelist | xargs -r file | \
299         awk '/ELF.*executable/ {print $1}' | cut -d: -f1`
300 elfsharedlist=`echo $filelist | xargs -r file | \
301         awk '/LF.*shared object/ {print $1}' | cut -d: -f1`; \
302 if [ -n "$elfexelist" ]; then \
303         strip -R .note -R .comment $elfexelist
304 fi
305 if [ -n "$elfsharedlist" ]; then
306         strip --strip-unneeded -R .note -R .comment $elfsharedlist
307 fi
308 %endif
309
310 # /sbin/chstk -e $RPM_BUILD_ROOT%{_bindir}/wine
311
312 programs="notepad progman regedit regsvr32 uninstaller wineconsole winefile winemine winepath winhelp wcmd"
313
314 BZZZ=`pwd`
315 rm -f files.so;         touch files.so
316 rm -f files.programs;   touch files.programs
317 cd $RPM_BUILD_ROOT%{_libdir}/wine
318 for f in *.so; do
319         case $f in
320                 d3d8.dll.so|d3d9.dll.so|d3dx8.dll.so|glu32.dll.so|glut32.dll.so|opengl32.dll.so|sane.ds.so|twain.dll.so|twain_32.dll.so|winealsa.drv.so|winearts.drv.so|winejack.drv.so|winenas.drv.so)
321                         ;;
322                 *)
323                         echo "%attr(755,root,root) %{_libdir}/wine/$f" >>$BZZZ/files.so
324         esac
325 done
326 cd -
327 for p in $programs; do
328         echo "%attr(755,root,root) %{_bindir}/$p" >> files.programs
329         echo "%attr(755,root,root) %{_libdir}/wine/$p.exe.so" >> files.programs
330         grep -v "$p\.exe\.so$" files.so > files.so.
331         mv -f files.so. files.so
332 done
333
334 %clean
335 rm -rf $RPM_BUILD_ROOT
336
337 %post   -p /sbin/ldconfig
338 %postun -p /sbin/ldconfig
339
340 %triggerpostun -- wine < 1:0.9.15
341 if [ -f /var/lock/subsys/wine ]; then
342         /etc/rc.d/init.d/wine stop >&2
343 fi
344 if [ -x /sbin/chkconfig ]; then
345         /sbin/chkconfig --del wine
346 fi
347
348 %files -f files.so
349 %defattr(644,root,root,755)
350 %doc README DEVELOPERS-HINTS ChangeLog AUTHORS ANNOUNCE
351 %lang(de) %doc documentation/README.de
352 %lang(es) %doc documentation/README.es
353 %lang(fr) %doc documentation/README.fr
354 %lang(it) %doc documentation/README.it
355 %lang(ko) %doc documentation/README.ko
356 %lang(nb) %doc documentation/README.no
357 %lang(pt) %doc documentation/README.pt
358 %lang(pt_BR) %doc documentation/README.pt_br
359
360 %attr(755,root,root) %{_bindir}/msiexec
361 %attr(755,root,root) %{_bindir}/wine
362 %attr(755,root,root) %{_bindir}/wineboot
363 %attr(755,root,root) %{_bindir}/winebrowser
364 %attr(755,root,root) %{_bindir}/winecfg
365 %attr(755,root,root) %{_bindir}/winedbg
366 %attr(755,root,root) %{_bindir}/wine-kthread
367 %attr(755,root,root) %{_bindir}/winelauncher
368 %attr(755,root,root) %{_bindir}/wineprefixcreate
369 %attr(755,root,root) %{_bindir}/wine-preloader
370 %attr(755,root,root) %{_bindir}/wine-pthread
371 %attr(755,root,root) %{_bindir}/wineserver
372 %attr(755,root,root) %{_bindir}/wineshelllink
373 %attr(755,root,root) %{_libdir}/*.so*
374 %dir %{_libdir}/wine
375 %{_libdir}/wine/*.dll16
376 %{_libdir}/wine/*.drv16
377 %{_libdir}/wine/*.exe16
378 %{_mandir}/man1/wine.*
379 %{_mandir}/man1/winedbg.1*
380 %{_mandir}/man1/wineserver.*
381 %{_winedir}
382 %{_desktopdir}/wine.desktop
383
384 %files programs -f files.programs
385 %defattr(644,root,root,755)
386
387 %files devel
388 %defattr(644,root,root,755)
389 %attr(755,root,root) %{_bindir}/fnt2bdf
390 %attr(755,root,root) %{_bindir}/function_grep.pl
391 %attr(755,root,root) %{_bindir}/widl
392 %attr(755,root,root) %{_bindir}/winebuild
393 %attr(755,root,root) %{_bindir}/winedump
394 %attr(755,root,root) %{_bindir}/wineg++
395 %attr(755,root,root) %{_bindir}/winegcc
396 %attr(755,root,root) %{_bindir}/winemaker
397 #%attr(755,root,root) %{_bindir}/winewrap
398 %attr(755,root,root) %{_bindir}/wmc
399 %attr(755,root,root) %{_bindir}/wrc
400 %{_libdir}/wine/lib*.def
401 # no shared variants, so not separated
402 %{_libdir}/wine/lib*.def.a
403 %{_libdir}/wine/libdx*.a
404 %{_libdir}/wine/libstrmiids.a
405 %{_libdir}/wine/libuuid.a
406 %{_libdir}/wine/libwinecrt0.a
407 %{_includedir}/wine
408 %{_mandir}/man1/widl.1*
409 %{_mandir}/man1/winedump.1*
410 %{_mandir}/man1/winegcc.1*
411 %{_mandir}/man1/winemaker.1*
412 %{_mandir}/man1/winebuild.1*
413 %{_mandir}/man1/wmc.1*
414 %{_mandir}/man1/wrc.1*
415 %{_aclocaldir}/*.m4
416
417 %files dll-d3d
418 %defattr(644,root,root,755)
419 %attr(755,root,root) %{_libdir}/wine/d3d8.dll.so
420 %attr(755,root,root) %{_libdir}/wine/d3d9.dll.so
421 %attr(755,root,root) %{_libdir}/wine/d3dx8.dll.so
422 %attr(755,root,root) %{_libdir}/wine/wined3d.dll.so
423
424 %files dll-gl
425 %defattr(644,root,root,755)
426 %attr(755,root,root) %{_libdir}/wine/glu32.dll.so
427 %attr(755,root,root) %{_libdir}/wine/glut32.dll.so
428 %attr(755,root,root) %{_libdir}/wine/opengl32.dll.so
429
430 %if %{with sane}
431 %files dll-twain
432 %defattr(644,root,root,755)
433 %attr(755,root,root) %{_libdir}/wine/sane.ds.so
434 %attr(755,root,root) %{_libdir}/wine/twain*.dll.so
435 %endif
436
437 %if %{with alsa}
438 %files drv-alsa
439 %defattr(644,root,root,755)
440 %attr(755,root,root) %{_libdir}/wine/winealsa.drv.so
441 %endif
442
443 %if %{with arts}
444 %files drv-arts
445 %defattr(644,root,root,755)
446 %attr(755,root,root) %{_libdir}/wine/winearts.drv.so
447 %endif
448
449 %if %{with jack}
450 %files drv-jack
451 %defattr(644,root,root,755)
452 %attr(755,root,root) %{_libdir}/wine/winejack.drv.so
453 %endif
454
455 %if %{with nas}
456 %files drv-nas
457 %defattr(644,root,root,755)
458 %attr(755,root,root) %{_libdir}/wine/winenas.drv.so
459 %endif
460
461 # additional dependencies in *.so not separated (yet?) from main package
462 #   ddraw.dll.so,x11drv.dll.so depend on X11 libs
463 #   ole2disp.dll.so,oleaut32.dll.so,typelib.dll.so depend on lib(un)gif,libjpeg,libX11
464 #   ttydrv.dll.so depends on ncurses
This page took 0.064678 seconds and 3 git commands to generate.