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