]> git.pld-linux.org Git - packages/wine.git/blob - wine.spec
- rel 2
[packages/wine.git] / wine.spec
1 #
2 # Conditional build:
3 %bcond_without  alsa            # don't build ALSA mm driver
4 %bcond_with     esd             # build ESD 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 #
10 # TODO:
11 # - support for CAPI (ISDN support; --with-capi)
12 #
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.
23 #
24 # JACK requires ALSA
25 %if %{without alsa}
26 %undefine       with_jack
27 %endif
28
29 Summary:        Program that lets you launch Win applications
30 Summary(es.UTF-8):      Ejecuta programas Windows en Linux
31 Summary(pl.UTF-8):      Program pozwalający uruchamiać aplikacje Windows
32 Summary(pt_BR.UTF-8):   Executa programas Windows no Linux
33 Name:           wine
34 Version:        1.2
35 Release:        2
36 Epoch:          1
37 License:        LGPL
38 Group:          Applications/Emulators
39 Source0:        http://ibiblio.org/pub/linux/system/emulators/wine/%{name}-%{version}.tar.bz2
40 # Source0-md5:  eb4e5423b277fc1e77807b04f366f7b7
41 Source1:        http://downloads.sourceforge.net/wine/wine_gecko-1.0.0-x86.cab
42 # Source1-md5:  9c5c335fc077c0558561afaf25a09e51
43 Source2:        %{name}-uninstaller.desktop
44 Patch0:         %{name}-fontcache.patch
45 Patch1:         %{name}-makedep.patch
46 Patch2:         %{name}-ncurses.patch
47 Patch4:         %{name}-disable-valgrind.patch
48 Patch5:         %{name}-ca_certificates.patch
49 Patch6:         %{name}-notarget.patch
50 Patch7:         %{name}-manpaths.patch
51 #PatchX:        %{name}-dga.patch
52 URL:            http://www.winehq.org/
53 BuildRequires:  OpenAL-devel >= 1.1
54 BuildRequires:  OpenGL-GLU-devel
55 %{?with_alsa:BuildRequires:     alsa-lib-devel}
56 %{?with_arts:BuildRequires:     artsc-devel}
57 BuildRequires:  autoconf
58 BuildRequires:  automake
59 BuildRequires:  bison
60 %{?with_cups:BuildRequires:     cups-devel}
61 BuildRequires:  docbook-dtd31-sgml
62 BuildRequires:  docbook-utils
63 %{?with_esd:BuildRequires:      esound-devel}
64 BuildRequires:  flex
65 BuildRequires:  fontconfig-devel
66 BuildRequires:  fontforge
67 BuildRequires:  freetype-devel >= 2.0.5
68 BuildRequires:  giflib-devel
69 BuildRequires:  gnutls-devel
70 BuildRequires:  hal-devel
71 %{?with_jack:BuildRequires:     jack-audio-connection-kit-devel}
72 BuildRequires:  lcms-devel
73 BuildRequires:  libgphoto2-devel
74 BuildRequires:  libgsm-devel
75 BuildRequires:  libjpeg-devel
76 BuildRequires:  libmpg123-devel >= 1.5.0
77 BuildRequires:  libtool
78 BuildRequires:  libv4l-devel
79 BuildRequires:  libxslt-devel
80 %{?with_nas:BuildRequires:      nas-devel}
81 BuildRequires:  ncurses-devel
82 # db2* failed previously - probably openjade or opensp bug
83 BuildRequires:  openjade >= 1:1.3.3-0.pre1
84 BuildRequires:  openldap-devel
85 BuildRequires:  opensp >= 1:1.5.1
86 BuildRequires:  openssl-devel >= 0.9.7d
87 BuildRequires:  pkgconfig
88 %{?with_sane:BuildRequires:     sane-backends-devel}
89 BuildRequires:  unixODBC-devel >= 2.2.12-2
90 #BuildRequires: valgrind
91 BuildRequires:  xorg-lib-libXcomposite-devel
92 BuildRequires:  xorg-lib-libXcursor-devel
93 BuildRequires:  xorg-lib-libXi-devel
94 BuildRequires:  xorg-lib-libXinerama-devel
95 BuildRequires:  xorg-lib-libXmu-devel
96 BuildRequires:  xorg-lib-libXrandr-devel
97 BuildRequires:  xorg-lib-libXrender-devel
98 BuildRequires:  xorg-lib-libXxf86dga-devel
99 BuildRequires:  xorg-lib-libXxf86vm-devel
100 Requires:       libfreetype.so.6
101 Suggests:       binfmt-detector
102 Suggests:       ca-certificates
103 Conflicts:      ca-certificates < 20080809-4
104 # for printing needs lpr
105 Suggests:       cups-clients
106 # for winelauncher
107 Suggests:       xorg-app-xmessage
108 # for ntlm_auth
109 Suggests:       samba-common >= 1:3.0.25
110 # link to wine/ntdll.dll.so, without any SONAME
111 Provides:       libntdll.dll.so
112 Obsoletes:      wine-doc-pdf
113 Obsoletes:      wine-drv-arts
114 ExclusiveArch:  %{ix86}
115 ExcludeArch:    i386
116 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
117
118 %define         _noautoreqdep           libGL.so.1 libGLU.so.1
119 %define         no_install_post_strip   1
120
121 %define         _winedir                %{_datadir}/%{name}
122
123 %define         getsoname()     %((objdump -p %{1} 2>/dev/null || echo SONAME ERROR) | awk '/SONAME/ { print $2; s=1 }; END { if(s==0) print "ERROR" }')
124
125 %undefine       debuginfocflags
126
127 %description
128 Wine is a program which allows running Microsoft Windows programs
129 (including DOS, Windows 3.x and Win32 executables) on Unix. It
130 consists of a program loader which loads and executes a Microsoft
131 Windows binary, and a library that implements Windows API calls using
132 their Unix or X11 equivalents. The library may also be used for
133 porting Win32 code into native Unix executables.
134
135 %description -l es.UTF-8
136 Ejecuta programas Windows en Linux.
137
138 %description -l pl.UTF-8
139 Wine jest programem dzięki któremu można uruchamiać programy napisane
140 dla Microsoft Windows pod systemami uniksowymi. Składa się on z
141 loadera, który pozwala wczytywać i uruchamiać programy w formacie
142 Microsoft Windows, oraz z biblioteki, która implementuje API Windows
143 przy użyciu odpowiedników uniksowych oraz z X11. Biblioteka może być
144 także wykorzystana do przenoszenia aplikacji Win32 do Uniksa.
145
146 %description -l pt_BR.UTF-8
147 O Wine é um programa que permite rodar programas MS-Windows no X11.
148 Ele consiste de um carregador de programa, que carrega e executa um
149 binário MS-Windows, e de uma biblioteca de emulação que traduz as
150 chamadas da API para as equivalentes Unix/X11.
151
152 %package devel
153 Summary:        Wine - header files
154 Summary(es.UTF-8):      Biblioteca de desarrollo de wine
155 Summary(pl.UTF-8):      Wine - pliki nagłowkowe
156 Summary(pt_BR.UTF-8):   Biblioteca de desenvolvimento do wine
157 Group:          Development/Libraries
158 Requires:       %{name} = %{epoch}:%{version}-%{release}
159
160 %description devel
161 Wine - header files.
162
163 %description devel -l es.UTF-8
164 Biblioteca de desarrollo de wine.
165
166 %description devel -l pl.UTF-8
167 Wine - pliki nagłówkowe.
168
169 %description devel -l pt_BR.UTF-8
170 Arquivos de inclusão e bibliotecas para desenvolver aplicações com o
171 WINE.
172
173 %package programs
174 Summary:        Wine - programs
175 Summary(pl.UTF-8):      Wine - programy
176 Group:          Applications
177 Requires:       %{name} = %{epoch}:%{version}-%{release}
178
179 %description programs
180 Wine - programs.
181
182 %description programs -l pl.UTF-8
183 Wine - programy.
184
185 %package dll-d3d
186 Summary:        Direct3D implementation DLLs for Wine
187 Summary(pl.UTF-8):      Biblioteki DLL z implementacją Direct3D dla Wine
188 Group:          Applications/Emulators
189 Requires:       %{name} = %{epoch}:%{version}-%{release}
190 Requires:       OpenGL
191
192 %description dll-d3d
193 Direct3D implementation DLLs for Wine (through OpenGL).
194
195 %description dll-d3d -l pl.UTF-8
196 Biblioteki DLL z implementacją Direct3D dla Wine (poprzez OpenGL).
197
198 %package dll-gl
199 Summary:        OpenGL implementation DLLs for Wine
200 Summary(pl.UTF-8):      Biblioteki DLL z implementacją OpenGL dla Wine
201 Group:          Applications/Emulators
202 Requires:       %{name} = %{epoch}:%{version}-%{release}
203 Requires:       OpenGL
204
205 %description dll-gl
206 OpenGL implementation DLLs for Wine.
207
208 %description dll-gl -l pl.UTF-8
209 Biblioteki DLL z implementacją OpenGL dla Wine.
210
211 %package dll-twain
212 Summary:        TWAIN implementation DLL for Wine
213 Summary(pl.UTF-8):      Biblioteka DLL z implementacją TWAIN dla Wine
214 Group:          Applications/Emulators
215 Requires:       %{name} = %{epoch}:%{version}-%{release}
216
217 %description dll-twain
218 TWAIN implementation DLL for Wine (through SANE).
219
220 %description dll-twain -l pl.UTF-8
221 Biblioteka DLL z implementacją TWAIN dla Wine (poprzez SANE).
222
223 %package drv-alsa
224 Summary:        ALSA driver for WINE mm.dll implementation
225 Summary(pl.UTF-8):      Sterownik ALSA dla implementacji mm.dll w Wine
226 Group:          Applications/Emulators
227 Requires:       %{name} = %{epoch}:%{version}-%{release}
228
229 %description drv-alsa
230 ALSA driver for WINE mm.dll (multimedia system) implementation.
231
232 %description drv-alsa -l pl.UTF-8
233 Sterownik ALSA dla implementacji mm.dll (systemu multimediów) w Wine.
234
235 %package drv-jack
236 Summary:        JACK driver for WINE mm.dll implementation
237 Summary(pl.UTF-8):      Sterownik JACK-a dla implementacji mm.dll w Wine
238 Group:          Applications/Emulators
239 Requires:       %{name} = %{epoch}:%{version}-%{release}
240 Requires:       jack-audio-connection-kit
241 # dlopened by SONAME detected at build time
242 %{?with_jack:Requires:  %{getsoname /usr/%{_lib}/libjack.so}}
243
244 %description drv-jack
245 JACK driver for WINE mm.dll (multimedia system) implementation.
246
247 %description drv-jack -l pl.UTF-8
248 Sterownik JACK-a dla implementacji mm.dll (systemu multimediów) w
249 Wine.
250
251 %package drv-nas
252 Summary:        NAS driver for WINE mm.dll implementation
253 Summary(pl.UTF-8):      Sterownik NAS dla implementacji mm.dll w Wine
254 Group:          Applications/Emulators
255 Requires:       %{name} = %{epoch}:%{version}-%{release}
256
257 %description drv-nas
258 NAS driver for WINE mm.dll (multimedia system) implementation.
259
260 %description drv-nas -l pl.UTF-8
261 Sterownik NAS dla implementacji mm.dll (systemu multimediów) w Wine.
262
263 %prep
264 %setup -q
265 %patch0 -p1
266 %patch1 -p1
267 %patch2 -p1
268 %patch4 -p1
269 %patch5 -p1
270 %patch6 -p1
271 %patch7 -p1
272
273 %build
274 %{__autoconf}
275 %{__autoheader}
276 %configure \
277         --with%{!?with_alsa:out}-alsa \
278         --with-audioio \
279         --without-capi \
280         --with-cms \
281         --with-coreaudio \
282         --with%{!?with_cups:out}-cups \
283         --with-curses \
284         --with%{!?with_esd:out}-esd \
285         --with-fontconfig \
286         --with-freetype \
287         --with-glu \
288         --with-gnutls \
289         --with-gphoto \
290         --with-gsm \
291         --with-hal \
292         --with%{!?with_jack:out}-jack \
293         --with-jpeg \
294         --with-ldap \
295         --with-mpg123 \
296         --with%{!?with_nas:out}-nas \
297         --with-opengl \
298         --with-openssl \
299         --with-oss \
300         --with-png \
301         --with-pthread \
302         --with%{!?with_sane:out}-sane \
303         --with-xcomposite \
304         --with-xcursor \
305         --with-xinerama \
306         --with-xinput \
307         --with-xml \
308         --with-xrandr \
309         --with-xrender \
310         --with-xshape \
311         --with-xshm \
312         --with-xslt \
313         --with-xxf86vm \
314         --with-x
315 %{__make} depend
316 %{__make}
317
318 %install
319 rm -rf $RPM_BUILD_ROOT
320 install -d $RPM_BUILD_ROOT{%{_mandir}/man1,%{_aclocaldir}}
321
322 %{__make} install \
323         DESTDIR=$RPM_BUILD_ROOT
324
325 install tools/fnt2bdf $RPM_BUILD_ROOT%{_bindir}
326
327 install aclocal.m4 $RPM_BUILD_ROOT%{_aclocaldir}/wine.m4
328
329 install -d \
330         $RPM_BUILD_ROOT%{_winedir}/windows/{system,Desktop,Favorites,Fonts} \
331         "$RPM_BUILD_ROOT%{_winedir}/windows/Start Menu/Programs/Startup" \
332         $RPM_BUILD_ROOT%{_winedir}/windows/{SendTo,ShellNew,system32,NetHood} \
333         $RPM_BUILD_ROOT%{_winedir}/windows/{Profiles/Administrator,Recent} \
334         $RPM_BUILD_ROOT%{_winedir}/{"Program Files/Common Files","My Documents"}
335
336 touch $RPM_BUILD_ROOT%{_winedir}/{autoexec.bat,config.sys,windows/win.ini}
337 touch $RPM_BUILD_ROOT%{_winedir}/windows/system/{shell.dll,shell32.dll}
338 touch $RPM_BUILD_ROOT%{_winedir}/windows/system/{winsock.dll,wsock32.dll}
339
340 cat > $RPM_BUILD_ROOT%{_winedir}/windows/system.ini <<'EOF'
341 [mci]
342 cdaudio=mcicda.drv
343 sequencer=mciseq.drv
344 waveaudio=mciwave.drv
345 avivideo=mciavi.drv
346 videodisc=mcipionr.drv
347 vcr=mciviscd.drv
348 MPEGVideo=mciqtz.drv
349 EOF
350
351 %if %{?debug:0}%{!?debug:1}
352 echo "Strip executable binaries and shared object files."
353 filelist=`find $RPM_BUILD_ROOT -type f ! -regex ".*ld-[0-9.]*so.*"`
354 elfexelist=`echo $filelist | xargs -r file | \
355         awk '/ELF.*executable/ {print $1}' | cut -d: -f1`
356 elfsharedlist=`echo $filelist | xargs -r file | \
357         awk '/LF.*shared object/ {print $1}' | cut -d: -f1`; \
358 if [ -n "$elfexelist" ]; then \
359         strip -R .note -R .comment $elfexelist
360 fi
361 if [ -n "$elfsharedlist" ]; then
362         strip --strip-unneeded -R .note -R .comment $elfsharedlist
363 fi
364 %endif
365
366 # /sbin/chstk -e $RPM_BUILD_ROOT%{_bindir}/wine
367
368 programs="notepad regedit regsvr32 wineconsole winefile winemine winepath"
369
370 BZZZ=`pwd`
371 rm -f files.so;         touch files.so
372 rm -f files.programs;   touch files.programs
373 cd $RPM_BUILD_ROOT%{_libdir}/wine
374 for f in *.so; do
375         case $f in
376                 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)
377                         ;;
378                 *)
379                         echo "%attr(755,root,root) %{_libdir}/wine/$f" >>$BZZZ/files.so
380         esac
381 done
382 cd -
383 for p in $programs; do
384         echo "%attr(755,root,root) %{_bindir}/$p" >> files.programs
385         echo "%attr(755,root,root) %{_libdir}/wine/$p.exe.so" >> files.programs
386         grep -v "$p\.exe\.so$" files.so > files.so.
387         mv -f files.so. files.so
388 done
389
390 install -d $RPM_BUILD_ROOT%{_winedir}/gecko
391 install %{SOURCE1} $RPM_BUILD_ROOT%{_winedir}/gecko
392
393 install -d $RPM_BUILD_ROOT%{_pixmapsdir}/wine.svg
394 install %{SOURCE2} $RPM_BUILD_ROOT%{_desktopdir}
395 install programs/winetest/winetest.svg $RPM_BUILD_ROOT%{_pixmapsdir}/wine.svg
396
397 %clean
398 rm -rf $RPM_BUILD_ROOT
399
400 %post   -p /sbin/ldconfig
401 %postun -p /sbin/ldconfig
402
403 %triggerpostun -- wine < 1:0.9.12-1.9
404 rm -f /var/lock/subsys/wine
405 if [ -x /sbin/chkconfig ]; then
406         /sbin/chkconfig --del wine
407 fi
408
409 %files -f files.so
410 %defattr(644,root,root,755)
411 %doc README documentation/ChangeLog* AUTHORS ANNOUNCE
412 %lang(de) %doc documentation/README.de
413 %lang(es) %doc documentation/README.es
414 %lang(fr) %doc documentation/README.fr
415 %lang(hu) %doc documentation/README.hu
416 %lang(it) %doc documentation/README.it
417 %lang(ko) %doc documentation/README.ko
418 %lang(nb) %doc documentation/README.no
419 %lang(pt) %doc documentation/README.pt
420 %lang(pt_BR) %doc documentation/README.pt_br
421 %lang(ru) %doc documentation/README.ru
422 %lang(sv) %doc documentation/README.sv
423 %lang(tr) %doc documentation/README.tr
424 %attr(755,root,root) %{_bindir}/msiexec
425 %attr(755,root,root) %{_bindir}/wine
426 %attr(755,root,root) %{_bindir}/wineboot
427 %attr(755,root,root) %{_bindir}/winedbg
428 %attr(755,root,root) %{_bindir}/winecfg
429 %attr(755,root,root) %{_bindir}/wine-preloader
430 %attr(755,root,root) %{_bindir}/wineserver
431 %attr(755,root,root) %{_libdir}/*.so*
432 %dir %{_libdir}/wine
433 %dir %{_libdir}/wine/fakedlls
434 %{_libdir}/wine/fakedlls/*.acm
435 %{_libdir}/wine/fakedlls/*.cpl
436 %{_libdir}/wine/fakedlls/*.dll
437 %{_libdir}/wine/fakedlls/*.dll16
438 %{_libdir}/wine/fakedlls/*.drv
439 %{_libdir}/wine/fakedlls/*.drv16
440 %{_libdir}/wine/fakedlls/*.ds
441 %{_libdir}/wine/fakedlls/*.exe
442 %{_libdir}/wine/fakedlls/*.exe16
443 %{_libdir}/wine/fakedlls/*.mod16
444 %{_libdir}/wine/fakedlls/*.ocx
445 %{_libdir}/wine/fakedlls/*.sys
446 %{_libdir}/wine/fakedlls/*.tlb
447 %{_libdir}/wine/fakedlls/*.vxd
448 %{_mandir}/man1/wine.1*
449 %lang(de) %{_mandir}/de/man1/wine.1*
450 %lang(fr) %{_mandir}/fr/man1/wine.1*
451 %{_mandir}/man1/winedbg.1*
452 %{_mandir}/man1/wineserver.1*
453 %lang(de) %{_mandir}/de/man1/wineserver.1*
454 %lang(fr) %{_mandir}/fr/man1/wineserver.1*
455 %{_winedir}
456 %{_desktopdir}/wine.desktop
457 %{_desktopdir}/wine-uninstaller.desktop
458 %{_pixmapsdir}/wine.svg
459
460 %files programs -f files.programs
461 %defattr(644,root,root,755)
462
463 %files devel
464 %defattr(644,root,root,755)
465 %attr(755,root,root) %{_bindir}/fnt2bdf
466 %attr(755,root,root) %{_bindir}/function_grep.pl
467 %attr(755,root,root) %{_bindir}/widl
468 %attr(755,root,root) %{_bindir}/winebuild
469 %attr(755,root,root) %{_bindir}/winedump
470 %attr(755,root,root) %{_bindir}/wineg++
471 %attr(755,root,root) %{_bindir}/winegcc
472 %attr(755,root,root) %{_bindir}/winemaker
473 %attr(755,root,root) %{_bindir}/winecpp
474 %attr(755,root,root) %{_bindir}/wmc
475 %attr(755,root,root) %{_bindir}/wrc
476 %{_libdir}/wine/lib*.def
477 # no shared variants, so not separated
478 %{_libdir}/wine/lib*.def.a
479 %{_libdir}/wine/libadsiid.a
480 %{_libdir}/wine/libdx*.a
481 %{_libdir}/wine/libstrmiids.a
482 %{_libdir}/wine/libuuid.a
483 %{_libdir}/wine/libwinecrt0.a
484 %{_includedir}/wine
485 %{_mandir}/man1/widl.1*
486 %{_mandir}/man1/winebuild.1*
487 %{_mandir}/man1/winedump.1*
488 %{_mandir}/man1/winegcc.1*
489 %{_mandir}/man1/wineg++.1*
490 %{_mandir}/man1/winemaker.1*
491 %lang(de) %{_mandir}/de/man1/winemaker.1*
492 %lang(fr) %{_mandir}/fr/man1/winemaker.1*
493 %{_mandir}/man1/wmc.1*
494 %{_mandir}/man1/wrc.1*
495 %{_aclocaldir}/*.m4
496
497 %files dll-d3d
498 %defattr(644,root,root,755)
499 %attr(755,root,root) %{_libdir}/wine/d3d8.dll.so
500 %attr(755,root,root) %{_libdir}/wine/d3d9.dll.so
501 %attr(755,root,root) %{_libdir}/wine/wined3d.dll.so
502
503 %files dll-gl
504 %defattr(644,root,root,755)
505 %attr(755,root,root) %{_libdir}/wine/glu32.dll.so
506 %attr(755,root,root) %{_libdir}/wine/opengl32.dll.so
507
508 %if %{with sane}
509 %files dll-twain
510 %defattr(644,root,root,755)
511 %attr(755,root,root) %{_libdir}/wine/sane.ds.so
512 %attr(755,root,root) %{_libdir}/wine/twain*.dll.so
513 %endif
514
515 %if %{with alsa}
516 %files drv-alsa
517 %defattr(644,root,root,755)
518 %attr(755,root,root) %{_libdir}/wine/winealsa.drv.so
519 %endif
520
521 %if %{with jack}
522 %files drv-jack
523 %defattr(644,root,root,755)
524 %attr(755,root,root) %{_libdir}/wine/winejack.drv.so
525 %endif
526
527 %if %{with nas}
528 %files drv-nas
529 %defattr(644,root,root,755)
530 %attr(755,root,root) %{_libdir}/wine/winenas.drv.so
531 %endif
532
533 # additional dependencies in *.so not separated (yet?) from main package
534 #   ddraw.dll.so,x11drv.dll.so depend on X11 libs
535 #   ole2disp.dll.so,oleaut32.dll.so,typelib.dll.so depend on lib(un)gif,libjpeg,libX11
536 #   ttydrv.dll.so depends on ncurses
This page took 0.094988 seconds and 4 git commands to generate.