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