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