wine/wine.spec

868 lines
25 KiB
RPMSpec

# Switch between stable or devel builds
%bcond_without unstable
%define major 1
%define libname %mklibname wine %{major}
%define devname %mklibname wine -d
# Switch between systemd-binfmt and sysvinit support
%bcond_without systemd
# wine-staging tarball version
%define stagver 6.4
# wine-stable tarball version
%define stabver 5.0.4
%define winenine_ver 0.7
%define winetricks_ver 20210206
%if %{with unstable}
%define wine wine
%define wine32 wine32
%define wine64 wine64
%define version %(echo %{stagver} |cut -d. -f-2)
%define pathver %(echo %{stagver} |cut -d. -f1).x
%define owine wine-stable
%define owine32 wine32-stable
%define owine64 wine64-stable
%define over %{stabver}
%define opver %(echo %{stabver} |cut -d. -f-2)
%else
%define wine wine-stable
%define wine32 wine32-stable
%define wine64 wine64-stable
%define version %{stabver}
%define pathver %(echo %{stabver} |cut -d. -f-2)
%define owine wine
%define owine32 wine32
%define owine64 wine64
%define over %(echo %{stagver} |cut -d. -f-2)
%define opver %(echo %{stagver} |cut -d. -f1).x
%endif
Summary: WINE Is Not An Emulator - runs MS Windows programs
Name: %{wine}
Version: %{version}
Release: 1
Epoch: 2
License: LGPLv2+
Group: Emulators
Url: http://www.winehq.com/
Source0: http://mirrors.ibiblio.org/wine/source/%{pathver}/wine-%{version}.tar.xz
Source1: http://mirrors.ibiblio.org/wine/source/%{opver}/wine-%{over}.tar.xz
# Old RH stuff for %%{mdvver} <= 201410
Source2: wine.init
# New solution for %%{mdvver} >= 201610
# See: https://wiki.archlinux.org/index.php/wine (Using Wine as an interpreter for Win16/Win32 binaries)
Source3: wine.systemd
# New wine-staging from github by tag
Source4: https://github.com/wine-staging/wine-staging/archive/v%{stagver}.tar.gz?/wine-staging-%{stagver}.tar.gz
Source5: https://github.com/iXit/wine-nine-standalone/archive/v%{winenine_ver}.tar.gz?/wine-nine-standalone-%{winenine_ver}.tar.gz
Source6: https://github.com/Winetricks/winetricks/archive/%{winetricks_ver}.tar.gz?/winetricks-%{winetricks_ver}.tar.gz
Source7: http://kegel.com/wine/wisotool
Source8: mandriva-wine.menu
Source9: mandriva-wine.directory
Source10: wine.rpmlintrc
Source11: rosa-wine-desktop-4.4.1.tar.xz
Source12: icons-4.0.tar.xz
Source13: wine-stable.rpmlintrc
Source20: README.urpmi
Source21: README.install.urpmi.x86_64.staging
Source22: README.install.urpmi.i586.staging
Source24: README.install.urpmi.x86_64.stable
Source25: README.install.urpmi.i586.stable
# (Anssi 05/2008) Adds:
# a: => /media/floppy (/mnt/floppy on 2007.1 and older)
# d: => $HOME (at config_dir creation time, not refreshed if $HOME changes;
# note that Wine also provides $HOME in My Documents)
# com4 => /dev/ttyUSB0 (replaces /dev/ttyS3)
# We have to substitute @MDKVERSION@ in dlls/ntdll/server.c
Patch0: wine-5.10-mdkconf.patch
# Russian localization
Patch1: wine-5.22-staging-ru-localization.patch
Patch2: wine-6.0-disable-bans-winetricks.patch
# For build in mock-urpm only
Patch4: wine-staging-4.5-mock-urpm-broken-pipe.patch
Patch5: wine-nine-standalone-0.7-ru-localization.patch
# https://bugs.winehq.org/show_bug.cgi?id=41930#c0 (actual for 5.19)
Patch7: 0001-Revert-gdi32-Fix-arguments-for-OSMesaMakeCurrent-whe.patch
# For wine-stable
Patch8: wine-3.16-mdkconf.patch
Patch9: wine-5.10-assertion-failed.patch
# From CentOS
Patch511: wine-cjk.patch
# This is needed to build wine-nine-standalone
%ifarch x86_64
BuildRequires: wine64-stable-devel
%else
BuildRequires: wine-stable-devel
%endif
BuildRequires: bison
BuildRequires: chrpath
BuildRequires: desktop-file-utils
BuildRequires: docbook-dtd-sgml
BuildRequires: docbook-utils
BuildRequires: flex
BuildRequires: fontforge
BuildRequires: imagemagick
# This is needed to build nine-standalone
BuildRequires: meson
BuildRequires: opencl-headers
BuildRequires: openjade
BuildRequires: prelink
BuildRequires: sgml-tools
BuildRequires: valgrind
BuildRequires: attr-devel
BuildRequires: cups-devel
BuildRequires: faudio-devel
#BuildRequires: fontpackages-devel #Contrib
BuildRequires: freetype-devel
BuildRequires: gettext-devel
BuildRequires: giflib-devel
BuildRequires: glibc-static-devel
BuildRequires: gpm-devel
BuildRequires: gsm-devel
BuildRequires: ieee1284-devel
BuildRequires: isdn4k-utils-devel
BuildRequires: openafs-devel
BuildRequires: openldap-devel
BuildRequires: pcap-devel
BuildRequires: perl-devel
BuildRequires: stdc++-devel
BuildRequires: ungif-devel
BuildRequires: unixODBC-devel
BuildRequires: pkgconfig(alsa)
BuildRequires: pkgconfig(d3d)
BuildRequires: pkgconfig(dbus-1)
BuildRequires: pkgconfig(egl)
BuildRequires: pkgconfig(fontconfig)
BuildRequires: pkgconfig(freetype2)
BuildRequires: pkgconfig(gl)
BuildRequires: pkgconfig(glu)
BuildRequires: pkgconfig(glut)
BuildRequires: pkgconfig(gnutls)
BuildRequires: pkgconfig(gstreamer-1.0)
BuildRequires: pkgconfig(gstreamer-base-1.0)
BuildRequires: pkgconfig(gstreamer-plugins-base-1.0)
BuildRequires: pkgconfig(gtk+-3.0)
BuildRequires: pkgconfig(jack)
BuildRequires: pkgconfig(lcms)
BuildRequires: pkgconfig(lcms2)
BuildRequires: pkgconfig(libavcodec)
BuildRequires: pkgconfig(libgphoto2)
BuildRequires: pkgconfig(libjpeg)
BuildRequires: pkgconfig(libmpg123)
BuildRequires: pkgconfig(libpng)
BuildRequires: pkgconfig(libpulse)
BuildRequires: pkgconfig(librsvg-2.0)
BuildRequires: pkgconfig(libtiff-4)
BuildRequires: pkgconfig(libunwind)
BuildRequires: pkgconfig(libusb)
BuildRequires: pkgconfig(libv4l2)
BuildRequires: pkgconfig(libva)
BuildRequires: pkgconfig(libvkd3d)
BuildRequires: pkgconfig(libxml-2.0)
BuildRequires: pkgconfig(libxslt)
BuildRequires: pkgconfig(ncurses)
BuildRequires: pkgconfig(netapi)
BuildRequires: pkgconfig(ocl-icd)
BuildRequires: pkgconfig(openal)
BuildRequires: pkgconfig(OpenCL)
BuildRequires: pkgconfig(osmesa)
BuildRequires: pkgconfig(sane-backends)
BuildRequires: pkgconfig(sdl2)
BuildRequires: pkgconfig(sm)
BuildRequires: pkgconfig(systemd)
BuildRequires: pkgconfig(valgrind)
BuildRequires: pkgconfig(vulkan)
BuildRequires: pkgconfig(x11)
BuildRequires: pkgconfig(xcb-present)
BuildRequires: pkgconfig(xcb-xfixes)
BuildRequires: pkgconfig(xcomposite)
BuildRequires: pkgconfig(xcursor)
BuildRequires: pkgconfig(xext)
BuildRequires: pkgconfig(xfixes)
BuildRequires: pkgconfig(xi)
BuildRequires: pkgconfig(xinerama)
BuildRequires: pkgconfig(xmu)
BuildRequires: pkgconfig(xpm)
BuildRequires: pkgconfig(xrandr)
BuildRequires: pkgconfig(xrender)
BuildRequires: pkgconfig(xxf86dga)
BuildRequires: pkgconfig(xxf86vm)
BuildRequires: pkgconfig(zlib)
BuildRequires: python-pkg-resources
BuildRequires: python3-pkg-resources
%ifarch %{ix86}
Requires: %{wine32} = %{EVRD}
Requires: xmessage
# for winetricks:
Requires: cabextract
Requires: p7zip
Requires: unzip
Requires: zenity
Requires(post,postun): desktop-common-data
Requires(post,preun): rpm-helper
Recommends: sane-frontends
Recommends: vulkan
Recommends: vkd3d
Recommends: webcore-fonts
Recommends: %{wine}-binfmt
Provides: %{wine}-bin = %{EVRD}
%rename %{libname}
%rename %{libname}-capi
%rename %{libname}-twain
%rename wine-full
%rename wine-utils
%rename winetricks
Conflicts: %{wine64}
Conflicts: %{wine} < %{EVRD}
Conflicts: %{owine}
Conflicts: %{owine32}
Conflicts: %{owine}-binfmt
%endif
%description
Wine is a program which allows running Microsoft Windows programs (including
DOS, Windows 3.x, Win32 and Win64 executables) on Unix. It consists of a
program loader which loads and executes a Microsoft Windows binary, and a
library (called Winelib) that implements Windows API calls using their Unix or
X11 equivalents. The library may also be used for porting Win32 code into
native Unix executables.
#####################################################################
##
## Start of 32bit packages descriptions
##
#####################################################################
%ifarch %{ix86}
%files
%doc ANNOUNCE AUTHORS README README.install.urpmi README.urpmi
%if %{with unstable}
%{_datadir}/wine/nls/c_*.nls
%{_datadir}/wine/nls/l_intl.nls
%{_datadir}/wine/nls/norm*.nls
%{_datadir}/wine/nls/sortdefault.nls
%else
%{_datadir}/wine/l_intl.nls
%{_datadir}/wine/winebus.inf
%{_datadir}/wine/winehid.inf
%endif
%{_bindir}/function_grep.pl
%{_bindir}/msiexec
%{_bindir}/notepad
%{_bindir}/regedit
%{_bindir}/regsvr32
%{_bindir}/wineboot
%{_bindir}/winecfg
%{_bindir}/wineconsole*
%{_bindir}/winefile
%{_bindir}/winemine
%{_bindir}/winepath
%{_bindir}/wineserver
%{_bindir}/winetricks
%{_bindir}/wisotool
%{_bindir}/msidb
%{_datadir}/applications/*.desktop
%{_datadir}/desktop-directories/mandriva-wine.directory
%{_datadir}/wine/fonts/*
%{_datadir}/wine/wine.inf
%{_iconsdir}/*.png
%{_liconsdir}/*.png
%{_miconsdir}/*.png
%{_mandir}/man1/msiexec.1*
%{_mandir}/man1/notepad.1*
%{_mandir}/man1/regedit.1*
%{_mandir}/man1/regsvr32.1*
%{_mandir}/man1/wineboot.1*
%{_mandir}/man1/winecfg.1*
%{_mandir}/man1/wineconsole.1*
%{_mandir}/man1/winecpp.1*
%{_mandir}/man1/winefile.1*
%{_mandir}/man1/winemine.1*
%{_mandir}/man1/winepath.1*
%{_mandir}/man1/wineserver.1*
%{_sysconfdir}/xdg/menus/applications-merged/mandriva-wine.menu
%lang(de) %{_mandir}/de.UTF-8/man1/winemaker.1*
%lang(de) %{_mandir}/de.UTF-8/man1/wineserver.1*
%lang(fr) %{_mandir}/fr.UTF-8/man1/winemaker.1*
%lang(fr) %{_mandir}/fr.UTF-8/man1/wineserver.1*
#----------------------------------------------------------------------------
%package -n %{wine32}
Summary: 32-bit support for %{wine} and %{wine64} packages
Group: Emulators
# This is not an EVR-specific requirement, as otherwise on x86_64 urpmi could
# resolve the dependency to wine64 even on upgrades, and therefore replace
# wine+wine32 installation with a wine32+wine64 installation. - Anssi
Requires: %{wine}-bin
# wine dlopen's these, so let's add the dependencies ourself
Requires: alsa-plugins-pulseaudio
Requires: libasound2
Requires: libd3dtracker1
Requires: libfaudio0
Requires: libfreetype6
Requires: libnss_mdns2
Requires: libpng16
Requires: libudev1
Requires: libxcursor1
Requires: libxi6
Requires: libxrender1
# This one need for steam-magazine and certificate in wine
Recommends: libgnutls30
Recommends: libieee1284_3
Recommends: libncurses5
Recommends: libncurses6
Recommends: libncursesw5
Recommends: libncursesw6
Recommends: libosmesa8
Recommends: libsane1
# This one is now integrated in Mesa
Recommends: libtxc-dxtn
Recommends: libunixODBC2
Recommends: libv4l0
Recommends: libvulkan1
Recommends: libxslt1
# (Anssi) If wine-gecko is not installed, wine pops up a dialog on first
# start proposing to download wine-gecko from sourceforge, while recommending
# to use distribution packages instead. Therefore suggest wine-gecko here:
#Suggests: wine-gecko
Conflicts: %{owine32} %{owine}-bin
%description -n %{wine32}
Wine is a program which allows running Microsoft Windows programs (including
DOS, Windows 3.x and Win32 executables) on Unix. This package contains the
files needed to support 32-bit Windows programs.
%files -n %{wine32}
%doc AUTHORS README.install.urpmi
%if %{with unstable}
%{_libdir}/wine/*.ax.so
%{_libdir}/wine/bcrypt.so
%{_libdir}/wine/crtdll.so
%{_libdir}/wine/crypt32.so
%{_libdir}/wine/gdi32.so
%{_libdir}/wine/qcap.so
%{_libdir}/wine/mscms.so
%{_libdir}/wine/msvcr100.so
%{_libdir}/wine/msvcr110.so
%{_libdir}/wine/msvcr120.so
%{_libdir}/wine/msvcr70.so
%{_libdir}/wine/msvcr71.so
%{_libdir}/wine/msvcr80.so
%{_libdir}/wine/msvcr90.so
%{_libdir}/wine/msvcrt.so
%{_libdir}/wine/msvcrtd.so
%{_libdir}/wine/ntdll.so
%{_libdir}/wine/odbc32.so
%{_libdir}/wine/ucrtbase.so
%{_libdir}/wine/user32.so
%{_libdir}/wine/windowscodecs.so
%{_libdir}/wine/winegstreamer.so
%{_libdir}/wine/wmphoto.so
%endif
%{_bindir}/wine
%{_bindir}/wine-preloader
%{_libdir}/libwine*.so.%{major}*
%{_libdir}/wine/*.acm.so
%{_libdir}/wine/*.com.so
%{_libdir}/wine/*.cpl.so
%{_libdir}/wine/*.dll.so
%{_libdir}/wine/*.drv.so
%{_libdir}/wine/*.ds.so
%{_libdir}/wine/*.exe.so
%{_libdir}/wine/*.ocx.so
%{_libdir}/wine/*.sys.so
%{_libdir}/wine/*.tlb.so
%{_libdir}/wine/*.vxd.so
%{_libdir}/wine/*16.so
%{_libdir}/wine/fakedlls
%{_mandir}/man1/wine.1*
%lang(de) %{_mandir}/de.UTF-8/man1/wine.1*
%lang(fr) %{_mandir}/fr.UTF-8/man1/wine.1*
%lang(pl) %{_mandir}/pl.UTF-8/man1/wine.1*
#----------------------------------------------------------------------------
%package -n %{wine}-devel
Summary: Static libraries, headers and programs for %{name}
Group: Development/C
Requires: %{wine} = %{EVRD}
%rename %{devname}
Conflicts: %{wine64}-devel
Conflicts: %{owine}-devel
Conflicts: %{owine}
%description -n %{wine}-devel
Wine is a program which allows running Microsoft Windows programs (including
DOS, Windows 3.x and Win32 executables) on Unix.
This package contains the libraries, the headers and the program files needed
to develop programs running on Wine.
%files -n %{wine}-devel
%doc AUTHORS README.install.urpmi
%{_bindir}/widl
%{_bindir}/winebuild
%{_bindir}/winecpp
%{_bindir}/winedbg
%{_bindir}/winedump
%{_bindir}/wineg++
%{_bindir}/winegcc
%{_bindir}/winemaker
%{_bindir}/wmc
%{_bindir}/wrc
%{_includedir}/*
%if %{with unstable}
%else
%{_libdir}/libwine*.so
%endif
%{_libdir}/wine/*.a
%{_libdir}/wine/*.def
%{_mandir}/man1/widl.1*
%{_mandir}/man1/winebuild.1*
%{_mandir}/man1/winedbg.1*
%{_mandir}/man1/winedump.1*
%{_mandir}/man1/wineg++.1*
%{_mandir}/man1/winegcc.1*
%{_mandir}/man1/winemaker.1*
%{_mandir}/man1/wmc.1*
%{_mandir}/man1/wrc.1*
%endif
#####################################################################
##
## End of 32bit packages descriptions
##
#####################################################################
#----------------------------------------------------------------------------
#####################################################################
##
## Start of 64bit packages descriptions
##
#####################################################################
%ifarch x86_64
%package -n %{wine64}
Summary: WINE Is Not An Emulator - runs MS Windows programs
Group: Emulators
# wine dlopen's these, so let's add the dependencies ourself
Requires: lib64asound2
Requires: lib64d3dtracker1
Requires: lib64faudio0
Requires: lib64freetype6
Requires: lib64nss_mdns2
Requires: lib64png16
Requires: lib64v4l0
Requires: lib64xi6
Requires: lib64xrender1
Requires: xmessage
# for winetricks:
Requires: cabextract
Requires: p7zip
Requires: unzip
Requires: zenity
Requires(post,postun): desktop-common-data
Requires(post,preun): rpm-helper
Recommends: lib64ncurses5
Recommends: lib64ncurses6
Recommends: lib64ncursesw5
Recommends: lib64ncursesw6
Recommends: lib64osmesa8
Recommends: lib64unixODBC2
Recommends: lib64vulkan1
Recommends: sane-frontends
Recommends: vkd3d
Recommends: vulkan
Recommends: webcore-fonts
Recommends: %{wine32} = %{EVRD}
Recommends: %{wine64}-binfmt
# This one is now part of Mesa
Recommends: lib64txc-dxtn
# Download wine64-gecko from internet, when starting wine
#Suggests: wine64-gecko
Provides: %{wine}-bin = %{EVRD}
%rename %{libname}
%rename %{libname}-capi
%rename %{libname}-twain
%rename wine64-full
%rename wine64-utils
%rename winetricks
Conflicts: %{wine}
Conflicts: %{wine64} < %{EVRD}
Conflicts: %{owine64}
Conflicts: %{owine32}
Conflicts: %{owine64}-binfmt
Conflicts: %{owine}-bin
%description -n %{wine64}
Wine is a program which allows running Microsoft Windows programs (including
DOS, Windows 3.x, Win32 and Win64 executables) on Unix. It consists of a
program loader which loads and executes a Microsoft Windows binary, and a
library (called Winelib) that implements Windows API calls using their Unix or
X11 equivalents. The library may also be used for porting Win32 code into
native Unix executables.
This package contains the Win64 version of Wine. You need the wine32 package
from the 32-bit repository to be able to run 32-bit applications.
%files -n %{wine64}
%doc ANNOUNCE AUTHORS README README.install.urpmi README.urpmi
%if %{with unstable}
%{_datadir}/wine/nls/c_*.nls
%{_datadir}/wine/nls/l_intl.nls
%{_datadir}/wine/nls/norm*.nls
%{_datadir}/wine/nls/sortdefault.nls
%{_libdir}/wine/*.ax.so
%{_libdir}/wine/bcrypt.so
%{_libdir}/wine/crtdll.so
%{_libdir}/wine/crypt32.so
%{_libdir}/wine/gdi32.so
%{_libdir}/wine/mscms.so
%{_libdir}/wine/msvcr100.so
%{_libdir}/wine/msvcr110.so
%{_libdir}/wine/msvcr120.so
%{_libdir}/wine/msvcr70.so
%{_libdir}/wine/msvcr71.so
%{_libdir}/wine/msvcr80.so
%{_libdir}/wine/msvcr90.so
%{_libdir}/wine/msvcrt.so
%{_libdir}/wine/msvcrtd.so
%{_libdir}/wine/ntdll.so
%{_libdir}/wine/odbc32.so
%{_libdir}/wine/qcap.so
%{_libdir}/wine/ucrtbase.so
%{_libdir}/wine/user32.so
%{_libdir}/wine/windowscodecs.so
%{_libdir}/wine/winegstreamer.so
%{_libdir}/wine/wmphoto.so
%else
%{_datadir}/wine/l_intl.nls
%{_datadir}/wine/winebus.inf
%{_datadir}/wine/winehid.inf
%endif
%{_bindir}/function_grep.pl
%{_bindir}/msidb
%{_bindir}/msiexec
%{_bindir}/notepad
%{_bindir}/regedit
%{_bindir}/regsvr32
%{_bindir}/wine64
%{_bindir}/wine64-preloader
%{_bindir}/wineboot
%{_bindir}/winecfg
%{_bindir}/wineconsole*
%{_bindir}/winefile
%{_bindir}/winemine
%{_bindir}/winepath
%{_bindir}/wineserver
%{_bindir}/winetricks
%{_bindir}/wisotool
%{_datadir}/applications/*.desktop
%{_datadir}/desktop-directories/mandriva-wine.directory
%{_datadir}/wine/fonts/*
%{_datadir}/wine/wine.inf
%{_iconsdir}/*.png
%{_liconsdir}/*.png
%{_miconsdir}/*.png
%{_libdir}/libwine*.so.%{major}*
%{_libdir}/wine/*.acm.so
%{_libdir}/wine/*.com.so
%{_libdir}/wine/*.cpl.so
%{_libdir}/wine/*.dll.so
%{_libdir}/wine/*.drv.so
%{_libdir}/wine/*.ds.so
%{_libdir}/wine/*.exe.so
%{_libdir}/wine/*.ocx.so
%{_libdir}/wine/*.sys.so
%{_libdir}/wine/*.tlb.so
%{_libdir}/wine/fakedlls
%{_mandir}/man1/msiexec.1*
%{_mandir}/man1/notepad.1*
%{_mandir}/man1/regedit.1*
%{_mandir}/man1/regsvr32.1*
%{_mandir}/man1/wineboot.1*
%{_mandir}/man1/winecfg.1*
%{_mandir}/man1/wineconsole.1*
%{_mandir}/man1/winecpp.1*
%{_mandir}/man1/winefile.1*
%{_mandir}/man1/winemine.1*
%{_mandir}/man1/winepath.1*
%{_mandir}/man1/wineserver.1*
%{_sysconfdir}/xdg/menus/applications-merged/mandriva-wine.menu
%lang(de) %{_mandir}/de.UTF-8/man1/winemaker.1*
%lang(de) %{_mandir}/de.UTF-8/man1/wineserver.1*
%lang(fr) %{_mandir}/fr.UTF-8/man1/winemaker.1*
%lang(fr) %{_mandir}/fr.UTF-8/man1/wineserver.1*
#----------------------------------------------------------------------------
%package -n %{wine64}-devel
Summary: Static libraries, headers and programs for %{name}
Group: Development/C
Requires: %{wine64} = %{EVRD}
%rename %{devname}
Conflicts: %{wine}-devel
Conflicts: %{owine64}-devel
Conflicts: %{owine64}
%description -n %{wine64}-devel
Wine is a program which allows running Microsoft Windows programs (including
DOS, Windows 3.x, Win32 and Win64 executables) on Unix.
This package contains the libraries, the headers and the program files needed
to develop programs running on Wine.
%files -n %{wine64}-devel
%doc AUTHORS README.install.urpmi
%{_bindir}/widl
%{_bindir}/winebuild
%{_bindir}/winecpp
%{_bindir}/winedbg
%{_bindir}/winedump
%{_bindir}/wineg++
%{_bindir}/winegcc
%{_bindir}/winemaker
%{_bindir}/wmc
%{_bindir}/wrc
%{_includedir}/*
%if %{with unstable}
%else
%{_libdir}/libwine*.so
%endif
%{_libdir}/wine/*.a
%{_libdir}/wine/*.def
%{_mandir}/man1/widl.1*
%{_mandir}/man1/winebuild.1*
%{_mandir}/man1/winedbg.1*
%{_mandir}/man1/winedump.1*
%{_mandir}/man1/wineg++.1*
%{_mandir}/man1/winegcc.1*
%{_mandir}/man1/winemaker.1*
%{_mandir}/man1/wmc.1*
%{_mandir}/man1/wrc.1*
%endif
#####################################################################
##
## End of 64bit packages descriptions
##
#####################################################################
#----------------------------------------------------------------------------
%ifarch x86_64
%define wine %{wine64}
%endif
%package -n %{wine}-binfmt
Summary: Support for launching Windows executables directly
Group: Emulators
# Avoid dependency loop
Requires: %{wine} = %{EVRD}
Requires(post): rpm-helper
Requires(post): %{wine} = %{EVRD}
Conflicts: %{owine}-binfmt
Conflicts: %{owine64}-binfmt
%if %{with systemd}
Requires(pre,post,preun,postun): systemd
%endif
%description -n %{wine}-binfmt
Wine is a program which allows running Microsoft Windows programs
(including DOS, Windows 3.x, Win32 and Win64 executables) on Unix.
This package provides support for launching Windows executables directly.
%files -n %{wine}-binfmt
%doc README
%if %{with systemd}
%{_binfmtdir}/wine.conf
%else
%{_initrddir}/wine
%endif
%if %{with systemd}
# Systemd binfmt support
%pre -n %{wine}-binfmt
systemctl stop systemd-binfmt.service
%post -n %{wine}-binfmt
%binfmt_apply wine.conf
%postun -n %{wine}-binfmt
%_postun_unit systemd-binfmt.service
%else
# Old sysvinit
%post -n %{wine}-binfmt
%_post_service wine
%preun -n %{wine}-binfmt
%_preun_service wine
%endif
#----------------------------------------------------------------------------
%prep
%setup -qn wine-%{version} -b5 -a6 -a11 -a12
%if %{with unstable}
#patch0 -p1 -b .conf
#patch1 -p1 -b .staging-localization
#patch2 -p2 -b .winetricks
#patch9 -p1 -b .assert
%else
#patch7 -p1 -b .civ3
#patch8 -p1 -b .conf
%endif
#patch511 -p1 -b .cjk
%if %{with unstable}
# Wine-staging
gzip -dc "%{SOURCE4}" | /bin/tar -xf - --strip-components=1
#patch4 -p1 -b .for-mock-urpm-build
./patches/patchinstall.sh DESTDIR="%{_builddir}/wine-%{version}" --all
%endif
# wine-nine-standalone
pushd ../wine-nine-standalone-%{winenine_ver}
%patch5 -p1 -b .wine-nine-localization
popd
%if %{without unstable}
sed -i 's,@MDKVERSION@,%{mdvver},' dlls/ntdll/server.c
%endif
%build
%ifarch %{ix86}
# (Anssi 04/2008) bug #39604
# Some protection systems complain "debugger detected" with our
# -fomit-frame-pointer flag, so disable it.
export CFLAGS="%{optflags} -fno-omit-frame-pointer"
%else
export CFLAGS="%{optflags}"
%endif
# Disable fortify as it breaks wine
# http://bugs.winehq.org/show_bug.cgi?id=24606
# http://bugs.winehq.org/show_bug.cgi?id=25073
export CFLAGS="`echo $CFLAGS | sed -e 's/-Wp,-D_FORTIFY_SOURCE=2//'` -Wno-error"
# (Anssi 04/2008)
# If icotool is present, it is used to rebuild icon files. It is in Contrib
# so we do not do that; this is here to ensure that installed icoutils does
# not change build behaviour.
export ICOTOOL=false
# 1. Build wine
autoreconf -vfi
# HAL is obsolete, then don't ask for it
# our OSS is too old (< 4), also don't ask for it
# Some sound cards also can need --without-pulse
%configure \
%ifarch x86_64
--enable-win64 \
%endif
--without-hal \
--with-dbus \
--with-x \
--with-gstreamer \
--without-oss \
%if %{with unstable}
--without-pulse \
--with-xattr
%endif
%make depend
%make
# 2. Next, build wine-nine-standalone
pushd ../wine-nine-standalone-%{winenine_ver}
export PKG_CONFIG_PATH=%{_libdir}/pkgconfig
mkdir -p ./tmp
sed -i "s/@PKG_CONFIG@/pkg-config/g" ./tools/cross-wine32.in
sed -i "s/@PKG_CONFIG@/pkg-config/g" ./tools/cross-wine64.in
meson \
%ifarch x86_64
--cross-file "./tools/cross-wine64.in" \
%else
--cross-file "./tools/cross-wine32.in" \
%endif
--buildtype "release" \
--bindir bin \
--libdir lib \
$MESONARGS \
"./tmp/build"
ninja -C "./tmp/build"
find -L .
popd
%install
%makeinstall_std LDCONFIG=/bin/true
# Install wisotool
install -m 0755 %{SOURCE7} %{buildroot}%{_bindir}/
# Install winetricks
install -m 0755 winetricks-%{winetricks_ver}/src/winetricks %{buildroot}%{_bindir}/
# Note: binfmt is insecure (see https://nixtux.ru/450),
# so we will put it in a separate package
# Allow users to launch Windows programs by just clicking on the .exe file...
%if %{with systemd}
# ... using systemd (>= 230)
install -m 644 %{SOURCE3} -D %{buildroot}%{_binfmtdir}/wine.conf
%else
# ... using the old sysvinit way
install -m755 %{SOURCE2} -D %{buildroot}%{_initrddir}/wine
%endif
mkdir -p %{buildroot}%{_sysconfdir}/xdg/menus/applications-merged
cp %{SOURCE8} %{buildroot}%{_sysconfdir}/xdg/menus/applications-merged/
mkdir -p %{buildroot}%{_datadir}/desktop-directories
cp %{SOURCE9} %{buildroot}%{_datadir}/desktop-directories/
mkdir -p %{buildroot}%{_datadir}/applications/
cp rosa-wine-*.desktop %{buildroot}%{_datadir}/applications/
cp -r icons-*/icons %{buildroot}%{_datadir}/
# Categories=Emulator does nothing and is added as a workaround to kde #27700
desktop-file-install --vendor="" \
--add-mime-type=application/x-zip-compressed \
--remove-mime-type=application/x-zip-compressed \
--add-category=Emulator \
--dir %{buildroot}%{_datadir}/applications %{buildroot}%{_datadir}/applications/wine.desktop
%ifarch x86_64
# fix the binary name in the .desktop file
sed -i 's,Exec=wine ,Exec=wine64 ,' %{buildroot}%{_datadir}/applications/wine.desktop
%endif
# Remove rpaths
%ifarch x86_64
chrpath -d %{buildroot}%{_bindir}/{wine64,wineserver,wmc,wrc} %{buildroot}%{_libdir}/wine/*.so
%else
chrpath -d %{buildroot}%{_bindir}/{wine,wineserver,wmc,wrc} %{buildroot}%{_libdir}/wine/*.so
%endif
# Install wine-nine-standalone stuff
pushd ../wine-nine-standalone-%{winenine_ver}
install -m 755 ./tmp/build/ninewinecfg/ninewinecfg.exe.so %{buildroot}/%{_libdir}/wine/ninewinecfg.exe.so
install -m 755 ./tmp/build/ninewinecfg/ninewinecfg.exe.fake %{buildroot}/%{_libdir}/wine/fakedlls/ninewinecfg.exe
install -m 755 ./tmp/build/d3d9-nine/d3d9-nine.dll.so %{buildroot}/%{_libdir}/wine/d3d9-nine.dll.so
install -m 755 ./tmp/build/d3d9-nine/d3d9-nine.dll.fake %{buildroot}/%{_libdir}/wine/fakedlls/d3d9-nine.dll
popd
# Some advices to user
cp %{SOURCE20} .
%if %{with unstable}
cp %{SOURCE21} README.install.urpmi.x86_64
cp %{SOURCE22} README.install.urpmi
%else
cp %{SOURCE24} README.install.urpmi.x86_64
cp %{SOURCE25} README.install.urpmi
%endif
%ifarch x86_64
mv -f README.install.urpmi.x86_64 README.install.urpmi
%else
rm README.install.urpmi.x86_64
%endif