]> git.pld-linux.org Git - packages/wine.git/blob - wine.spec
- up to 9.0
[packages/wine.git] / wine.spec
1 #
2 # todo:
3 # libvkd3d https://wiki.winehq.org/Vkd3d
4 #
5 # Conditional build:
6 %bcond_with     capi            # don't build CAPI 2.0 (ISDN) support
7 %bcond_without  gstreamer       # don't build GStreamer filters support
8 %bcond_without  sane            # don't build TWAIN DLL with scanning support (through SANE)
9 %bcond_without  cups            # without CUPS printing support in winspool,wineps DLLs
10 %bcond_without  netapi          # don't use the Samba NetAPI library
11 #
12 # NOTE: wine detects the following SONAMES for dlopen at build time:
13 #   libGL (winex11.drv.so)
14 #   libOSMesa (gdi32.dll.so)
15 #   libX11 libXcomposite libXcursor libXext libXi libXinerama libXrandr libXrender libXxf86vm (winex11.drv.so)
16 #   libcapi20 (capi2032.dll.so)
17 #   libcups (winspool.drv.so)
18 #   libdbus (mountmgr.sys.so)
19 #   libfontconfig (gdi32.dll.so)
20 #   libfreetype (gdi32.dll.so)
21 #   libgnutls (secur32.dll.so)
22 #   libncurses (kernel32.dll.so)
23 #   libodbc (odbc32.dll.so)
24 #   libsane (sane.ds.so)
25 #   libtiff (windowscodecs.dll.so)
26 # thus requires rebuild after change of any of the above.
27
28 # library qualifier in rpm generated deps
29 %ifarch %{x8664} ia64 ppc64 s390x sparc64
30 %define libqual ()(64bit)
31 %else
32 %define libqual %{nil}
33 %endif
34
35 %ifarch %{x8664}
36 %define winelib x86_64
37 %else
38 %define winelib i386
39 %endif
40
41 %define         gecko_ver       2.47.4
42 Summary:        Program that lets you launch Win applications
43 Summary(es.UTF-8):      Ejecuta programas Windows en Linux
44 Summary(pl.UTF-8):      Program pozwalający uruchamiać aplikacje Windows
45 Summary(pt_BR.UTF-8):   Executa programas Windows no Linux
46 Name:           wine
47 Version:        9.0
48 Release:        1
49 Epoch:          1
50 License:        LGPL
51 Group:          Applications/Emulators
52 Source0:        https://dl.winehq.org/wine/source/9.0/%{name}-%{version}.tar.xz
53 # Source0-md5:  78e1cb8d77d20b44820461b056a15069
54 Source1:        https://dl.winehq.org/wine/wine-gecko/%{gecko_ver}/%{name}-gecko-%{gecko_ver}-x86.msi
55 # Source1-md5:  f61c2a0065301ce329aa390342e70f14
56 Source2:        https://dl.winehq.org/wine/wine-gecko/%{gecko_ver}/%{name}-gecko-%{gecko_ver}-x86_64.msi
57 # Source2-md5:  8cc7018079a8db70e822320b69185515
58 Source3:        %{name}-uninstaller.desktop
59 Patch0:         %{name}-gphoto2_bool.patch
60 Patch1:         %{name}-makedep.patch
61 Patch2:         %{name}-ncurses.patch
62 Patch4:         %{name}-disable-valgrind.patch
63 Patch5:         %{name}-ca_certificates.patch
64 Patch6:         desktop.patch
65 Patch7:         %{name}-wine64_man.patch
66 URL:            http://www.winehq.org/
67 BuildRequires:  Mesa-libOSMesa-devel
68 BuildRequires:  OpenAL-devel >= 1.1
69 BuildRequires:  OpenCL-devel
70 BuildRequires:  OpenGL-GLU-devel
71 BuildRequires:  SDL2-devel
72 BuildRequires:  alsa-lib-devel
73 %{?with_arts:BuildRequires:     artsc-devel}
74 BuildRequires:  autoconf >= 2.62
75 BuildRequires:  automake
76 BuildRequires:  bison
77 %{?with_capi:BuildRequires:     capi4k-utils-devel}
78 BuildRequires:  clang
79 %{?with_cups:BuildRequires:     cups-devel}
80 BuildRequires:  dbus-devel
81 BuildRequires:  flex >= 2.5.33
82 BuildRequires:  fontconfig-devel
83 BuildRequires:  freetype-devel >= 2.0.5
84 BuildRequires:  gettext-devel
85 %ifarch %{x8664}
86 BuildRequires:  gcc >= 6:4.4
87 %endif
88 BuildRequires:  gettext-tools
89 BuildRequires:  gnutls-devel
90 %{?with_gstreamer:BuildRequires:        gstreamer-devel >= 1.0}
91 %{?with_gstreamer:BuildRequires:        gstreamer-plugins-base-devel >= 1.0}
92 # for icotool used in build
93 BuildRequires:  icoutils >= 0.29.0
94 BuildRequires:  lcms2-devel >= 2
95 BuildRequires:  libcap-devel
96 BuildRequires:  libglvnd-libEGL-devel
97 BuildRequires:  libgphoto2-devel
98 BuildRequires:  libpcap-devel
99 BuildRequires:  libv4l-devel
100 BuildRequires:  libxkbregistry-devel
101 BuildRequires:  lld
102 BuildRequires:  pkgconfig
103 BuildRequires:  pulseaudio-devel
104 BuildRequires:  samba-devel
105 %{?with_sane:BuildRequires:     sane-backends-devel}
106 BuildRequires:  xorg-lib-libX11-devel
107 BuildRequires:  xorg-lib-libXcomposite-devel
108 BuildRequires:  xorg-lib-libXcursor-devel
109 BuildRequires:  xorg-lib-libXext-devel
110 BuildRequires:  xorg-lib-libXi-devel
111 BuildRequires:  xorg-lib-libXinerama-devel
112 BuildRequires:  xorg-lib-libXrandr-devel
113 BuildRequires:  xorg-lib-libXrender-devel
114 BuildRequires:  xorg-lib-libXxf86vm-devel
115 BuildConflicts: crossmingw32-gcc
116 BuildConflicts: crossmingw64-gcc
117 Requires:       OpenGL
118 Requires:       libfreetype.so.6%{libqual}
119 Requires:       libpng16.so.16%{libqual}
120 Requires(post): /sbin/ldconfig
121 Suggests:       binfmt-detector
122 Suggests:       ca-certificates
123 Suggests:       cabextract
124 Conflicts:      ca-certificates < 20080809-4
125 # for printing needs lpr
126 Suggests:       cups-clients
127 # for winelauncher
128 Suggests:       xorg-app-xmessage
129 # for ntlm_auth
130 Suggests:       samba-common >= 1:3.0.25
131 # link to wine/ntdll.dll.so, without any SONAME
132 Provides:       libntdll.dll.so
133 Obsoletes:      wine-dll-d3d < 1:7.7-2
134 Obsoletes:      wine-dll-gl < 1:7.7-2
135 Obsoletes:      wine-dll-ldap < 1:9.0
136 Obsoletes:      wine-doc-pdf < 1:7.7-2
137 Obsoletes:      wine-drv-alsa < 1:7.7-2
138 Obsoletes:      wine-drv-arts < 1:7.7-2
139 Obsoletes:      wine-drv-jack < 1:7.7-2
140 Obsoletes:      wine-drv-nas < 1:7.7-2
141 Obsoletes:      wine-programs < 1:7.7-2
142 ExclusiveArch:  %{ix86} %{x8664} arm
143 ExcludeArch:    i386
144 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
145
146 %define         no_install_post_strip   1
147 %define         _noautoprov     elf\\\\(buildid\\\\)
148
149 %define         _winedir                %{_datadir}/%{name}
150
151 %description
152 Wine is a program which allows running Microsoft Windows programs
153 (including DOS, Windows 3.x and Win32 executables) on Unix. It
154 consists of a program loader which loads and executes a Microsoft
155 Windows binary, and a library that implements Windows API calls using
156 their Unix or X11 equivalents. The library may also be used for
157 porting Win32 code into native Unix executables.
158
159 %description -l es.UTF-8
160 Ejecuta programas Windows en Linux.
161
162 %description -l pl.UTF-8
163 Wine jest programem dzięki któremu można uruchamiać programy napisane
164 dla Microsoft Windows pod systemami uniksowymi. Składa się on z
165 loadera, który pozwala wczytywać i uruchamiać programy w formacie
166 Microsoft Windows, oraz z biblioteki, która implementuje API Windows
167 przy użyciu odpowiedników uniksowych oraz z X11. Biblioteka może być
168 także wykorzystana do przenoszenia aplikacji Win32 do Uniksa.
169
170 %description -l pt_BR.UTF-8
171 O Wine é um programa que permite rodar programas MS-Windows no X11.
172 Ele consiste de um carregador de programa, que carrega e executa um
173 binário MS-Windows, e de uma biblioteca de emulação que traduz as
174 chamadas da API para as equivalentes Unix/X11.
175
176 %package devel
177 Summary:        Wine - header files
178 Summary(es.UTF-8):      Biblioteca de desarrollo de wine
179 Summary(pl.UTF-8):      Wine - pliki nagłowkowe
180 Summary(pt_BR.UTF-8):   Biblioteca de desenvolvimento do wine
181 Group:          Development/Libraries
182 Requires:       %{name} = %{epoch}:%{version}-%{release}
183
184 %description devel
185 Wine - header files.
186
187 %description devel -l es.UTF-8
188 Biblioteca de desarrollo de wine.
189
190 %description devel -l pl.UTF-8
191 Wine - pliki nagłówkowe.
192
193 %description devel -l pt_BR.UTF-8
194 Arquivos de inclusão e bibliotecas para desenvolver aplicações com o
195 WINE.
196
197 %package dll-capi
198 Summary:        CAPI 2.0 (ISDN) implementation DLLs for Wine
199 Summary(pl.UTF-8):      Biblioteki DLL z implementacją CAPI 2.0 (ISDN) dla Wine
200 Group:          Applications/Emulators
201 Requires:       %{name} = %{epoch}:%{version}-%{release}
202
203 %description dll-capi
204 CAPI 2.0 (ISDN) implementation DLLs for Wine.
205
206 %description dll-capi -l pl.UTF-8
207 Biblioteki DLL z implementacją CAPI 2.0 (ISDN) 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 %prep
222 %setup -q
223 #%patch0 -p1
224 %patch1 -p1
225 %patch4 -p1
226 %patch5 -p1
227 %patch6 -p1
228 %ifarch %{x8664}
229 %patch7 -p1
230 %endif
231
232 %build
233
234 #workaround for icon extraction error.
235 icotool -x -o . dlls/user32/resources/oic_winlogo.ico
236 mv -f oic_winlogo_*32x32x32.png %{name}.png
237 rm -f oic_winlogo_*.png
238
239 %{__autoconf}
240 %{__autoheader}
241 %configure \
242 %ifarch %{x8664}
243         --enable-win64 \
244 %endif
245         --with-alsa \
246         --with-capi%{!?with_capi:=no} \
247         --with-coreaudio \
248         --with-cups%{!?with_cups:=no} \
249         --with-dbus \
250         --with-fontconfig \
251         --with-freetype \
252         --with-gphoto \
253         --with-gnutls \
254         %{__with_without gstreamer} \
255         --with%{!?with_netapi:out}-netapi \
256         --with-opencl \
257         --with-opengl \
258         --with-osmesa \
259         --with-pcap \
260         --with-pthread \
261         --with-pulse \
262         --with%{!?with_sane:out}-sane \
263         --with-xcomposite \
264         --with-xcursor \
265         --with-xinerama \
266         --with-xinput \
267         --with-xinput2 \
268         --with-xrandr \
269         --with-xrender \
270         --with-xshape \
271         --with-xshm \
272         --with-xxf86vm \
273         --with-x
274
275 %{__make} depend
276 %{__make}
277
278 %install
279 rm -rf $RPM_BUILD_ROOT
280 install -d $RPM_BUILD_ROOT{%{_mandir}/man1,%{_aclocaldir}}
281 %{__make} install \
282         DESTDIR=$RPM_BUILD_ROOT
283
284 install -p tools/sfnt2fon/sfnt2fon $RPM_BUILD_ROOT%{_bindir}
285 cp -a aclocal.m4 $RPM_BUILD_ROOT%{_aclocaldir}/wine.m4
286
287 install -d \
288         $RPM_BUILD_ROOT%{_winedir}/windows/{system,Desktop,Favorites,Fonts} \
289         "$RPM_BUILD_ROOT%{_winedir}/windows/Start Menu/Programs/Startup" \
290         $RPM_BUILD_ROOT%{_winedir}/windows/{SendTo,ShellNew,system32,NetHood} \
291         $RPM_BUILD_ROOT%{_winedir}/windows/{Profiles/Administrator,Recent} \
292         $RPM_BUILD_ROOT%{_winedir}/{"Program Files/Common Files","My Documents"}
293
294 touch $RPM_BUILD_ROOT%{_winedir}/{autoexec.bat,config.sys,windows/win.ini}
295 touch $RPM_BUILD_ROOT%{_winedir}/windows/system/{shell.dll,shell32.dll}
296 touch $RPM_BUILD_ROOT%{_winedir}/windows/system/{winsock.dll,wsock32.dll}
297
298 cat > $RPM_BUILD_ROOT%{_winedir}/windows/system.ini <<'EOF'
299 [mci]
300 cdaudio=mcicda.drv
301 sequencer=mciseq.drv
302 waveaudio=mciwave.drv
303 avivideo=mciavi.drv
304 videodisc=mcipionr.drv
305 vcr=mciviscd.drv
306 MPEGVideo=mciqtz.drv
307 EOF
308
309 # /sbin/chstk -e $RPM_BUILD_ROOT%{_bindir}/wine
310
311 for dir in $RPM_BUILD_ROOT%{_mandir}/*.UTF-8 ; do
312         mv "$dir" "${dir%.UTF-8}"
313 done
314
315 %ifarch %{x8664}
316 cp -p loader/wine.man $RPM_BUILD_ROOT%{_mandir}/man1/wine64.1
317 for lang in de fr pl ; do
318 install -d $RPM_BUILD_ROOT%{_mandir}/${lang}/man1
319 cp -p loader/wine.${lang}.UTF-8.man $RPM_BUILD_ROOT%{_mandir}/${lang}/man1/wine64.1
320 done
321 %else
322 cp -p loader/wine.man $RPM_BUILD_ROOT%{_mandir}/man1/wine.1
323 for lang in de fr pl ; do
324 install -d $RPM_BUILD_ROOT%{_mandir}/${lang}/man1
325 cp -p loader/wine.${lang}.UTF-8.man $RPM_BUILD_ROOT%{_mandir}/${lang}/man1/wine.1
326 done
327 %endif
328
329 install -d $RPM_BUILD_ROOT%{_winedir}/gecko
330 %ifnarch %{x8664}
331 cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_winedir}/gecko
332 %else
333 cp -p %{SOURCE2} $RPM_BUILD_ROOT%{_winedir}/gecko
334 %endif
335
336 install -d $RPM_BUILD_ROOT%{_pixmapsdir}
337 cp -p %{SOURCE3} $RPM_BUILD_ROOT%{_desktopdir}
338 cp -p %{name}.png $RPM_BUILD_ROOT%{_pixmapsdir}
339
340 %clean
341 rm -rf $RPM_BUILD_ROOT
342
343 %post
344 /sbin/ldconfig
345 %update_desktop_database
346
347 %postun -p /sbin/ldconfig
348
349 %triggerpostun -- wine < 1:0.9.12-1.9
350 rm -f /var/lock/subsys/wine
351 if [ -x /sbin/chkconfig ]; then
352         /sbin/chkconfig --del wine
353 fi
354
355 %files
356 %defattr(644,root,root,755)
357 %doc README.md AUTHORS ANNOUNCE.md
358 %lang(de) %doc documentation/README-de.md
359 %lang(es) %doc documentation/README-es.md
360 %lang(fr) %doc documentation/README-fr.md
361 %lang(hu) %doc documentation/README-hu.md
362 %lang(it) %doc documentation/README-it.md
363 %lang(ko) %doc documentation/README-ko.md
364 %lang(nb) %doc documentation/README-no.md
365 %lang(pt) %doc documentation/README-pt.md
366 %lang(pt_BR) %doc documentation/README-pt_br.md
367 %lang(ru) %doc documentation/README-ru.md
368 %lang(sv) %doc documentation/README-sv.md
369 %lang(tr) %doc documentation/README-tr.md
370 %attr(755,root,root) %{_bindir}/msidb
371 %attr(755,root,root) %{_bindir}/msiexec
372 %attr(755,root,root) %{_bindir}/notepad
373 %attr(755,root,root) %{_bindir}/regedit
374 %attr(755,root,root) %{_bindir}/regsvr32
375 %ifnarch %{x8664}
376 %attr(755,root,root) %{_bindir}/wine
377 %else
378 %attr(755,root,root) %{_bindir}/wine64
379 %endif
380 %attr(755,root,root) %{_bindir}/wineboot
381 %attr(755,root,root) %{_bindir}/winecfg
382 %attr(755,root,root) %{_bindir}/wineconsole
383 %attr(755,root,root) %{_bindir}/winedbg
384 %attr(755,root,root) %{_bindir}/winefile
385 %attr(755,root,root) %{_bindir}/winemine
386 %attr(755,root,root) %{_bindir}/winepath
387 %ifnarch %{x8664}
388 %attr(755,root,root) %{_bindir}/wine-preloader
389 %else
390 %attr(755,root,root) %{_bindir}/wine64-preloader
391 %endif
392 %attr(755,root,root) %{_bindir}/wineserver
393 %dir %{_libdir}/wine
394 %dir %{_libdir}/wine/%{winelib}-unix
395 %attr(755,root,root) %{_libdir}/wine/%{winelib}-unix/*.so*
396 %dir %{_libdir}/wine/%{winelib}-windows
397 %{_libdir}/wine/%{winelib}-windows/*.acm
398 %{_libdir}/wine/%{winelib}-windows/*.ax
399 %{_libdir}/wine/%{winelib}-windows/*.com
400 %{_libdir}/wine/%{winelib}-windows/*.cpl
401 %{_libdir}/wine/%{winelib}-windows/*.dll
402 %ifarch %{ix86}
403 %{_libdir}/wine/%{winelib}-windows/*.dll16
404 %endif
405 %{_libdir}/wine/%{winelib}-windows/*.drv
406 %ifarch %{ix86}
407 %{_libdir}/wine/%{winelib}-windows/*.drv16
408 %endif
409 %{_libdir}/wine/%{winelib}-windows/*.ds
410 %{_libdir}/wine/%{winelib}-windows/*.exe
411 %ifarch %{ix86}
412 %{_libdir}/wine/%{winelib}-windows/*.exe16
413 %{_libdir}/wine/%{winelib}-windows/*.mod16
414 %endif
415 %{_libdir}/wine/%{winelib}-windows/*.msstyles
416 %{_libdir}/wine/%{winelib}-windows/*.ocx
417 %{_libdir}/wine/%{winelib}-windows/*.sys
418 %{_libdir}/wine/%{winelib}-windows/*.tlb
419 %ifarch %{ix86}
420 %{_libdir}/wine/%{winelib}-windows/*.vxd
421 %endif
422 %if %{with capi}
423 %exclude %{_libdir}/wine/%{winelib}-windows/capi2032.dll
424 %exclude %{_libdir}/wine/%{winelib}-unix/capi2032.so
425 %endif
426 %if %{with sane}
427 %exclude %{_libdir}/wine/%{winelib}-unix/sane.so
428 %exclude %{_libdir}/wine/%{winelib}-windows/twain*.dll
429 %ifarch %{ix86}
430 %exclude %{_libdir}/wine/%{winelib}-windows/twain*.dll16
431 %endif
432 %endif
433 %{_mandir}/man1/msiexec.1*
434 %{_mandir}/man1/notepad.1*
435 %{_mandir}/man1/regedit.1*
436 %{_mandir}/man1/regsvr32.1*
437 %ifnarch %{x8664}
438 %{_mandir}/man1/wine.1*
439 %lang(de) %{_mandir}/de/man1/wine.1*
440 %lang(fr) %{_mandir}/fr/man1/wine.1*
441 %lang(pl) %{_mandir}/pl/man1/wine.1*
442 %else
443 %{_mandir}/man1/wine64.1*
444 %lang(de) %{_mandir}/de/man1/wine64.1*
445 %lang(fr) %{_mandir}/fr/man1/wine64.1*
446 %lang(pl) %{_mandir}/pl/man1/wine64.1*
447 %endif
448 %{_mandir}/man1/wineboot.1*
449 %{_mandir}/man1/winecfg.1*
450 %{_mandir}/man1/wineconsole.1*
451 %{_mandir}/man1/winedbg.1*
452 %{_mandir}/man1/winefile.1*
453 %{_mandir}/man1/winemine.1*
454 %{_mandir}/man1/winepath.1*
455 %{_mandir}/man1/wineserver.1*
456 %lang(de) %{_mandir}/de/man1/wineserver.1*
457 %lang(fr) %{_mandir}/fr/man1/wineserver.1*
458 %{_winedir}
459 %{_desktopdir}/wine.desktop
460 %{_desktopdir}/wine-uninstaller.desktop
461 %{_pixmapsdir}/%{name}.png
462
463 %files devel
464 %defattr(644,root,root,755)
465 %attr(755,root,root) %{_bindir}/sfnt2fon
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 # no shared variants, so not separated
477 %{_libdir}/wine/%{winelib}-unix/lib*.a
478 %{_libdir}/wine/%{winelib}-windows/lib*.a
479 %{_includedir}/wine
480 %{_mandir}/man1/widl.1*
481 %{_mandir}/man1/winebuild.1*
482 %{_mandir}/man1/winecpp.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 %if %{with capi}
494 %files dll-capi
495 %defattr(644,root,root,755)
496 %attr(755,root,root) %{_libdir}/wine/%{winelib}-windows/capi2032.dll
497 %attr(755,root,root) %{_libdir}/wine/%{winelib}-unix/capi2032.so
498 %endif
499
500 %if %{with sane}
501 %files dll-twain
502 %defattr(644,root,root,755)
503 %attr(755,root,root) %{_libdir}/wine/%{winelib}-unix/sane.so
504 %attr(755,root,root) %{_libdir}/wine/%{winelib}-windows/twain*.dll
505 %ifarch %{ix86}
506 %attr(755,root,root) %{_libdir}/wine/%{winelib}-windows/twain*.dll16
507 %endif
508 %endif
509
510 # additional dependencies in *.so not separated (yet?) from main package
511 #   ddraw.dll.so,winex11.drv.so depend on X11 libs
512 #   ole2disp.dll16.so,oleaut32.dll.so,typelib.dll16.so depend on libX11
This page took 0.136578 seconds and 4 git commands to generate.