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 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 requild after change of any of 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-md5: 6d0a23943481e703a7d3538269f788e0
41 Source3: %{name}.systemreg
42 Source4: %{name}.userreg
43 Patch0: %{name}-fontcache.patch
44 Patch1: %{name}-destdir.patch
45 Patch2: %{name}-ncurses.patch
46 Patch3: %{name}-makedep.patch
47 Patch4: %{name}-dga.patch
48 URL: http://www.winehq.org/
50 BuildRequires: libSM-devel
51 BuildRequires: libXrandr-devel
52 BuildRequires: libXrender-devel
53 BuildRequires: libXt-devel
54 BuildRequires: libXv-devel
56 BuildRequires: XFree86-devel
58 BuildRequires: XFree86-OpenGL-devel-base
59 BuildRequires: XFree86-OpenGL-devel
60 %{?with_alsa:BuildRequires: alsa-lib-devel}
61 %{?with_arts:BuildRequires: artsc-devel}
62 BuildRequires: autoconf
63 BuildRequires: automake
65 # BuildRequires: chpax >= 0.20020901-2
66 %{?with_cups:BuildRequires: cups-devel}
67 BuildRequires: docbook-dtd31-sgml
68 BuildRequires: docbook-utils
70 BuildRequires: fontconfig-devel
71 BuildRequires: freetype-devel >= 2.0.5
72 %{?with_jack:BuildRequires: jack-audio-connection-kit-devel}
73 BuildRequires: libjpeg-devel
74 BuildRequires: libtool
75 BuildRequires: libungif-devel
76 %{?with_nas:BuildRequires: nas-devel}
77 BuildRequires: ncurses-devel
78 %if %{with html_docs} || %{with pdf_docs}
79 # db2* failed previously - probably openjade or opensp bug
80 BuildRequires: openjade >= 1:1.3.3-0.pre1
81 BuildRequires: opensp >= 1:1.5.1
83 BuildRequires: openssl-devel >= 0.9.7d
85 BuildRequires: tetex-latex-cyrillic
86 BuildRequires: tetex-metafont
87 BuildRequires: tetex-fonts-jknappen
88 BuildRequires: tetex-fonts-pazo
89 BuildRequires: tetex-fonts-stmaryrd
90 BuildRequires: tetex-fonts-type1-urw
92 %{?with_sane:BuildRequires: sane-backends-devel}
93 BuildRequires: xrender-devel
94 Requires(post): /sbin/ldconfig
95 Requires(post,preun): /sbin/chkconfig
96 # link to wine/ntdll.dll.so, without any SONAME
97 Provides: libntdll.dll.so
98 ExclusiveArch: %{ix86}
99 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
101 %define _noautoreqdep libGL.so.1 libGLU.so.1
102 %define no_install_post_strip 1
104 %define _winedir %{_datadir}/%{name}
106 %define getsoname() %((objdump -p %{1} 2>/dev/null || echo SONAME ERROR) | awk '/SONAME/ { print $2; s=1 }; END { if(s==0) print "ERROR" }')
109 Wine is a program which allows running Microsoft Windows programs
110 (including DOS, Windows 3.x and Win32 executables) on Unix. It
111 consists of a program loader which loads and executes a Microsoft
112 Windows binary, and a library that implements Windows API calls using
113 their Unix or X11 equivalents. The library may also be used for
114 porting Win32 code into native Unix executables.
117 Ejecuta programas Windows en Linux.
120 Wine jest programem dziêki któremu mo¿na uruchamiaæ programy napisane
121 dla Microsoft Windows pod systemami unixowymi. Sk³ada siê on z
122 loadera, który pozwala wczytywaæ i uruchamiaæ programy w formacie
123 Microsoft Windows oraz z biblioteki, która implementuje API Windows
124 przy u¿yciu odpowiedników Unixowych oraz z X11. Biblioteka mo¿e byæ
125 tak¿e wykorzystana do przenoszenia aplikacji Win32 do Unixa.
127 %description -l pt_BR
128 O Wine é um programa que permite rodar programas MS-Windows no X11.
129 Ele consiste de um carregador de programa, que carrega e executa um
130 binário MS-Windows, e de uma biblioteca de emulação que traduz as
131 chamadas da API para as equivalentes Unix/X11.
134 Summary: Wine - header files
135 Summary(es): Biblioteca de desarrollo de wine
136 Summary(pl): Wine - pliki nag³owkowe
137 Summary(pt_BR): Biblioteca de desenvolvimento do wine
138 Group: Development/Libraries
139 Requires: %{name} = %{version}-%{release}
144 %description devel -l es
145 Biblioteca de desarrollo de wine.
147 %description devel -l pl
148 Wine - pliki nag³ówkowe.
150 %description devel -l pt_BR
151 Arquivos de inclusão e bibliotecas para desenvolver aplicações com o
155 Summary: Wine - programs
156 Summary(pl): Wine - programy
158 Requires: %{name} = %{version}-%{release}
160 %description programs
163 %description programs -l pl
167 Summary: Wine documentation in PDF
168 Summary(pl): Dokumentacja Wine w formacie PDF
172 Wine documentation in PDF format.
174 %description doc-pdf -l pl
175 Dokumentacja Wine w formacie PDF.
178 Summary: Direct3D implementation DLLs for Wine
179 Summary(pl): Biblioteki DLL z implementacj± Direct3D dla Wine
180 Group: Applications/Emulators
181 Requires: %{name} = %{version}-%{release}
185 Direct3D implementation DLLs for Wine (through OpenGL).
187 %description dll-d3d -l pl
188 Biblioteki DLL z implementacj± Direct3D dla Wine (poprzez OpenGL).
191 Summary: OpenGL implementation DLLs for Wine
192 Summary(pl): Biblioteki DLL z implementacj± OpenGL dla Wine
193 Group: Applications/Emulators
194 Requires: %{name} = %{version}-%{release}
198 OpenGL implementation DLLs for Wine.
200 %description dll-gl -l pl
201 Biblioteki DLL z implementacj± OpenGL dla Wine.
204 Summary: TWAIN implementation DLL for Wine
205 Summary(pl): Biblioteka DLL z implementacj± TWAIN dla Wine
206 Group: Applications/Emulators
207 Requires: %{name} = %{version}-%{release}
209 %description dll-twain
210 TWAIN implementation DLL for Wine (through SANE).
212 %description dll-twain -l pl
213 Biblioteka DLL z implementacj± TWAIN dla Wine (poprzez SANE).
216 Summary: ALSA driver for WINE mm.dll implementation
217 Summary(pl): Sterownik ALSA dla implementacji mm.dll w Wine
218 Group: Applications/Emulators
219 Requires: %{name} = %{version}-%{release}
221 %description drv-alsa
222 ALSA driver for WINE mm.dll (multimedia system) implementation.
224 %description drv-alsa -l pl
225 Sterownik ALSA dla implementacji mm.dll (systemu multimediów) w Wine.
228 Summary: aRts driver for WINE mm.dll implementation
229 Summary(pl): Sterownik aRts dla implementacji mm.dll w Wine
230 Group: Applications/Emulators
231 Requires: %{name} = %{version}-%{release}
233 %description drv-arts
234 aRts driver for WINE mm.dll (multimedia system) implementation.
236 %description drv-arts -l pl
237 Sterownik aRts dla implementacji mm.dll (systemu multimediów) w Wine.
240 Summary: JACK driver for WINE mm.dll implementation
241 Summary(pl): Sterownik JACK dla implementacji mm.dll w Wine
242 Group: Applications/Emulators
243 Requires: %{name} = %{version}-%{release}
244 Requires: jack-audio-connection-kit
245 # dlopened by SONAME detected at build time
246 %{?with_jack:Requires: %{getsoname /usr/%{_lib}/libjack.so}}
248 %description drv-jack
249 JACK driver for WINE mm.dll (multimedia system) implementation.
251 %description drv-jack -l pl
252 Sterownik JACK dla implementacji mm.dll (systemu multimediów) w Wine.
255 Summary: NAS driver for WINE mm.dll implementation
256 Summary(pl): Sterownik NAS dla implementacji mm.dll w Wine
257 Group: Applications/Emulators
258 Requires: %{name} = %{version}-%{release}
261 NAS driver for WINE mm.dll (multimedia system) implementation.
263 %description drv-nas -l pl
264 Sterownik NAS dla implementacji mm.dll (systemu multimediów) w Wine.
274 # turn off compilation of some tools
275 #sed -e "s|winetest \\\|\\\|;s|avitools||" programs/Makefile.in > .tmp
276 sed -e "s|avitools||" programs/Makefile.in > .tmp
277 mv -f .tmp programs/Makefile.in
283 CPPFLAGS="-DALSA_PCM_OLD_HW_PARAMS_API"
284 CFLAGS="%{rpmcflags} $CPPFLAGS"
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_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}/wine-kthread
423 %attr(755,root,root) %{_bindir}/wine-pthread
424 %attr(755,root,root) %{_bindir}/wineboot
425 %attr(755,root,root) %{_bindir}/winebrowser
426 %attr(755,root,root) %{_bindir}/winecfg
427 %attr(755,root,root) %{_bindir}/wineclipsrv
428 %attr(755,root,root) %{_bindir}/winedbg
429 %attr(755,root,root) %{_bindir}/winelauncher
430 %attr(755,root,root) %{_bindir}/wineserver
431 %attr(755,root,root) %{_bindir}/wineshelllink
432 %attr(755,root,root) %{_libdir}/*.so*
434 %{_mandir}/man1/wine.*
435 %{_mandir}/man5/wine.conf.*
436 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/wine.reg
437 %config(missingok,noreplace) %verify(not size mtime md5) %{_sysconfdir}/wine.systemreg
438 %config(missingok,noreplace) %verify(not size mtime md5) %{_sysconfdir}/wine.userreg
439 %attr(754,root,root) %{_sysconfdir}/rc.d/init.d/wine
442 %files programs -f files.programs
443 %defattr(644,root,root,755)
446 %defattr(644,root,root,755)
447 %if %{with html_docs}
448 %doc documentation/{wine-devel,winelib-user}
450 %attr(755,root,root) %{_bindir}/fnt2bdf
451 %attr(755,root,root) %{_bindir}/function_grep.pl
452 %attr(755,root,root) %{_bindir}/hlp2sgml
453 %attr(755,root,root) %{_bindir}/widl
454 %attr(755,root,root) %{_bindir}/winebuild
455 %attr(755,root,root) %{_bindir}/winedump
456 %attr(755,root,root) %{_bindir}/wineg++
457 %attr(755,root,root) %{_bindir}/winegcc
458 %attr(755,root,root) %{_bindir}/winemaker
459 #%attr(755,root,root) %{_bindir}/winewrap
460 %attr(755,root,root) %{_bindir}/wmc
461 %attr(755,root,root) %{_bindir}/wrc
463 %{_mandir}/man1/widl.1*
464 %{_mandir}/man1/winedump.1*
465 %{_mandir}/man1/winemaker.1*
466 %{_mandir}/man1/winebuild.1*
467 %{_mandir}/man1/wmc.1*
468 %{_mandir}/man1/wrc.1*
473 %defattr(644,root,root,755)
474 %doc documentation/*.pdf
478 %defattr(644,root,root,755)
479 %attr(755,root,root) %{_libdir}/wine/d3d8.dll.so
480 %attr(755,root,root) %{_libdir}/wine/d3d9.dll.so
481 %attr(755,root,root) %{_libdir}/wine/d3dx8.dll.so
482 %attr(755,root,root) %{_libdir}/wine/wined3d.dll.so
485 %defattr(644,root,root,755)
486 %attr(755,root,root) %{_libdir}/wine/glu32.dll.so
487 %attr(755,root,root) %{_libdir}/wine/opengl32.dll.so
491 %defattr(644,root,root,755)
492 %attr(755,root,root) %{_libdir}/wine/twain_32.dll.so
497 %defattr(644,root,root,755)
498 %attr(755,root,root) %{_libdir}/wine/winealsa.drv.so
503 %defattr(644,root,root,755)
504 %attr(755,root,root) %{_libdir}/wine/winearts.drv.so
509 %defattr(644,root,root,755)
510 %attr(755,root,root) %{_libdir}/wine/winejack.drv.so
515 %defattr(644,root,root,755)
516 %attr(755,root,root) %{_libdir}/wine/winenas.drv.so
519 # additional dependencies in *.so not separated (yet?) from main package
520 # ddraw.dll.so,x11drv.dll.so depend on X11 libs
521 # ole2disp.dll.so,oleaut32.dll.so,typelib.dll.so depend on lib(un)gif,libjpeg,libX11
522 # ttydrv.dll.so depends on ncurses