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_with 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 %bcond_without html_docs # build html docs
10 %bcond_without pdf_docs # build pdf docs
12 # NOTE: wine detects following SONAMES for dlopen at build time:
13 # libcrypto,libssl (wininet.dll)
14 # libcups (winspool.dll.so,wineps.dll.so)
15 # libcurses/libncurses (wineconsole program)
16 # libfontconfig (gdi32.dll.so)
17 # libfreetype (wineps.dll.so,gdi32.dll.so)
18 # libGL (x11drv.dll.so,ddraw.dll.so)
19 # libjack (winejack.drv.so - explicit dependency in subpackage)
20 # libX11, libXext, libXrender (x11drv.dll.so)
21 # thus requires requild after change of any of above.
27 Summary: Program that lets you launch Win applications
28 Summary(es): Ejecuta programas Windows en Linux
29 Summary(pl): Program pozwalaj±cy uruchamiaæ aplikacje Windows
30 Summary(pt_BR): Executa programas Windows no Linux
35 Group: Applications/Emulators
36 Source0: http://dl.sf.net/wine/Wine-%{version}.tar.gz
37 # Source0-md5: eaac8e7f9864d4c4069cfb2b202e22a5
40 Source3: %{name}.systemreg
41 Source4: %{name}.userreg
42 Patch0: %{name}-fontcache.patch
43 Patch1: %{name}-destdir.patch
44 Patch2: %{name}-ncurses.patch
45 Patch3: %{name}-ac-ksh.patch
46 Patch4: %{name}-binutils.patch
47 Patch5: %{name}-makedep.patch
48 Patch6: %{name}-dga.patch
49 Patch7: %{name}-winebuild.patch
50 URL: http://www.winehq.org/
51 BuildRequires: OpenGL-devel
52 BuildRequires: XFree86-devel
53 %{?with_alsa:BuildRequires: alsa-lib-devel}
54 %{?with_arts:BuildRequires: artsc-devel}
55 BuildRequires: autoconf
56 BuildRequires: automake
58 # BuildRequires: chpax >= 0.20020901-2
59 %{?with_cups:BuildRequires: cups-devel}
60 BuildRequires: docbook-dtd31-sgml
61 BuildRequires: docbook-utils
63 BuildRequires: fontconfig-devel
64 BuildRequires: freetype-devel >= 2.0.5
65 %{?with_jack:BuildRequires: jack-audio-connection-kit-devel}
66 BuildRequires: libjpeg-devel
67 BuildRequires: libungif-devel
68 %{?with_nas:BuildRequires: nas-devel}
69 BuildRequires: ncurses-devel
70 %if %{with html_docs} || %{with pdf_docs}
71 # db2* failed previously - probably openjade or opensp bug
72 BuildRequires: openjade >= 1:1.3.3-0.pre1
73 BuildRequires: opensp >= 1:1.5.1
75 BuildRequires: openssl-devel
77 BuildRequires: tetex-metafont
78 BuildRequires: tetex-fonts-pazo
79 BuildRequires: tetex-fonts-stmaryrd
80 BuildRequires: tetex-fonts-type1-urw
82 %{?with_sane:BuildRequires: sane-backends-devel}
83 BuildRequires: xrender-devel
84 Requires(post): /sbin/ldconfig
85 Requires(post,preun): /sbin/chkconfig
86 # link to wine/ntdll.dll.so, without any SONAME
87 Provides: libntdll.dll.so
88 ExclusiveArch: %{ix86}
89 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
91 %define _noautoreqdep libGL.so.1 libGLU.so.1
92 %define no_install_post_strip 1
94 %define _winedir %{_datadir}/%{name}
96 %define getsoname() %((objdump -p %{1} 2>/dev/null || echo SONAME ERROR) | awk '/SONAME/ { print $2 }')
99 Wine is a program which allows running Microsoft Windows programs
100 (including DOS, Windows 3.x and Win32 executables) on Unix. It
101 consists of a program loader which loads and executes a Microsoft
102 Windows binary, and a library that implements Windows API calls using
103 their Unix or X11 equivalents. The library may also be used for
104 porting Win32 code into native Unix executables.
107 Ejecuta programas Windows en Linux.
110 Wine jest programem dziêki któremu mo¿na uruchamiaæ programy napisane
111 dla Microsoft Windows pod systemami unixowymi. Sk³ada siê on z
112 loadera, który pozwala wczytywaæ i uruchamiaæ programy w formacie
113 Microsoft Windows oraz z biblioteki, która implementuje API Windows
114 przy u¿yciu odpowiedników Unixowych oraz z X11. Biblioteka mo¿e byæ
115 tak¿e wykorzystana do przenoszenia aplikacji Win32 do Unixa.
117 %description -l pt_BR
118 O Wine é um programa que permite rodar programas MS-Windows no X11.
119 Ele consiste de um carregador de programa, que carrega e executa um
120 binário MS-Windows, e de uma biblioteca de emulação que traduz as
121 chamadas da API para as equivalentes Unix/X11.
124 Summary: Wine - header files
125 Summary(es): Biblioteca de desarrollo de wine
126 Summary(pl): Wine - pliki nag³owkowe
127 Summary(pt_BR): Biblioteca de desenvolvimento do wine
128 Group: Development/Libraries
129 Requires: %{name} = %{version}
134 %description devel -l es
135 Biblioteca de desarrollo de wine.
137 %description devel -l pl
138 Wine - pliki nag³ówkowe.
140 %description devel -l pt_BR
141 Arquivos de inclusão e bibliotecas para desenvolver aplicações com o
145 Summary: Wine - programs
146 Summary(pl): Wine - programy
148 Requires: %{name} = %{version}
150 %description programs
153 %description programs -l pl
157 Summary: Wine documentation in PDF
158 Summary(pl): Dokumentacja Wine w formacie PDF
162 Wine documentation in PDF format.
164 %description doc-pdf -l pl
165 Dokumentacja Wine w formacie PDF.
168 Summary: Direct3D implementation DLLs for Wine
169 Summary(pl): Biblioteki DLL z implementacj± Direct3D dla Wine
170 Group: Applications/Emulators
171 Requires: %{name} = %{version}
175 Direct3D implementation DLLs for Wine (through OpenGL).
177 %description dll-d3d -l pl
178 Biblioteki DLL z implementacj± Direct3D dla Wine (poprzez OpenGL).
181 Summary: OpenGL implementation DLLs for Wine
182 Summary(pl): Biblioteki DLL z implementacj± OpenGL dla Wine
183 Group: Applications/Emulators
184 Requires: %{name} = %{version}
188 OpenGL implementation DLLs for Wine.
190 %description dll-gl -l pl
191 Biblioteki DLL z implementacj± OpenGL dla Wine.
194 Summary: TWAIN implementation DLL for Wine
195 Summary(pl): Biblioteka DLL z implementacj± TWAIN dla Wine
196 Group: Applications/Emulators
197 Requires: %{name} = %{version}
199 %description dll-twain
200 TWAIN implementation DLL for Wine (through SANE).
202 %description dll-twain -l pl
203 Biblioteka DLL z implementacj± TWAIN dla Wine (poprzez SANE).
206 Summary: ALSA driver for WINE mm.dll implementation
207 Summary(pl): Sterownik ALSA dla implementacji mm.dll w Wine
208 Group: Applications/Emulators
209 Requires: %{name} = %{version}
211 %description drv-alsa
212 ALSA driver for WINE mm.dll (multimedia system) implementation.
214 %description drv-alsa -l pl
215 Sterownik ALSA dla implementacji mm.dll (systemu multimediów) w Wine.
218 Summary: aRts driver for WINE mm.dll implementation
219 Summary(pl): Sterownik aRts dla implementacji mm.dll w Wine
220 Group: Applications/Emulators
221 Requires: %{name} = %{version}
223 %description drv-arts
224 aRts driver for WINE mm.dll (multimedia system) implementation.
226 %description drv-arts -l pl
227 Sterownik aRts dla implementacji mm.dll (systemu multimediów) w Wine.
230 Summary: JACK driver for WINE mm.dll implementation
231 Summary(pl): Sterownik JACK dla implementacji mm.dll w Wine
232 Group: Applications/Emulators
233 Requires: %{name} = %{version}
234 Requires: jack-audio-connection-kit
235 # dlopened by SONAME detected at build time
237 Requires: %{getsoname /usr/lib/libjack.so}
240 %description drv-jack
241 JACK driver for WINE mm.dll (multimedia system) implementation.
243 %description drv-jack -l pl
244 Sterownik JACK dla implementacji mm.dll (systemu multimediów) w Wine.
247 Summary: NAS driver for WINE mm.dll implementation
248 Summary(pl): Sterownik NAS dla implementacji mm.dll w Wine
249 Group: Applications/Emulators
250 Requires: %{name} = %{version}
253 NAS driver for WINE mm.dll (multimedia system) implementation.
255 %description drv-nas -l pl
256 Sterownik NAS dla implementacji mm.dll (systemu multimediów) w Wine.
269 # turn off compilation of some tools
270 #sed -e "s|winetest \\\|\\\|;s|avitools||" programs/Makefile.in > .tmp
271 sed -e "s|avitools||" programs/Makefile.in > .tmp
272 mv -f .tmp programs/Makefile.in
277 CPPFLAGS="-I/usr/include/ncurses -DALSA_PCM_OLD_HW_PARAMS_API"; export CPPFLAGS
278 CFLAGS="%{rpmcflags} $CPPFLAGS"
280 %{!?debug:--disable-debug} \
281 %{!?debug:--disable-trace} \
287 %{__make} -C programs
288 %{__make} -C programs/regapi
291 %if %{with html_docs}
292 db2html wine-user.sgml
293 db2html wine-devel.sgml
294 db2html wine-faq.sgml
295 db2html winelib-user.sgml
299 db2pdf wine-user.sgml
300 db2pdf wine-devel.sgml
302 db2pdf winelib-user.sgml
307 rm -rf $RPM_BUILD_ROOT
308 install -d $RPM_BUILD_ROOT{%{_mandir}/man1,%{_aclocaldir}}
311 DESTDIR=$RPM_BUILD_ROOT
313 %{__make} -C programs install \
314 DESTDIR=$RPM_BUILD_ROOT
316 install programs/winhelp/hlp2sgml $RPM_BUILD_ROOT%{_bindir}
317 install tools/fnt2bdf $RPM_BUILD_ROOT%{_bindir}
319 install aclocal.m4 $RPM_BUILD_ROOT%{_aclocaldir}/wine.m4
320 #mv -f $RPM_BUILD_ROOT{/usr/X11R6/share/aclocal,%{_aclocaldir}}/wine.m4
322 install -d $RPM_BUILD_ROOT%{_sysconfdir}/rc.d/init.d \
323 $RPM_BUILD_ROOT%{_winedir}/windows/{system,Desktop,Favorites,Fonts} \
324 "$RPM_BUILD_ROOT%{_winedir}/windows/Start Menu/Programs/Startup" \
325 $RPM_BUILD_ROOT%{_winedir}/windows/{SendTo,ShellNew,system32,NetHood} \
326 $RPM_BUILD_ROOT%{_winedir}/windows/{Profiles/Administrator,Recent} \
327 $RPM_BUILD_ROOT%{_winedir}/{"Program Files/Common Files","My Documents"}
329 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/wine
330 install %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}
331 install %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}
332 install %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}
334 touch $RPM_BUILD_ROOT%{_winedir}/{autoexec.bat,config.sys,windows/win.ini}
335 touch $RPM_BUILD_ROOT%{_winedir}/windows/system/{shell.dll,shell32.dll}
336 touch $RPM_BUILD_ROOT%{_winedir}/windows/system/{winsock.dll,wsock32.dll}
338 cat >$RPM_BUILD_ROOT%{_winedir}/windows/system.ini <<EOF
342 waveaudio=mciwave.drv
344 videodisc=mcipionr.drv
349 %if %{?debug:0}%{!?debug:1}
350 echo "Strip executable binaries and shared object files."
351 filelist=`find $RPM_BUILD_ROOT -type f ! -regex ".*ld-[0-9.]*so.*"`
352 elfexelist=`echo $filelist | xargs -r file | \
353 awk '/ELF.*executable/ {print $1}' | cut -d: -f1`
354 elfsharedlist=`echo $filelist | xargs -r file | \
355 awk '/LF.*shared object/ {print $1}' | cut -d: -f1`; \
356 if [ -n "$elfexelist" ]; then \
357 strip -R .note -R .comment $elfexelist
359 if [ -n "$elfsharedlist" ]; then
360 strip --strip-unneeded -R .note -R .comment $elfsharedlist
364 # /sbin/chstk -e $RPM_BUILD_ROOT%{_bindir}/wine
366 programs="notepad progman regedit regsvr32 uninstaller wineconsole winefile winemine winepath winhelp wcmd"
369 rm -f files.so; touch files.so
370 rm -f files.programs; touch files.programs
371 cd $RPM_BUILD_ROOT%{_libdir}/wine
374 d3d8.dll.so|d3d9.dll.so|d3dx8.dll.so|glu32.dll.so|opengl32.dll.so|twain_32.dll.so|winealsa.drv.so|winearts.drv.so|winejack.drv.so|winenas.drv.so)
377 echo "%attr(755,root,root) %{_libdir}/wine/$f" >>$BZZZ/files.so
381 for p in $programs; do
382 echo "%attr(755,root,root) %{_bindir}/$p" >> files.programs
383 echo "%attr(755,root,root) %{_libdir}/wine/$p.exe.so" >> files.programs
384 grep -v "$p\.exe\.so$" files.so > files.so.
385 mv -f files.so. files.so
389 rm -rf $RPM_BUILD_ROOT
393 /sbin/chkconfig --add wine
394 if [ ! -f /var/lock/subsys/wine ]; then
395 echo "Run \"/etc/rc.d/init.d/wine start\" to start wine service." >&2
399 if [ "$1" = "0" ]; then
400 if [ -f /var/lock/subsys/wine ]; then
401 /etc/rc.d/init.d/wine stop >&2
403 /sbin/chkconfig --del wine
406 %postun -p /sbin/ldconfig
409 %defattr(644,root,root,755)
410 %doc README DEVELOPERS-HINTS ChangeLog BUGS AUTHORS ANNOUNCE
411 %doc documentation/samples
412 %if %{with html_docs}
413 %doc documentation/wine-{faq,user}
415 %attr(755,root,root) %{_bindir}/wine
416 %attr(755,root,root) %{_bindir}/wine-kthread
417 %attr(755,root,root) %{_bindir}/wine-pthread
418 %attr(755,root,root) %{_bindir}/wineboot
419 %attr(755,root,root) %{_bindir}/winecfg
420 %attr(755,root,root) %{_bindir}/wineclipsrv
421 %attr(755,root,root) %{_bindir}/winedbg
422 %attr(755,root,root) %{_bindir}/winelauncher
423 %attr(755,root,root) %{_bindir}/wineserver
424 %attr(755,root,root) %{_bindir}/wineshelllink
425 %attr(755,root,root) %{_libdir}/*.so*
427 %{_mandir}/man1/wine.*
428 %{_mandir}/man5/wine.conf.*
429 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/wine.reg
430 %config(missingok,noreplace) %verify(not size mtime md5) %{_sysconfdir}/wine.systemreg
431 %config(missingok,noreplace) %verify(not size mtime md5) %{_sysconfdir}/wine.userreg
432 %attr(754,root,root) %{_sysconfdir}/rc.d/init.d/wine
435 %files programs -f files.programs
436 %defattr(644,root,root,755)
439 %defattr(644,root,root,755)
440 %if %{with html_docs}
441 %doc documentation/{wine-devel,winelib-user}
443 %attr(755,root,root) %{_bindir}/fnt2bdf
444 %attr(755,root,root) %{_bindir}/function_grep.pl
445 %attr(755,root,root) %{_bindir}/hlp2sgml
446 %attr(755,root,root) %{_bindir}/widl
447 %attr(755,root,root) %{_bindir}/winebuild
448 %attr(755,root,root) %{_bindir}/winedump
449 %attr(755,root,root) %{_bindir}/wineg++
450 %attr(755,root,root) %{_bindir}/winegcc
451 %attr(755,root,root) %{_bindir}/winemaker
452 %attr(755,root,root) %{_bindir}/winewrap
453 %attr(755,root,root) %{_bindir}/wmc
454 %attr(755,root,root) %{_bindir}/wrc
457 %{_mandir}/man1/winemaker.*
458 %{_mandir}/man1/winebuild.*
459 %{_mandir}/man1/wmc.*
460 %{_mandir}/man1/wrc.*
465 %defattr(644,root,root,755)
466 %doc documentation/*.pdf
470 %defattr(644,root,root,755)
471 %attr(755,root,root) %{_libdir}/wine/d3d8.dll.so
472 %attr(755,root,root) %{_libdir}/wine/d3d9.dll.so
473 %attr(755,root,root) %{_libdir}/wine/d3dx8.dll.so
474 %attr(755,root,root) %{_libdir}/wine/wined3d.dll.so
477 %defattr(644,root,root,755)
478 %attr(755,root,root) %{_libdir}/wine/glu32.dll.so
479 %attr(755,root,root) %{_libdir}/wine/opengl32.dll.so
483 %defattr(644,root,root,755)
484 %attr(755,root,root) %{_libdir}/wine/twain_32.dll.so
489 %defattr(644,root,root,755)
490 %attr(755,root,root) %{_libdir}/wine/winealsa.drv.so
495 %defattr(644,root,root,755)
496 %attr(755,root,root) %{_libdir}/wine/winearts.drv.so
501 %defattr(644,root,root,755)
502 %attr(755,root,root) %{_libdir}/wine/winejack.drv.so
507 %defattr(644,root,root,755)
508 %attr(755,root,root) %{_libdir}/wine/winenas.drv.so
511 # additional dependencies in *.so not separated (yet?) from main package
512 # ddraw.dll.so,x11drv.dll.so depend on X11 libs
513 # ole2disp.dll.so,oleaut32.dll.so,typelib.dll.so depend on lib(un)gif,libjpeg,libX11
514 # ttydrv.dll.so depends on ncurses