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
13 # NOTE: wine detects the following SONAMES for dlopen at build time:
14 # libcrypto,libssl (wininet.dll)
15 # libcups (winspool.dll.so,wineps.dll.so)
16 # libcurses/libncurses (wineconsole program)
17 # libfontconfig (gdi32.dll.so)
18 # libfreetype (wineps.dll.so,gdi32.dll.so)
19 # libGL (x11drv.dll.so,ddraw.dll.so)
20 # libjack (winejack.drv.so - explicit dependency in subpackage)
21 # libX11, libXext, libXi, libXrender (x11drv.dll.so)
22 # thus requires rebuild after change of any of the above.
28 Summary: Program that lets you launch Win applications
29 Summary(es): Ejecuta programas Windows en Linux
30 Summary(pl): Program pozwalaj±cy uruchamiaæ aplikacje Windows
31 Summary(pt_BR): Executa programas Windows no Linux
36 Group: Applications/Emulators
37 #Source0: http://dl.sourceforge.net/%{name}/Wine-%{version}.tar.gz
38 Source0: ftp://ftp.ibiblio.org/pub/Linux/ALPHA/%{name}/development/Wine-%{version}.tar.gz
39 # Source0-md5: f43ad76846f792f9598fca2428d23e60
42 Source3: %{name}.systemreg
43 Source4: %{name}.userreg
44 Patch0: %{name}-fontcache.patch
45 Patch1: %{name}-destdir.patch
46 Patch2: %{name}-ncurses.patch
47 Patch3: %{name}-makedep.patch
48 #Patch4: %{name}-dga.patch
49 # Oliver Stieber's DirectX 9 support patch (unofficial, published on WWN Issue #271)
50 Patch5: %{name}-d3d9patch.patch
51 URL: http://www.winehq.org/
53 BuildRequires: libSM-devel
54 BuildRequires: libXrandr-devel
55 BuildRequires: libXrender-devel
56 BuildRequires: libXt-devel
57 BuildRequires: libXv-devel
59 BuildRequires: XFree86-devel
61 BuildRequires: XFree86-OpenGL-devel-base
62 BuildRequires: XFree86-OpenGL-devel
63 %{?with_alsa:BuildRequires: alsa-lib-devel}
64 %{?with_arts:BuildRequires: artsc-devel}
65 BuildRequires: autoconf
66 BuildRequires: automake
68 # BuildRequires: chpax >= 0.20020901-2
69 %{?with_cups:BuildRequires: cups-devel}
70 BuildRequires: docbook-dtd31-sgml
71 BuildRequires: docbook-utils
73 BuildRequires: fontconfig-devel
74 BuildRequires: fontforge
75 BuildRequires: freetype-devel >= 2.0.5
76 %{?with_jack:BuildRequires: jack-audio-connection-kit-devel}
77 BuildRequires: libjpeg-devel
78 BuildRequires: libtool
79 BuildRequires: libungif-devel
80 %{?with_nas:BuildRequires: nas-devel}
81 BuildRequires: ncurses-devel
82 %if %{with html_docs} || %{with pdf_docs}
83 # db2* failed previously - probably openjade or opensp bug
84 BuildRequires: openjade >= 1:1.3.3-0.pre1
85 BuildRequires: opensp >= 1:1.5.1
87 BuildRequires: openssl-devel >= 0.9.7d
89 BuildRequires: tetex-latex-cyrillic
90 BuildRequires: tetex-metafont
91 BuildRequires: tetex-fonts-jknappen
92 BuildRequires: tetex-fonts-pazo
93 BuildRequires: tetex-fonts-stmaryrd
94 BuildRequires: tetex-fonts-type1-urw
96 %{?with_sane:BuildRequires: sane-backends-devel}
97 BuildRequires: xrender-devel
98 Requires(post): /sbin/ldconfig
99 Requires(post,preun): /sbin/chkconfig
100 # link to wine/ntdll.dll.so, without any SONAME
101 Provides: libntdll.dll.so
102 ExclusiveArch: %{ix86}
103 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
105 %define _noautoreqdep libGL.so.1 libGLU.so.1
106 %define no_install_post_strip 1
108 %define _winedir %{_datadir}/%{name}
110 %define getsoname() %((objdump -p %{1} 2>/dev/null || echo SONAME ERROR) | awk '/SONAME/ { print $2; s=1 }; END { if(s==0) print "ERROR" }')
113 Wine is a program which allows running Microsoft Windows programs
114 (including DOS, Windows 3.x and Win32 executables) on Unix. It
115 consists of a program loader which loads and executes a Microsoft
116 Windows binary, and a library that implements Windows API calls using
117 their Unix or X11 equivalents. The library may also be used for
118 porting Win32 code into native Unix executables.
121 Ejecuta programas Windows en Linux.
124 Wine jest programem dziêki któremu mo¿na uruchamiaæ programy napisane
125 dla Microsoft Windows pod systemami uniksowymi. Sk³ada siê on z
126 loadera, który pozwala wczytywaæ i uruchamiaæ programy w formacie
127 Microsoft Windows, oraz z biblioteki, która implementuje API Windows
128 przy u¿yciu odpowiedników uniksowych oraz z X11. Biblioteka mo¿e byæ
129 tak¿e wykorzystana do przenoszenia aplikacji Win32 do Uniksa.
131 %description -l pt_BR
132 O Wine é um programa que permite rodar programas MS-Windows no X11.
133 Ele consiste de um carregador de programa, que carrega e executa um
134 binário MS-Windows, e de uma biblioteca de emulação que traduz as
135 chamadas da API para as equivalentes Unix/X11.
138 Summary: Wine - header files
139 Summary(es): Biblioteca de desarrollo de wine
140 Summary(pl): Wine - pliki nag³owkowe
141 Summary(pt_BR): Biblioteca de desenvolvimento do wine
142 Group: Development/Libraries
143 Requires: %{name} = %{version}-%{release}
148 %description devel -l es
149 Biblioteca de desarrollo de wine.
151 %description devel -l pl
152 Wine - pliki nag³ówkowe.
154 %description devel -l pt_BR
155 Arquivos de inclusão e bibliotecas para desenvolver aplicações com o
159 Summary: Wine - programs
160 Summary(pl): Wine - programy
162 Requires: %{name} = %{version}-%{release}
164 %description programs
167 %description programs -l pl
171 Summary: Wine documentation in PDF
172 Summary(pl): Dokumentacja Wine w formacie PDF
176 Wine documentation in PDF format.
178 %description doc-pdf -l pl
179 Dokumentacja Wine w formacie PDF.
182 Summary: Direct3D implementation DLLs for Wine
183 Summary(pl): Biblioteki DLL z implementacj± Direct3D dla Wine
184 Group: Applications/Emulators
185 Requires: %{name} = %{version}-%{release}
189 Direct3D implementation DLLs for Wine (through OpenGL).
191 %description dll-d3d -l pl
192 Biblioteki DLL z implementacj± Direct3D dla Wine (poprzez OpenGL).
195 Summary: OpenGL implementation DLLs for Wine
196 Summary(pl): Biblioteki DLL z implementacj± OpenGL dla Wine
197 Group: Applications/Emulators
198 Requires: %{name} = %{version}-%{release}
202 OpenGL implementation DLLs for Wine.
204 %description dll-gl -l pl
205 Biblioteki DLL z implementacj± OpenGL dla Wine.
208 Summary: TWAIN implementation DLL for Wine
209 Summary(pl): Biblioteka DLL z implementacj± TWAIN dla Wine
210 Group: Applications/Emulators
211 Requires: %{name} = %{version}-%{release}
213 %description dll-twain
214 TWAIN implementation DLL for Wine (through SANE).
216 %description dll-twain -l pl
217 Biblioteka DLL z implementacj± TWAIN dla Wine (poprzez SANE).
220 Summary: ALSA driver for WINE mm.dll implementation
221 Summary(pl): Sterownik ALSA dla implementacji mm.dll w Wine
222 Group: Applications/Emulators
223 Requires: %{name} = %{version}-%{release}
225 %description drv-alsa
226 ALSA driver for WINE mm.dll (multimedia system) implementation.
228 %description drv-alsa -l pl
229 Sterownik ALSA dla implementacji mm.dll (systemu multimediów) w Wine.
232 Summary: aRts driver for WINE mm.dll implementation
233 Summary(pl): Sterownik aRts dla implementacji mm.dll w Wine
234 Group: Applications/Emulators
235 Requires: %{name} = %{version}-%{release}
237 %description drv-arts
238 aRts driver for WINE mm.dll (multimedia system) implementation.
240 %description drv-arts -l pl
241 Sterownik aRts dla implementacji mm.dll (systemu multimediów) w Wine.
244 Summary: JACK driver for WINE mm.dll implementation
245 Summary(pl): Sterownik JACK-a dla implementacji mm.dll w Wine
246 Group: Applications/Emulators
247 Requires: %{name} = %{version}-%{release}
248 Requires: jack-audio-connection-kit
249 # dlopened by SONAME detected at build time
250 %{?with_jack:Requires: %{getsoname /usr/%{_lib}/libjack.so}}
252 %description drv-jack
253 JACK driver for WINE mm.dll (multimedia system) implementation.
255 %description drv-jack -l pl
256 Sterownik JACK-a dla implementacji mm.dll (systemu multimediów) w
260 Summary: NAS driver for WINE mm.dll implementation
261 Summary(pl): Sterownik NAS dla implementacji mm.dll w Wine
262 Group: Applications/Emulators
263 Requires: %{name} = %{version}-%{release}
266 NAS driver for WINE mm.dll (multimedia system) implementation.
268 %description drv-nas -l pl
269 Sterownik NAS dla implementacji mm.dll (systemu multimediów) w Wine.
279 # turn off compilation of some tools
280 sed -i -e "s|winetest \\\|\\\|;s|avitools||" programs/Makefile.in
281 #sed -i -e "s|avitools||" programs/Makefile.in
286 %{!?debug:--disable-debug} \
287 %{!?debug:--disable-trace} \
293 %{__make} -C programs
294 #%{__make} -C programs/regapi
297 %if %{with html_docs}
298 db2html wine-user.sgml
299 db2html wine-devel.sgml
300 db2html wine-faq.sgml
301 db2html winelib-user.sgml
305 db2pdf wine-user.sgml
306 db2pdf wine-devel.sgml
308 db2pdf winelib-user.sgml
313 rm -rf $RPM_BUILD_ROOT
314 install -d $RPM_BUILD_ROOT{%{_mandir}/man1,%{_aclocaldir}}
317 DESTDIR=$RPM_BUILD_ROOT
319 %{__make} -C programs install \
320 DESTDIR=$RPM_BUILD_ROOT
322 install programs/winhelp/hlp2sgml $RPM_BUILD_ROOT%{_bindir}
323 install tools/fnt2bdf $RPM_BUILD_ROOT%{_bindir}
325 install aclocal.m4 $RPM_BUILD_ROOT%{_aclocaldir}/wine.m4
326 #mv -f $RPM_BUILD_ROOT{/usr/X11R6/share/aclocal,%{_aclocaldir}}/wine.m4
328 install -d $RPM_BUILD_ROOT%{_sysconfdir}/rc.d/init.d \
329 $RPM_BUILD_ROOT%{_winedir}/windows/{system,Desktop,Favorites,Fonts} \
330 "$RPM_BUILD_ROOT%{_winedir}/windows/Start Menu/Programs/Startup" \
331 $RPM_BUILD_ROOT%{_winedir}/windows/{SendTo,ShellNew,system32,NetHood} \
332 $RPM_BUILD_ROOT%{_winedir}/windows/{Profiles/Administrator,Recent} \
333 $RPM_BUILD_ROOT%{_winedir}/{"Program Files/Common Files","My Documents"}
335 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/wine
336 install %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}
337 install %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}
338 install %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}
340 touch $RPM_BUILD_ROOT%{_winedir}/{autoexec.bat,config.sys,windows/win.ini}
341 touch $RPM_BUILD_ROOT%{_winedir}/windows/system/{shell.dll,shell32.dll}
342 touch $RPM_BUILD_ROOT%{_winedir}/windows/system/{winsock.dll,wsock32.dll}
344 cat >$RPM_BUILD_ROOT%{_winedir}/windows/system.ini <<EOF
348 waveaudio=mciwave.drv
350 videodisc=mcipionr.drv
355 %if %{?debug:0}%{!?debug:1}
356 echo "Strip executable binaries and shared object files."
357 filelist=`find $RPM_BUILD_ROOT -type f ! -regex ".*ld-[0-9.]*so.*"`
358 elfexelist=`echo $filelist | xargs -r file | \
359 awk '/ELF.*executable/ {print $1}' | cut -d: -f1`
360 elfsharedlist=`echo $filelist | xargs -r file | \
361 awk '/LF.*shared object/ {print $1}' | cut -d: -f1`; \
362 if [ -n "$elfexelist" ]; then \
363 strip -R .note -R .comment $elfexelist
365 if [ -n "$elfsharedlist" ]; then
366 strip --strip-unneeded -R .note -R .comment $elfsharedlist
370 # /sbin/chstk -e $RPM_BUILD_ROOT%{_bindir}/wine
372 programs="notepad progman regedit regsvr32 uninstaller wineconsole winefile winemine winepath winhelp wcmd"
375 rm -f files.so; touch files.so
376 rm -f files.programs; touch files.programs
377 cd $RPM_BUILD_ROOT%{_libdir}/wine
380 d3d8.dll.so|d3d9.dll.so|d3dx8.dll.so|glu32.dll.so|opengl32.dll.so|twain.dll.so|twain_32.dll.so|winealsa.drv.so|winearts.drv.so|winejack.drv.so|winenas.drv.so)
383 echo "%attr(755,root,root) %{_libdir}/wine/$f" >>$BZZZ/files.so
387 for p in $programs; do
388 echo "%attr(755,root,root) %{_bindir}/$p" >> files.programs
389 echo "%attr(755,root,root) %{_libdir}/wine/$p.exe.so" >> files.programs
390 grep -v "$p\.exe\.so$" files.so > files.so.
391 mv -f files.so. files.so
395 rm -rf $RPM_BUILD_ROOT
399 /sbin/chkconfig --add wine
400 if [ ! -f /var/lock/subsys/wine ]; then
401 echo "Run \"/etc/rc.d/init.d/wine start\" to start wine service." >&2
405 if [ "$1" = "0" ]; then
406 if [ -f /var/lock/subsys/wine ]; then
407 /etc/rc.d/init.d/wine stop >&2
409 /sbin/chkconfig --del wine
412 %postun -p /sbin/ldconfig
415 %defattr(644,root,root,755)
416 %doc README DEVELOPERS-HINTS ChangeLog BUGS AUTHORS ANNOUNCE
417 %doc documentation/samples
418 %if %{with html_docs}
419 %doc documentation/wine-{faq,user}
421 %attr(755,root,root) %{_bindir}/wine
422 %attr(755,root,root) %{_bindir}/wineboot
423 %attr(755,root,root) %{_bindir}/winebrowser
424 %attr(755,root,root) %{_bindir}/winecfg
425 %attr(755,root,root) %{_bindir}/winedbg
426 %attr(755,root,root) %{_bindir}/wine-kthread
427 %attr(755,root,root) %{_bindir}/winelauncher
428 %attr(755,root,root) %{_bindir}/wineprefixcreate
429 %attr(755,root,root) %{_bindir}/wine-preloader
430 %attr(755,root,root) %{_bindir}/wine-pthread
431 %attr(755,root,root) %{_bindir}/wineserver
432 %attr(755,root,root) %{_bindir}/wineshelllink
433 %attr(755,root,root) %{_libdir}/*.so*
435 %{_mandir}/man1/wine.*
436 %{_mandir}/man1/winedbg.1*
437 %{_mandir}/man5/wine.conf.*
438 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/wine.reg
439 %config(missingok,noreplace) %verify(not size mtime md5) %{_sysconfdir}/wine.systemreg
440 %config(missingok,noreplace) %verify(not size mtime md5) %{_sysconfdir}/wine.userreg
441 %attr(754,root,root) %{_sysconfdir}/rc.d/init.d/wine
443 %{_datadir}/fonts/wine
444 %{_desktopdir}/wine.desktop
446 %files programs -f files.programs
447 %defattr(644,root,root,755)
450 %defattr(644,root,root,755)
451 %if %{with html_docs}
452 %doc documentation/{wine-devel,winelib-user}
454 %attr(755,root,root) %{_bindir}/fnt2bdf
455 %attr(755,root,root) %{_bindir}/function_grep.pl
456 %attr(755,root,root) %{_bindir}/hlp2sgml
457 %attr(755,root,root) %{_bindir}/widl
458 %attr(755,root,root) %{_bindir}/winebuild
459 %attr(755,root,root) %{_bindir}/winedump
460 %attr(755,root,root) %{_bindir}/wineg++
461 %attr(755,root,root) %{_bindir}/winegcc
462 %attr(755,root,root) %{_bindir}/winemaker
463 #%attr(755,root,root) %{_bindir}/winewrap
464 %attr(755,root,root) %{_bindir}/wmc
465 %attr(755,root,root) %{_bindir}/wrc
467 %{_mandir}/man1/widl.1*
468 %{_mandir}/man1/winedump.1*
469 %{_mandir}/man1/winegcc.1*
470 %{_mandir}/man1/winemaker.1*
471 %{_mandir}/man1/winebuild.1*
472 %{_mandir}/man1/wmc.1*
473 %{_mandir}/man1/wrc.1*
478 %defattr(644,root,root,755)
479 %doc documentation/*.pdf
483 %defattr(644,root,root,755)
484 %attr(755,root,root) %{_libdir}/wine/d3d8.dll.so
485 %attr(755,root,root) %{_libdir}/wine/d3d9.dll.so
486 %attr(755,root,root) %{_libdir}/wine/d3dx8.dll.so
487 %attr(755,root,root) %{_libdir}/wine/wined3d.dll.so
490 %defattr(644,root,root,755)
491 %attr(755,root,root) %{_libdir}/wine/glu32.dll.so
492 %attr(755,root,root) %{_libdir}/wine/opengl32.dll.so
496 %defattr(644,root,root,755)
497 %attr(755,root,root) %{_libdir}/wine/twain*.dll.so
502 %defattr(644,root,root,755)
503 %attr(755,root,root) %{_libdir}/wine/winealsa.drv.so
508 %defattr(644,root,root,755)
509 %attr(755,root,root) %{_libdir}/wine/winearts.drv.so
514 %defattr(644,root,root,755)
515 %attr(755,root,root) %{_libdir}/wine/winejack.drv.so
520 %defattr(644,root,root,755)
521 %attr(755,root,root) %{_libdir}/wine/winenas.drv.so
524 # additional dependencies in *.so not separated (yet?) from main package
525 # ddraw.dll.so,x11drv.dll.so depend on X11 libs
526 # ole2disp.dll.so,oleaut32.dll.so,typelib.dll.so depend on lib(un)gif,libjpeg,libX11
527 # ttydrv.dll.so depends on ncurses