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: wine detects the following SONAMES for dlopen at build time:
10 # libcrypto,libssl (wininet.dll)
11 # libcups (winspool.dll.so,wineps.dll.so)
12 # libcurses/libncurses (wineconsole program)
13 # libfontconfig (gdi32.dll.so)
14 # libfreetype (wineps.dll.so,gdi32.dll.so)
15 # libGL (x11drv.dll.so,ddraw.dll.so)
16 # libjack (winejack.drv.so - explicit dependency in subpackage)
17 # libX11, libXext, libXi, libXrender (x11drv.dll.so)
18 # thus requires rebuild after change of any of the above.
24 Summary: Program that lets you launch Win applications
25 Summary(es.UTF-8): Ejecuta programas Windows en Linux
26 Summary(pl.UTF-8): Program pozwalający uruchamiać aplikacje Windows
27 Summary(pt_BR.UTF-8): Executa programas Windows no Linux
33 Group: Applications/Emulators
34 Source0: http://ibiblio.org/pub/linux/system/emulators/wine/%{name}-%{version}.tar.bz2
35 # Source0-md5: 6535691a7558c53bbe66455c6df559a1
36 Patch0: %{name}-fontcache.patch
37 Patch1: %{name}-makedep.patch
38 Patch2: %{name}-ncurses.patch
39 #PatchX: %{name}-dga.patch
40 URL: http://www.winehq.org/
41 BuildRequires: OpenGL-GLU-devel
42 %{?with_alsa:BuildRequires: alsa-lib-devel}
43 %{?with_arts:BuildRequires: artsc-devel}
44 BuildRequires: autoconf
45 BuildRequires: automake
47 %{?with_cups:BuildRequires: cups-devel}
48 BuildRequires: docbook-dtd31-sgml
49 BuildRequires: docbook-utils
51 BuildRequires: fontconfig-devel
52 BuildRequires: fontforge
53 BuildRequires: freetype-devel >= 2.0.5
54 BuildRequires: giflib-devel
55 %{?with_jack:BuildRequires: jack-audio-connection-kit-devel}
56 BuildRequires: libjpeg-devel
57 BuildRequires: libtool
58 %{?with_nas:BuildRequires: nas-devel}
59 BuildRequires: ncurses-devel
60 # db2* failed previously - probably openjade or opensp bug
61 BuildRequires: openjade >= 1:1.3.3-0.pre1
62 BuildRequires: opensp >= 1:1.5.1
63 BuildRequires: openssl-devel >= 0.9.7d
64 %{?with_sane:BuildRequires: sane-backends-devel}
65 BuildRequires: valgrind
66 BuildRequires: xorg-lib-libXi-devel
67 BuildRequires: xorg-lib-libXmu-devel
68 BuildRequires: xorg-lib-libXrender-devel
69 BuildRequires: xorg-lib-libXxf86dga-devel
70 BuildRequires: xorg-lib-libXxf86vm-devel
71 Suggests: binfmt-detector
72 # link to wine/ntdll.dll.so, without any SONAME
73 Provides: libntdll.dll.so
74 Obsoletes: wine-doc-pdf
75 Obsoletes: wine-drv-arts
76 ExclusiveArch: %{ix86}
78 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
80 %define _noautoreqdep libGL.so.1 libGLU.so.1
81 %define no_install_post_strip 1
83 %define _winedir %{_datadir}/%{name}
85 %define getsoname() %((objdump -p %{1} 2>/dev/null || echo SONAME ERROR) | awk '/SONAME/ { print $2; s=1 }; END { if(s==0) print "ERROR" }')
87 %undefine debuginfocflags
90 Wine is a program which allows running Microsoft Windows programs
91 (including DOS, Windows 3.x and Win32 executables) on Unix. It
92 consists of a program loader which loads and executes a Microsoft
93 Windows binary, and a library that implements Windows API calls using
94 their Unix or X11 equivalents. The library may also be used for
95 porting Win32 code into native Unix executables.
97 %description -l es.UTF-8
98 Ejecuta programas Windows en Linux.
100 %description -l pl.UTF-8
101 Wine jest programem dzięki któremu można uruchamiać programy napisane
102 dla Microsoft Windows pod systemami uniksowymi. Składa się on z
103 loadera, który pozwala wczytywać i uruchamiać programy w formacie
104 Microsoft Windows, oraz z biblioteki, która implementuje API Windows
105 przy użyciu odpowiedników uniksowych oraz z X11. Biblioteka może być
106 także wykorzystana do przenoszenia aplikacji Win32 do Uniksa.
108 %description -l pt_BR.UTF-8
109 O Wine é um programa que permite rodar programas MS-Windows no X11.
110 Ele consiste de um carregador de programa, que carrega e executa um
111 binário MS-Windows, e de uma biblioteca de emulação que traduz as
112 chamadas da API para as equivalentes Unix/X11.
115 Summary: Wine - header files
116 Summary(es.UTF-8): Biblioteca de desarrollo de wine
117 Summary(pl.UTF-8): Wine - pliki nagłowkowe
118 Summary(pt_BR.UTF-8): Biblioteca de desenvolvimento do wine
119 Group: Development/Libraries
120 Requires: %{name} = %{epoch}:%{version}-%{release}
125 %description devel -l es.UTF-8
126 Biblioteca de desarrollo de wine.
128 %description devel -l pl.UTF-8
129 Wine - pliki nagłówkowe.
131 %description devel -l pt_BR.UTF-8
132 Arquivos de inclusão e bibliotecas para desenvolver aplicações com o
136 Summary: Wine - programs
137 Summary(pl.UTF-8): Wine - programy
139 Requires: %{name} = %{epoch}:%{version}-%{release}
141 %description programs
144 %description programs -l pl.UTF-8
148 Summary: Direct3D implementation DLLs for Wine
149 Summary(pl.UTF-8): Biblioteki DLL z implementacją Direct3D dla Wine
150 Group: Applications/Emulators
151 Requires: %{name} = %{epoch}:%{version}-%{release}
155 Direct3D implementation DLLs for Wine (through OpenGL).
157 %description dll-d3d -l pl.UTF-8
158 Biblioteki DLL z implementacją Direct3D dla Wine (poprzez OpenGL).
161 Summary: OpenGL implementation DLLs for Wine
162 Summary(pl.UTF-8): Biblioteki DLL z implementacją OpenGL dla Wine
163 Group: Applications/Emulators
164 Requires: %{name} = %{epoch}:%{version}-%{release}
168 OpenGL implementation DLLs for Wine.
170 %description dll-gl -l pl.UTF-8
171 Biblioteki DLL z implementacją OpenGL dla Wine.
174 Summary: TWAIN implementation DLL for Wine
175 Summary(pl.UTF-8): Biblioteka DLL z implementacją TWAIN dla Wine
176 Group: Applications/Emulators
177 Requires: %{name} = %{epoch}:%{version}-%{release}
179 %description dll-twain
180 TWAIN implementation DLL for Wine (through SANE).
182 %description dll-twain -l pl.UTF-8
183 Biblioteka DLL z implementacją TWAIN dla Wine (poprzez SANE).
186 Summary: ALSA driver for WINE mm.dll implementation
187 Summary(pl.UTF-8): Sterownik ALSA dla implementacji mm.dll w Wine
188 Group: Applications/Emulators
189 Requires: %{name} = %{epoch}:%{version}-%{release}
191 %description drv-alsa
192 ALSA driver for WINE mm.dll (multimedia system) implementation.
194 %description drv-alsa -l pl.UTF-8
195 Sterownik ALSA dla implementacji mm.dll (systemu multimediów) w Wine.
198 Summary: JACK driver for WINE mm.dll implementation
199 Summary(pl.UTF-8): Sterownik JACK-a dla implementacji mm.dll w Wine
200 Group: Applications/Emulators
201 Requires: %{name} = %{epoch}:%{version}-%{release}
202 Requires: jack-audio-connection-kit
203 # dlopened by SONAME detected at build time
204 %{?with_jack:Requires: %{getsoname /usr/%{_lib}/libjack.so}}
206 %description drv-jack
207 JACK driver for WINE mm.dll (multimedia system) implementation.
209 %description drv-jack -l pl.UTF-8
210 Sterownik JACK-a dla implementacji mm.dll (systemu multimediów) w
214 Summary: NAS driver for WINE mm.dll implementation
215 Summary(pl.UTF-8): Sterownik NAS dla implementacji mm.dll w Wine
216 Group: Applications/Emulators
217 Requires: %{name} = %{epoch}:%{version}-%{release}
220 NAS driver for WINE mm.dll (multimedia system) implementation.
222 %description drv-nas -l pl.UTF-8
223 Sterownik NAS dla implementacji mm.dll (systemu multimediów) w Wine.
231 # turn off compilation of some tools
232 sed -i -e "s|winetest \\\|\\\|;s|avitools||" programs/Makefile.in
233 #sed -i -e "s|avitools||" programs/Makefile.in
239 %{!?debug:--disable-debug} \
240 %{!?debug:--disable-trace} \
246 %{__make} -C programs
247 #%{__make} -C programs/regapi
250 rm -rf $RPM_BUILD_ROOT
251 install -d $RPM_BUILD_ROOT{%{_mandir}/man1,%{_aclocaldir}}
254 DESTDIR=$RPM_BUILD_ROOT
256 %{__make} -C programs install \
257 DESTDIR=$RPM_BUILD_ROOT
259 install tools/fnt2bdf $RPM_BUILD_ROOT%{_bindir}
261 install aclocal.m4 $RPM_BUILD_ROOT%{_aclocaldir}/wine.m4
262 #mv -f $RPM_BUILD_ROOT{/usr/X11R6/share/aclocal,%{_aclocaldir}}/wine.m4
265 $RPM_BUILD_ROOT%{_winedir}/windows/{system,Desktop,Favorites,Fonts} \
266 "$RPM_BUILD_ROOT%{_winedir}/windows/Start Menu/Programs/Startup" \
267 $RPM_BUILD_ROOT%{_winedir}/windows/{SendTo,ShellNew,system32,NetHood} \
268 $RPM_BUILD_ROOT%{_winedir}/windows/{Profiles/Administrator,Recent} \
269 $RPM_BUILD_ROOT%{_winedir}/{"Program Files/Common Files","My Documents"}
271 touch $RPM_BUILD_ROOT%{_winedir}/{autoexec.bat,config.sys,windows/win.ini}
272 touch $RPM_BUILD_ROOT%{_winedir}/windows/system/{shell.dll,shell32.dll}
273 touch $RPM_BUILD_ROOT%{_winedir}/windows/system/{winsock.dll,wsock32.dll}
275 cat >$RPM_BUILD_ROOT%{_winedir}/windows/system.ini <<EOF
279 waveaudio=mciwave.drv
281 videodisc=mcipionr.drv
286 %if %{?debug:0}%{!?debug:1}
287 echo "Strip executable binaries and shared object files."
288 filelist=`find $RPM_BUILD_ROOT -type f ! -regex ".*ld-[0-9.]*so.*"`
289 elfexelist=`echo $filelist | xargs -r file | \
290 awk '/ELF.*executable/ {print $1}' | cut -d: -f1`
291 elfsharedlist=`echo $filelist | xargs -r file | \
292 awk '/LF.*shared object/ {print $1}' | cut -d: -f1`; \
293 if [ -n "$elfexelist" ]; then \
294 strip -R .note -R .comment $elfexelist
296 if [ -n "$elfsharedlist" ]; then
297 strip --strip-unneeded -R .note -R .comment $elfsharedlist
301 # /sbin/chstk -e $RPM_BUILD_ROOT%{_bindir}/wine
303 programs="notepad progman regedit regsvr32 uninstaller wineconsole winefile winemine winepath winhelp"
306 rm -f files.so; touch files.so
307 rm -f files.programs; touch files.programs
308 cd $RPM_BUILD_ROOT%{_libdir}/wine
311 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)
314 echo "%attr(755,root,root) %{_libdir}/wine/$f" >>$BZZZ/files.so
318 for p in $programs; do
319 echo "%attr(755,root,root) %{_bindir}/$p" >> files.programs
320 echo "%attr(755,root,root) %{_libdir}/wine/$p.exe.so" >> files.programs
321 grep -v "$p\.exe\.so$" files.so > files.so.
322 mv -f files.so. files.so
326 rm -rf $RPM_BUILD_ROOT
328 %post -p /sbin/ldconfig
329 %postun -p /sbin/ldconfig
331 %triggerpostun -- wine < 1:0.9.12-1.9
332 rm -f /var/lock/subsys/wine
333 if [ -x /sbin/chkconfig ]; then
334 /sbin/chkconfig --del wine
338 %defattr(644,root,root,755)
339 %doc README ChangeLog AUTHORS ANNOUNCE
340 %lang(de) %doc documentation/README.de
341 %lang(es) %doc documentation/README.es
342 %lang(fr) %doc documentation/README.fr
343 %lang(it) %doc documentation/README.it
344 %lang(ko) %doc documentation/README.ko
345 %lang(nb) %doc documentation/README.no
346 %lang(pt) %doc documentation/README.pt
347 %lang(pt_BR) %doc documentation/README.pt_br
348 %attr(755,root,root) %{_bindir}/msiexec
349 %attr(755,root,root) %{_bindir}/wine
350 %attr(755,root,root) %{_bindir}/wineboot
351 %attr(755,root,root) %{_bindir}/winebrowser
352 %attr(755,root,root) %{_bindir}/winecfg
353 %attr(755,root,root) %{_bindir}/winedbg
354 %attr(755,root,root) %{_bindir}/wine-kthread
355 %attr(755,root,root) %{_bindir}/winelauncher
356 %attr(755,root,root) %{_bindir}/wineprefixcreate
357 %attr(755,root,root) %{_bindir}/wine-preloader
358 %attr(755,root,root) %{_bindir}/wine-pthread
359 %attr(755,root,root) %{_bindir}/wineserver
360 %attr(755,root,root) %{_bindir}/wineshelllink
361 %attr(755,root,root) %{_libdir}/*.so*
363 %{_libdir}/wine/*.dll16
364 %{_libdir}/wine/*.drv16
365 %{_libdir}/wine/*.exe16
366 %{_mandir}/man1/wine.1*
367 %{_mandir}/man1/winedbg.1*
368 %{_mandir}/man1/wineprefixcreate.1*
369 %{_mandir}/man1/wineserver.1*
371 %{_desktopdir}/wine.desktop
373 %files programs -f files.programs
374 %defattr(644,root,root,755)
377 %defattr(644,root,root,755)
378 %attr(755,root,root) %{_bindir}/fnt2bdf
379 %attr(755,root,root) %{_bindir}/function_grep.pl
380 %attr(755,root,root) %{_bindir}/widl
381 %attr(755,root,root) %{_bindir}/winebuild
382 %attr(755,root,root) %{_bindir}/winedump
383 %attr(755,root,root) %{_bindir}/wineg++
384 %attr(755,root,root) %{_bindir}/winegcc
385 %attr(755,root,root) %{_bindir}/winemaker
386 #%attr(755,root,root) %{_bindir}/winewrap
387 %attr(755,root,root) %{_bindir}/wmc
388 %attr(755,root,root) %{_bindir}/wrc
389 %{_libdir}/wine/lib*.def
390 # no shared variants, so not separated
391 %{_libdir}/wine/lib*.def.a
392 %{_libdir}/wine/libdx*.a
393 %{_libdir}/wine/libstrmiids.a
394 %{_libdir}/wine/libuuid.a
395 %{_libdir}/wine/libwinecrt0.a
397 %{_mandir}/man1/widl.1*
398 %{_mandir}/man1/winedump.1*
399 %{_mandir}/man1/winegcc.1*
400 %{_mandir}/man1/winemaker.1*
401 %{_mandir}/man1/winebuild.1*
402 %{_mandir}/man1/wmc.1*
403 %{_mandir}/man1/wrc.1*
407 %defattr(644,root,root,755)
408 %attr(755,root,root) %{_libdir}/wine/d3d8.dll.so
409 %attr(755,root,root) %{_libdir}/wine/d3d9.dll.so
410 %attr(755,root,root) %{_libdir}/wine/d3dx8.dll.so
411 %attr(755,root,root) %{_libdir}/wine/wined3d.dll.so
414 %defattr(644,root,root,755)
415 %attr(755,root,root) %{_libdir}/wine/glu32.dll.so
416 %attr(755,root,root) %{_libdir}/wine/opengl32.dll.so
420 %defattr(644,root,root,755)
421 %attr(755,root,root) %{_libdir}/wine/sane.ds.so
422 %attr(755,root,root) %{_libdir}/wine/twain*.dll.so
427 %defattr(644,root,root,755)
428 %attr(755,root,root) %{_libdir}/wine/winealsa.drv.so
433 %defattr(644,root,root,755)
434 %attr(755,root,root) %{_libdir}/wine/winejack.drv.so
439 %defattr(644,root,root,755)
440 %attr(755,root,root) %{_libdir}/wine/winenas.drv.so
443 # additional dependencies in *.so not separated (yet?) from main package
444 # ddraw.dll.so,x11drv.dll.so depend on X11 libs
445 # ole2disp.dll.so,oleaut32.dll.so,typelib.dll.so depend on lib(un)gif,libjpeg,libX11
446 # ttydrv.dll.so depends on ncurses