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 %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-jknappen
79 BuildRequires: tetex-fonts-pazo
80 BuildRequires: tetex-fonts-stmaryrd
81 BuildRequires: tetex-fonts-type1-urw
83 %{?with_sane:BuildRequires: sane-backends-devel}
84 BuildRequires: xrender-devel
85 Requires(post): /sbin/ldconfig
86 Requires(post,preun): /sbin/chkconfig
87 # link to wine/ntdll.dll.so, without any SONAME
88 Provides: libntdll.dll.so
89 ExclusiveArch: %{ix86}
90 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
92 %define _noautoreqdep libGL.so.1 libGLU.so.1
93 %define no_install_post_strip 1
95 %define _winedir %{_datadir}/%{name}
97 %define getsoname() %((objdump -p %{1} 2>/dev/null || echo SONAME ERROR) | awk '/SONAME/ { print $2 }')
100 Wine is a program which allows running Microsoft Windows programs
101 (including DOS, Windows 3.x and Win32 executables) on Unix. It
102 consists of a program loader which loads and executes a Microsoft
103 Windows binary, and a library that implements Windows API calls using
104 their Unix or X11 equivalents. The library may also be used for
105 porting Win32 code into native Unix executables.
108 Ejecuta programas Windows en Linux.
111 Wine jest programem dziêki któremu mo¿na uruchamiaæ programy napisane
112 dla Microsoft Windows pod systemami unixowymi. Sk³ada siê on z
113 loadera, który pozwala wczytywaæ i uruchamiaæ programy w formacie
114 Microsoft Windows oraz z biblioteki, która implementuje API Windows
115 przy u¿yciu odpowiedników Unixowych oraz z X11. Biblioteka mo¿e byæ
116 tak¿e wykorzystana do przenoszenia aplikacji Win32 do Unixa.
118 %description -l pt_BR
119 O Wine é um programa que permite rodar programas MS-Windows no X11.
120 Ele consiste de um carregador de programa, que carrega e executa um
121 binário MS-Windows, e de uma biblioteca de emulação que traduz as
122 chamadas da API para as equivalentes Unix/X11.
125 Summary: Wine - header files
126 Summary(es): Biblioteca de desarrollo de wine
127 Summary(pl): Wine - pliki nag³owkowe
128 Summary(pt_BR): Biblioteca de desenvolvimento do wine
129 Group: Development/Libraries
130 Requires: %{name} = %{version}
135 %description devel -l es
136 Biblioteca de desarrollo de wine.
138 %description devel -l pl
139 Wine - pliki nag³ówkowe.
141 %description devel -l pt_BR
142 Arquivos de inclusão e bibliotecas para desenvolver aplicações com o
146 Summary: Wine - programs
147 Summary(pl): Wine - programy
149 Requires: %{name} = %{version}
151 %description programs
154 %description programs -l pl
158 Summary: Wine documentation in PDF
159 Summary(pl): Dokumentacja Wine w formacie PDF
163 Wine documentation in PDF format.
165 %description doc-pdf -l pl
166 Dokumentacja Wine w formacie PDF.
169 Summary: Direct3D implementation DLLs for Wine
170 Summary(pl): Biblioteki DLL z implementacj± Direct3D dla Wine
171 Group: Applications/Emulators
172 Requires: %{name} = %{version}
176 Direct3D implementation DLLs for Wine (through OpenGL).
178 %description dll-d3d -l pl
179 Biblioteki DLL z implementacj± Direct3D dla Wine (poprzez OpenGL).
182 Summary: OpenGL implementation DLLs for Wine
183 Summary(pl): Biblioteki DLL z implementacj± OpenGL dla Wine
184 Group: Applications/Emulators
185 Requires: %{name} = %{version}
189 OpenGL implementation DLLs for Wine.
191 %description dll-gl -l pl
192 Biblioteki DLL z implementacj± OpenGL dla Wine.
195 Summary: TWAIN implementation DLL for Wine
196 Summary(pl): Biblioteka DLL z implementacj± TWAIN dla Wine
197 Group: Applications/Emulators
198 Requires: %{name} = %{version}
200 %description dll-twain
201 TWAIN implementation DLL for Wine (through SANE).
203 %description dll-twain -l pl
204 Biblioteka DLL z implementacj± TWAIN dla Wine (poprzez SANE).
207 Summary: ALSA driver for WINE mm.dll implementation
208 Summary(pl): Sterownik ALSA dla implementacji mm.dll w Wine
209 Group: Applications/Emulators
210 Requires: %{name} = %{version}
212 %description drv-alsa
213 ALSA driver for WINE mm.dll (multimedia system) implementation.
215 %description drv-alsa -l pl
216 Sterownik ALSA dla implementacji mm.dll (systemu multimediów) w Wine.
219 Summary: aRts driver for WINE mm.dll implementation
220 Summary(pl): Sterownik aRts dla implementacji mm.dll w Wine
221 Group: Applications/Emulators
222 Requires: %{name} = %{version}
224 %description drv-arts
225 aRts driver for WINE mm.dll (multimedia system) implementation.
227 %description drv-arts -l pl
228 Sterownik aRts dla implementacji mm.dll (systemu multimediów) w Wine.
231 Summary: JACK driver for WINE mm.dll implementation
232 Summary(pl): Sterownik JACK dla implementacji mm.dll w Wine
233 Group: Applications/Emulators
234 Requires: %{name} = %{version}
235 Requires: jack-audio-connection-kit
236 # dlopened by SONAME detected at build time
238 Requires: %{getsoname /usr/lib/libjack.so}
241 %description drv-jack
242 JACK driver for WINE mm.dll (multimedia system) implementation.
244 %description drv-jack -l pl
245 Sterownik JACK dla implementacji mm.dll (systemu multimediów) w Wine.
248 Summary: NAS driver for WINE mm.dll implementation
249 Summary(pl): Sterownik NAS dla implementacji mm.dll w Wine
250 Group: Applications/Emulators
251 Requires: %{name} = %{version}
254 NAS driver for WINE mm.dll (multimedia system) implementation.
256 %description drv-nas -l pl
257 Sterownik NAS dla implementacji mm.dll (systemu multimediów) w Wine.
270 # turn off compilation of some tools
271 #sed -e "s|winetest \\\|\\\|;s|avitools||" programs/Makefile.in > .tmp
272 sed -e "s|avitools||" programs/Makefile.in > .tmp
273 mv -f .tmp programs/Makefile.in
278 CPPFLAGS="-I/usr/include/ncurses -DALSA_PCM_OLD_HW_PARAMS_API"; export CPPFLAGS
279 CFLAGS="%{rpmcflags} $CPPFLAGS"
281 %{!?debug:--disable-debug} \
282 %{!?debug:--disable-trace} \
288 %{__make} -C programs
289 #%{__make} -C programs/regapi
292 %if %{with html_docs}
293 db2html wine-user.sgml
294 db2html wine-devel.sgml
295 db2html wine-faq.sgml
296 db2html winelib-user.sgml
300 db2pdf wine-user.sgml
301 db2pdf wine-devel.sgml
303 db2pdf winelib-user.sgml
308 rm -rf $RPM_BUILD_ROOT
309 install -d $RPM_BUILD_ROOT{%{_mandir}/man1,%{_aclocaldir}}
312 DESTDIR=$RPM_BUILD_ROOT
314 %{__make} -C programs install \
315 DESTDIR=$RPM_BUILD_ROOT
317 install programs/winhelp/hlp2sgml $RPM_BUILD_ROOT%{_bindir}
318 install tools/fnt2bdf $RPM_BUILD_ROOT%{_bindir}
320 install aclocal.m4 $RPM_BUILD_ROOT%{_aclocaldir}/wine.m4
321 #mv -f $RPM_BUILD_ROOT{/usr/X11R6/share/aclocal,%{_aclocaldir}}/wine.m4
323 install -d $RPM_BUILD_ROOT%{_sysconfdir}/rc.d/init.d \
324 $RPM_BUILD_ROOT%{_winedir}/windows/{system,Desktop,Favorites,Fonts} \
325 "$RPM_BUILD_ROOT%{_winedir}/windows/Start Menu/Programs/Startup" \
326 $RPM_BUILD_ROOT%{_winedir}/windows/{SendTo,ShellNew,system32,NetHood} \
327 $RPM_BUILD_ROOT%{_winedir}/windows/{Profiles/Administrator,Recent} \
328 $RPM_BUILD_ROOT%{_winedir}/{"Program Files/Common Files","My Documents"}
330 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/wine
331 install %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}
332 install %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}
333 install %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}
335 touch $RPM_BUILD_ROOT%{_winedir}/{autoexec.bat,config.sys,windows/win.ini}
336 touch $RPM_BUILD_ROOT%{_winedir}/windows/system/{shell.dll,shell32.dll}
337 touch $RPM_BUILD_ROOT%{_winedir}/windows/system/{winsock.dll,wsock32.dll}
339 cat >$RPM_BUILD_ROOT%{_winedir}/windows/system.ini <<EOF
343 waveaudio=mciwave.drv
345 videodisc=mcipionr.drv
350 %if %{?debug:0}%{!?debug:1}
351 echo "Strip executable binaries and shared object files."
352 filelist=`find $RPM_BUILD_ROOT -type f ! -regex ".*ld-[0-9.]*so.*"`
353 elfexelist=`echo $filelist | xargs -r file | \
354 awk '/ELF.*executable/ {print $1}' | cut -d: -f1`
355 elfsharedlist=`echo $filelist | xargs -r file | \
356 awk '/LF.*shared object/ {print $1}' | cut -d: -f1`; \
357 if [ -n "$elfexelist" ]; then \
358 strip -R .note -R .comment $elfexelist
360 if [ -n "$elfsharedlist" ]; then
361 strip --strip-unneeded -R .note -R .comment $elfsharedlist
365 # /sbin/chstk -e $RPM_BUILD_ROOT%{_bindir}/wine
367 programs="notepad progman regedit regsvr32 uninstaller wineconsole winefile winemine winepath winhelp wcmd"
370 rm -f files.so; touch files.so
371 rm -f files.programs; touch files.programs
372 cd $RPM_BUILD_ROOT%{_libdir}/wine
375 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)
378 echo "%attr(755,root,root) %{_libdir}/wine/$f" >>$BZZZ/files.so
382 for p in $programs; do
383 echo "%attr(755,root,root) %{_bindir}/$p" >> files.programs
384 echo "%attr(755,root,root) %{_libdir}/wine/$p.exe.so" >> files.programs
385 grep -v "$p\.exe\.so$" files.so > files.so.
386 mv -f files.so. files.so
390 rm -rf $RPM_BUILD_ROOT
394 /sbin/chkconfig --add wine
395 if [ ! -f /var/lock/subsys/wine ]; then
396 echo "Run \"/etc/rc.d/init.d/wine start\" to start wine service." >&2
400 if [ "$1" = "0" ]; then
401 if [ -f /var/lock/subsys/wine ]; then
402 /etc/rc.d/init.d/wine stop >&2
404 /sbin/chkconfig --del wine
407 %postun -p /sbin/ldconfig
410 %defattr(644,root,root,755)
411 %doc README DEVELOPERS-HINTS ChangeLog BUGS AUTHORS ANNOUNCE
412 %doc documentation/samples
413 %if %{with html_docs}
414 %doc documentation/wine-{faq,user}
416 %attr(755,root,root) %{_bindir}/wine
417 %attr(755,root,root) %{_bindir}/wine-kthread
418 %attr(755,root,root) %{_bindir}/wine-pthread
419 %attr(755,root,root) %{_bindir}/wineboot
420 %attr(755,root,root) %{_bindir}/winecfg
421 %attr(755,root,root) %{_bindir}/wineclipsrv
422 %attr(755,root,root) %{_bindir}/winedbg
423 %attr(755,root,root) %{_bindir}/winelauncher
424 %attr(755,root,root) %{_bindir}/wineserver
425 %attr(755,root,root) %{_bindir}/wineshelllink
426 %attr(755,root,root) %{_libdir}/*.so*
428 %{_mandir}/man1/wine.*
429 %{_mandir}/man5/wine.conf.*
430 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/wine.reg
431 %config(missingok,noreplace) %verify(not size mtime md5) %{_sysconfdir}/wine.systemreg
432 %config(missingok,noreplace) %verify(not size mtime md5) %{_sysconfdir}/wine.userreg
433 %attr(754,root,root) %{_sysconfdir}/rc.d/init.d/wine
436 %files programs -f files.programs
437 %defattr(644,root,root,755)
440 %defattr(644,root,root,755)
441 %if %{with html_docs}
442 %doc documentation/{wine-devel,winelib-user}
444 %attr(755,root,root) %{_bindir}/fnt2bdf
445 %attr(755,root,root) %{_bindir}/function_grep.pl
446 %attr(755,root,root) %{_bindir}/hlp2sgml
447 %attr(755,root,root) %{_bindir}/widl
448 %attr(755,root,root) %{_bindir}/winebuild
449 %attr(755,root,root) %{_bindir}/winedump
450 %attr(755,root,root) %{_bindir}/wineg++
451 %attr(755,root,root) %{_bindir}/winegcc
452 %attr(755,root,root) %{_bindir}/winemaker
453 %attr(755,root,root) %{_bindir}/winewrap
454 %attr(755,root,root) %{_bindir}/wmc
455 %attr(755,root,root) %{_bindir}/wrc
458 %{_mandir}/man1/winemaker.*
459 %{_mandir}/man1/winebuild.*
460 %{_mandir}/man1/wmc.*
461 %{_mandir}/man1/wrc.*
466 %defattr(644,root,root,755)
467 %doc documentation/*.pdf
471 %defattr(644,root,root,755)
472 %attr(755,root,root) %{_libdir}/wine/d3d8.dll.so
473 %attr(755,root,root) %{_libdir}/wine/d3d9.dll.so
474 %attr(755,root,root) %{_libdir}/wine/d3dx8.dll.so
475 %attr(755,root,root) %{_libdir}/wine/wined3d.dll.so
478 %defattr(644,root,root,755)
479 %attr(755,root,root) %{_libdir}/wine/glu32.dll.so
480 %attr(755,root,root) %{_libdir}/wine/opengl32.dll.so
484 %defattr(644,root,root,755)
485 %attr(755,root,root) %{_libdir}/wine/twain_32.dll.so
490 %defattr(644,root,root,755)
491 %attr(755,root,root) %{_libdir}/wine/winealsa.drv.so
496 %defattr(644,root,root,755)
497 %attr(755,root,root) %{_libdir}/wine/winearts.drv.so
502 %defattr(644,root,root,755)
503 %attr(755,root,root) %{_libdir}/wine/winejack.drv.so
508 %defattr(644,root,root,755)
509 %attr(755,root,root) %{_libdir}/wine/winenas.drv.so
512 # additional dependencies in *.so not separated (yet?) from main package
513 # ddraw.dll.so,x11drv.dll.so depend on X11 libs
514 # ole2disp.dll.so,oleaut32.dll.so,typelib.dll.so depend on lib(un)gif,libjpeg,libX11
515 # ttydrv.dll.so depends on ncurses