3 %bcond_without alsa # don't build ALSA mm driver
4 %bcond_without jack # don't build JACK mm driver
5 %bcond_without nas # don't build NAS mm driver
6 %bcond_without sane # don't build TWAIN DLL with scanning support (through SANE)
7 %bcond_without cups # without CUPS printing support in winspool,wineps DLLs
9 # NOTE: wineconsole is a bit broken: try wineconsole cmd to see what will happen
10 # As a workaroound use `wineconsole --backend=user cmd' (works fine)
11 # ref: http://bugs.winehq.org/show_bug.cgi?id=8069
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.UTF-8): Ejecuta programas Windows en Linux
30 Summary(pl.UTF-8): Program pozwalający uruchamiać aplikacje Windows
31 Summary(pt_BR.UTF-8): Executa programas Windows no Linux
37 Group: Applications/Emulators
38 Source0: http://ibiblio.org/pub/linux/system/emulators/wine/%{name}-%{version}.tar.bz2
39 # Source0-md5: 1cf4fddfe2432f43f8461a0f064d34c5
40 Patch0: %{name}-fontcache.patch
41 Patch1: %{name}-makedep.patch
42 Patch2: %{name}-ncurses.patch
43 Patch3: %{name}-bug9177_workaround.patch
44 #PatchX: %{name}-dga.patch
45 URL: http://www.winehq.org/
46 BuildRequires: OpenGL-GLU-devel
47 %{?with_alsa:BuildRequires: alsa-lib-devel}
48 %{?with_arts:BuildRequires: artsc-devel}
49 BuildRequires: autoconf
50 BuildRequires: automake
52 %{?with_cups:BuildRequires: cups-devel}
53 BuildRequires: docbook-dtd31-sgml
54 BuildRequires: docbook-utils
56 BuildRequires: fontconfig-devel
57 BuildRequires: fontforge
58 BuildRequires: freetype-devel >= 2.0.5
59 BuildRequires: giflib-devel
60 %{?with_jack:BuildRequires: jack-audio-connection-kit-devel}
61 BuildRequires: libjpeg-devel
62 BuildRequires: libtool
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: openldap-devel >= 2.4.6
68 BuildRequires: opensp >= 1:1.5.1
69 BuildRequires: openssl-devel >= 0.9.7d
70 %{?with_sane:BuildRequires: sane-backends-devel}
71 BuildRequires: valgrind
72 BuildRequires: xorg-lib-libXi-devel
73 BuildRequires: xorg-lib-libXmu-devel
74 BuildRequires: xorg-lib-libXrender-devel
75 BuildRequires: xorg-lib-libXxf86dga-devel
76 BuildRequires: xorg-lib-libXxf86vm-devel
77 Suggests: binfmt-detector
79 Suggests: xorg-app-xmessage
80 # link to wine/ntdll.dll.so, without any SONAME
81 Provides: libntdll.dll.so
82 Obsoletes: wine-doc-pdf
83 Obsoletes: wine-drv-arts
84 ExclusiveArch: %{ix86}
86 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
88 %define _noautoreqdep libGL.so.1 libGLU.so.1
89 %define no_install_post_strip 1
91 %define _winedir %{_datadir}/%{name}
93 %define getsoname() %((objdump -p %{1} 2>/dev/null || echo SONAME ERROR) | awk '/SONAME/ { print $2; s=1 }; END { if(s==0) print "ERROR" }')
95 %undefine debuginfocflags
98 Wine is a program which allows running Microsoft Windows programs
99 (including DOS, Windows 3.x and Win32 executables) on Unix. It
100 consists of a program loader which loads and executes a Microsoft
101 Windows binary, and a library that implements Windows API calls using
102 their Unix or X11 equivalents. The library may also be used for
103 porting Win32 code into native Unix executables.
105 %description -l es.UTF-8
106 Ejecuta programas Windows en Linux.
108 %description -l pl.UTF-8
109 Wine jest programem dzięki któremu można uruchamiać programy napisane
110 dla Microsoft Windows pod systemami uniksowymi. Składa się on z
111 loadera, który pozwala wczytywać i uruchamiać programy w formacie
112 Microsoft Windows, oraz z biblioteki, która implementuje API Windows
113 przy użyciu odpowiedników uniksowych oraz z X11. Biblioteka może być
114 także wykorzystana do przenoszenia aplikacji Win32 do Uniksa.
116 %description -l pt_BR.UTF-8
117 O Wine é um programa que permite rodar programas MS-Windows no X11.
118 Ele consiste de um carregador de programa, que carrega e executa um
119 binário MS-Windows, e de uma biblioteca de emulação que traduz as
120 chamadas da API para as equivalentes Unix/X11.
123 Summary: Wine - header files
124 Summary(es.UTF-8): Biblioteca de desarrollo de wine
125 Summary(pl.UTF-8): Wine - pliki nagłowkowe
126 Summary(pt_BR.UTF-8): Biblioteca de desenvolvimento do wine
127 Group: Development/Libraries
128 Requires: %{name} = %{epoch}:%{version}-%{release}
133 %description devel -l es.UTF-8
134 Biblioteca de desarrollo de wine.
136 %description devel -l pl.UTF-8
137 Wine - pliki nagłówkowe.
139 %description devel -l pt_BR.UTF-8
140 Arquivos de inclusão e bibliotecas para desenvolver aplicações com o
144 Summary: Wine - programs
145 Summary(pl.UTF-8): Wine - programy
147 Requires: %{name} = %{epoch}:%{version}-%{release}
149 %description programs
152 %description programs -l pl.UTF-8
156 Summary: Direct3D implementation DLLs for Wine
157 Summary(pl.UTF-8): Biblioteki DLL z implementacją Direct3D dla Wine
158 Group: Applications/Emulators
159 Requires: %{name} = %{epoch}:%{version}-%{release}
163 Direct3D implementation DLLs for Wine (through OpenGL).
165 %description dll-d3d -l pl.UTF-8
166 Biblioteki DLL z implementacją Direct3D dla Wine (poprzez OpenGL).
169 Summary: OpenGL implementation DLLs for Wine
170 Summary(pl.UTF-8): Biblioteki DLL z implementacją OpenGL dla Wine
171 Group: Applications/Emulators
172 Requires: %{name} = %{epoch}:%{version}-%{release}
176 OpenGL implementation DLLs for Wine.
178 %description dll-gl -l pl.UTF-8
179 Biblioteki DLL z implementacją OpenGL dla Wine.
182 Summary: TWAIN implementation DLL for Wine
183 Summary(pl.UTF-8): Biblioteka DLL z implementacją TWAIN dla Wine
184 Group: Applications/Emulators
185 Requires: %{name} = %{epoch}:%{version}-%{release}
187 %description dll-twain
188 TWAIN implementation DLL for Wine (through SANE).
190 %description dll-twain -l pl.UTF-8
191 Biblioteka DLL z implementacją TWAIN dla Wine (poprzez SANE).
194 Summary: ALSA driver for WINE mm.dll implementation
195 Summary(pl.UTF-8): Sterownik ALSA dla implementacji mm.dll w Wine
196 Group: Applications/Emulators
197 Requires: %{name} = %{epoch}:%{version}-%{release}
199 %description drv-alsa
200 ALSA driver for WINE mm.dll (multimedia system) implementation.
202 %description drv-alsa -l pl.UTF-8
203 Sterownik ALSA dla implementacji mm.dll (systemu multimediów) w Wine.
206 Summary: JACK driver for WINE mm.dll implementation
207 Summary(pl.UTF-8): 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}}
214 %description drv-jack
215 JACK driver for WINE mm.dll (multimedia system) implementation.
217 %description drv-jack -l pl.UTF-8
218 Sterownik JACK-a dla implementacji mm.dll (systemu multimediów) w
222 Summary: NAS driver for WINE mm.dll implementation
223 Summary(pl.UTF-8): Sterownik NAS dla implementacji mm.dll w Wine
224 Group: Applications/Emulators
225 Requires: %{name} = %{epoch}:%{version}-%{release}
228 NAS driver for WINE mm.dll (multimedia system) implementation.
230 %description drv-nas -l pl.UTF-8
231 Sterownik NAS dla implementacji mm.dll (systemu multimediów) w Wine.
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
248 %{!?debug:--disable-debug} \
249 %{!?debug:--disable-trace} \
255 %{__make} -C programs
256 #%{__make} -C programs/regapi
259 rm -rf $RPM_BUILD_ROOT
260 install -d $RPM_BUILD_ROOT{%{_mandir}/man1,%{_aclocaldir}}
263 DESTDIR=$RPM_BUILD_ROOT
265 %{__make} -C programs install \
266 DESTDIR=$RPM_BUILD_ROOT
268 install tools/fnt2bdf $RPM_BUILD_ROOT%{_bindir}
270 install aclocal.m4 $RPM_BUILD_ROOT%{_aclocaldir}/wine.m4
271 #mv -f $RPM_BUILD_ROOT{/usr/X11R6/share/aclocal,%{_aclocaldir}}/wine.m4
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"}
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}
284 cat >$RPM_BUILD_ROOT%{_winedir}/windows/system.ini <<EOF
288 waveaudio=mciwave.drv
290 videodisc=mcipionr.drv
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
305 if [ -n "$elfsharedlist" ]; then
306 strip --strip-unneeded -R .note -R .comment $elfsharedlist
310 # /sbin/chstk -e $RPM_BUILD_ROOT%{_bindir}/wine
312 programs="notepad progman regedit regsvr32 uninstaller wineconsole winefile winemine winepath winhelp"
315 rm -f files.so; touch files.so
316 rm -f files.programs; touch files.programs
317 cd $RPM_BUILD_ROOT%{_libdir}/wine
320 d3d8.dll.so|d3d9.dll.so|d3dx8.dll.so|glu32.dll.so|opengl32.dll.so|sane.ds.so|twain.dll.so|twain_32.dll.so|winealsa.drv.so|winejack.drv.so|winenas.drv.so)
323 echo "%attr(755,root,root) %{_libdir}/wine/$f" >>$BZZZ/files.so
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
335 rm -rf $RPM_BUILD_ROOT
337 %post -p /sbin/ldconfig
338 %postun -p /sbin/ldconfig
340 %triggerpostun -- wine < 1:0.9.12-1.9
341 rm -f /var/lock/subsys/wine
342 if [ -x /sbin/chkconfig ]; then
343 /sbin/chkconfig --del wine
347 %defattr(644,root,root,755)
348 %doc README ChangeLog AUTHORS ANNOUNCE
349 %lang(de) %doc documentation/README.de
350 %lang(es) %doc documentation/README.es
351 %lang(fr) %doc documentation/README.fr
352 %lang(it) %doc documentation/README.it
353 %lang(ko) %doc documentation/README.ko
354 %lang(nb) %doc documentation/README.no
355 %lang(pt) %doc documentation/README.pt
356 %lang(pt_BR) %doc documentation/README.pt_br
357 %attr(755,root,root) %{_bindir}/msiexec
358 %attr(755,root,root) %{_bindir}/wine
359 %attr(755,root,root) %{_bindir}/wineboot
360 %attr(755,root,root) %{_bindir}/winebrowser
361 %attr(755,root,root) %{_bindir}/winecfg
362 %attr(755,root,root) %{_bindir}/winedbg
363 %attr(755,root,root) %{_bindir}/wine-kthread
364 %attr(755,root,root) %{_bindir}/winelauncher
365 %attr(755,root,root) %{_bindir}/wineprefixcreate
366 %attr(755,root,root) %{_bindir}/wine-preloader
367 %attr(755,root,root) %{_bindir}/wine-pthread
368 %attr(755,root,root) %{_bindir}/wineserver
369 %attr(755,root,root) %{_bindir}/wineshelllink
370 %attr(755,root,root) %{_libdir}/*.so*
372 %{_libdir}/wine/*.dll16
373 %{_libdir}/wine/*.drv16
374 %{_libdir}/wine/*.exe16
375 %{_mandir}/man1/wine.1*
376 %{_mandir}/man1/winedbg.1*
377 %{_mandir}/man1/wineprefixcreate.1*
378 %{_mandir}/man1/wineserver.1*
380 %{_desktopdir}/wine.desktop
382 %files programs -f files.programs
383 %defattr(644,root,root,755)
386 %defattr(644,root,root,755)
387 %attr(755,root,root) %{_bindir}/fnt2bdf
388 %attr(755,root,root) %{_bindir}/function_grep.pl
389 %attr(755,root,root) %{_bindir}/widl
390 %attr(755,root,root) %{_bindir}/winebuild
391 %attr(755,root,root) %{_bindir}/winedump
392 %attr(755,root,root) %{_bindir}/wineg++
393 %attr(755,root,root) %{_bindir}/winegcc
394 %attr(755,root,root) %{_bindir}/winemaker
395 %attr(755,root,root) %{_bindir}/winecpp
396 #%attr(755,root,root) %{_bindir}/winewrap
397 %attr(755,root,root) %{_bindir}/wmc
398 %attr(755,root,root) %{_bindir}/wrc
399 %{_libdir}/wine/lib*.def
400 # no shared variants, so not separated
401 %{_libdir}/wine/lib*.def.a
402 %{_libdir}/wine/libdx*.a
403 %{_libdir}/wine/libstrmiids.a
404 %{_libdir}/wine/libuuid.a
405 %{_libdir}/wine/libwinecrt0.a
407 %{_mandir}/man1/widl.1*
408 %{_mandir}/man1/winedump.1*
409 %{_mandir}/man1/winegcc.1*
410 %{_mandir}/man1/winemaker.1*
411 %{_mandir}/man1/winebuild.1*
412 %{_mandir}/man1/wmc.1*
413 %{_mandir}/man1/wrc.1*
417 %defattr(644,root,root,755)
418 %attr(755,root,root) %{_libdir}/wine/d3d8.dll.so
419 %attr(755,root,root) %{_libdir}/wine/d3d9.dll.so
420 %attr(755,root,root) %{_libdir}/wine/d3dx8.dll.so
421 %attr(755,root,root) %{_libdir}/wine/wined3d.dll.so
424 %defattr(644,root,root,755)
425 %attr(755,root,root) %{_libdir}/wine/glu32.dll.so
426 %attr(755,root,root) %{_libdir}/wine/opengl32.dll.so
430 %defattr(644,root,root,755)
431 %attr(755,root,root) %{_libdir}/wine/sane.ds.so
432 %attr(755,root,root) %{_libdir}/wine/twain*.dll.so
437 %defattr(644,root,root,755)
438 %attr(755,root,root) %{_libdir}/wine/winealsa.drv.so
443 %defattr(644,root,root,755)
444 %attr(755,root,root) %{_libdir}/wine/winejack.drv.so
449 %defattr(644,root,root,755)
450 %attr(755,root,root) %{_libdir}/wine/winenas.drv.so
453 # additional dependencies in *.so not separated (yet?) from main package
454 # ddraw.dll.so,x11drv.dll.so depend on X11 libs
455 # ole2disp.dll.so,oleaut32.dll.so,typelib.dll.so depend on lib(un)gif,libjpeg,libX11
456 # ttydrv.dll.so depends on ncurses