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