wine/wine.spec
survolog (Andrey Grigorev) c589cddf5c Fix "empty-%postun"
2019-09-01 12:47:50 +03:00

766 lines
22 KiB
RPMSpec

%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 and staging tarballs version
%define stagver 4.15
%define stagpver 4.x
# wine-stable tarball version
%define stabver 4.0.2
%define stabpver 4.0
%define winetricks_ver 20190615
%define winenine_ver 0.4
%if %{with unstable}
%define wine wine
%define wine32 wine32
%define wine64 wine64
%define version %{stagver}
%define pathver %{stagpver}
%define owine wine-stable
%define owine32 wine32-stable
%define owine64 wine64-stable
%define over %{stabver}
%define opver %{stabpver}
%else
%define wine wine-stable
%define wine32 wine32-stable
%define wine64 wine64-stable
%define version %{stabver}
%define pathver %{stabpver}
%define owine wine
%define owine32 wine32
%define owine64 wine64
%define over %{stagver}
%define opver %{stagpver}
%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
# Wine Gallium Nine on https://github.com/iXit/wine-nine-standalone/ now
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-3.16-mdkconf.patch
# Russian localization
Patch1: wine-3.6-staging-ru-localization.patch
# Working workaround for Steam troubles
# Also fixed by passing -no-cef-sandbox to the cmd line
Patch2: crossover_hack.patch
# Configure searches for %%{_includedir}/OpenAL/al.h and %%{_includedir}/OpenCL/opencl.h,
# while we have them in %%{_includedir}/AL/ and %%{_includedir}/CL/
Patch3: wine-4.0-fix-openal-opencl-headers-detection.patch
# For build in mock-urpm only
Patch4: wine-staging-4.5-mock-urpm-broken-pipe.patch
Patch5: wine-nine-standalone-0.3-ru-localization.patch
#if %%{with unstable}
#BuildRequires: faudio-devel
#endif
# This is needed to build wine-nine-standalone
%ifarch x86_64
BuildRequires: %{wine64}-devel
%else
BuildRequires: %{wine}-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: prelink
BuildRequires: sgml-tools
BuildRequires: valgrind
BuildRequires: cups-devel
BuildRequires: gettext-devel
BuildRequires: glibc-static-devel
BuildRequires: gpm-devel
BuildRequires: gsm-devel
BuildRequires: isdn4k-utils-devel
BuildRequires: openafs-devel
BuildRequires: openldap-devel
BuildRequires: pcap-devel
BuildRequires: perl-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(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(libmpg123)
BuildRequires: pkgconfig(libpulse)
BuildRequires: pkgconfig(librsvg-2.0)
BuildRequires: pkgconfig(libtiff-4)
BuildRequires: pkgconfig(libv4l2)
BuildRequires: pkgconfig(libva)
BuildRequires: pkgconfig(libvkd3d)
BuildRequires: pkgconfig(libxslt)
BuildRequires: pkgconfig(ncursesw)
BuildRequires: pkgconfig(netapi)
BuildRequires: pkgconfig(openal)
BuildRequires: pkgconfig(OpenCL)
BuildRequires: pkgconfig(osmesa)
BuildRequires: pkgconfig(sane-backends)
BuildRequires: pkgconfig(sdl2)
BuildRequires: pkgconfig(sm)
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(xinerama)
BuildRequires: pkgconfig(xpm)
BuildRequires: pkgconfig(xrandr)
BuildRequires: pkgconfig(xrender)
%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
Suggests: sane-frontends
Suggests: vulkan
Suggests: vkd3d
Suggests: webcore-fonts
Suggests: %{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} %{owine32} %{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}
%{_bindir}/msidb
%{_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
%{_datadir}/applications/*.desktop
%{_datadir}/desktop-directories/mandriva-wine.directory
%{_datadir}/wine/wine.inf
%{_datadir}/wine/l_intl.nls
%{_datadir}/wine/fonts/*
%dir %{_datadir}/wine
%dir %{_datadir}/wine/fonts
%{_iconsdir}/*.png
%{_liconsdir}/*.png
%{_miconsdir}/*.png
%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*
%{_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/winecpp.1*
%{_mandir}/man1/wineconsole.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
#----------------------------------------------------------------------------
%package -n %{wine32}
Summary: 32-bit support for %{wine} and %{wine64} packages
Group: Emulators
#if %%{with unstable}
#Requires: libfaudio0
#endif
# 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: libfreetype6
Requires: libpng16
Requires: libudev1
Requires: libxcursor1
Requires: libxi6
Requires: libxrender1
# This one need for steam-magazine and certificate in wine
Suggests: libgnutls30
Suggests: libieee1284_3
Suggests: libncurses5
Suggests: libncurses6
Suggests: libncursesw5
Suggests: libncursesw6
Suggests: libsane1
# This one is now integrated in Mesa
Suggests: libtxc_dxtn.so
Suggests: libv4l0
Suggests: libvulkan1
Suggests: 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
%{_bindir}/wine
%{_bindir}/wine-preloader
%dir %{_libdir}/wine
%{_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*
%{_libdir}/libwine*.so.%{major}*
%{_libdir}/wine/*.acm.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
#----------------------------------------------------------------------------
%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 %{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}/winegcc
%{_bindir}/wineg++
%{_bindir}/winemaker
%{_bindir}/wmc
%{_bindir}/wrc
%{_includedir}/*
%{_libdir}/wine/*.a
%{_libdir}/wine/*.def
%{_libdir}/libwine*.so
%{_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
#if %%{with unstable}
#Requires: lib64faudio0
#endif
# wine dlopen's these, so let's add the dependencies ourself
Requires: lib64asound2
Requires: lib64d3dtracker1
Requires: lib64freetype6
Requires: lib64png16
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
Suggests: lib64ncurses5
Suggests: lib64ncurses6
Suggests: lib64ncursesw5
Suggests: lib64ncursesw6
Suggests: sane-frontends
Suggests: vkd3d
Suggests: vulkan
Suggests: webcore-fonts
Suggests: %{wine32} = %{EVRD}
Suggests: %{wine64}-binfmt
# This one is now part of Mesa
Suggests: libtxc_dxtn
# Download wine64-gecko from internet, when start 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} %{owine32} %{owine64}-binfmt %{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}
%{_bindir}/msidb
%{_datadir}/wine/winebus.inf
%{_datadir}/wine/winehid.inf
%endif
%{_bindir}/function_grep.pl
%{_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
%dir %{_datadir}/wine
%dir %{_datadir}/wine/fonts
%dir %{_libdir}/wine
%{_datadir}/applications/*.desktop
%{_datadir}/desktop-directories/mandriva-wine.directory
%{_datadir}/wine/l_intl.nls
%{_datadir}/wine/wine.inf
%{_datadir}/wine/fonts/*
%{_iconsdir}/*.png
%{_liconsdir}/*.png
%{_miconsdir}/*.png
%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*
%{_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*
%{_libdir}/libwine*.so.%{major}*
%{_libdir}/wine/*.acm.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
%{_sysconfdir}/xdg/menus/applications-merged/mandriva-wine.menu
#----------------------------------------------------------------------------
%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 %{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}/winegcc
%{_bindir}/wineg++
%{_bindir}/winemaker
%{_bindir}/wmc
%{_bindir}/wrc
%{_includedir}/*
%{_libdir}/wine/*.a
%{_libdir}/wine/*.def
%{_libdir}/libwine*.so
%{_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 %{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
echo
%_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
%patch0 -p1 -b .conf
%patch1 -p1 -b .staging-localization
%patch2 -p1 -b .crossover_hack
%patch3 -p1 -b .fix-headers
# Wine-staging
%if %{with unstable}
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
sed -i 's,@MDKVERSION@,%{mdvver},' dlls/ntdll/server.c
%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"
%endif
# (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
%configure2_5x \
%ifarch x86_64
--enable-win64 \
%endif
--without-hal \
--with-xattr \
--with-gstreamer \
--without-oss \
%if %{with unstable}
--without-pulse
%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@/i586-unknown-linux-gnu-pkg-config/g" ./tools/cross-wine32.in
sed -i "s/@PKG_CONFIG@/x86_64-unknown-linux-gnu-pkg-config/g" ./tools/cross-wine64.in
cp ./tools/cross-wine32.in ./tools/cross-wine32
cp ./tools/cross-wine64.in ./tools/cross-wine64
meson \
%ifarch x86_64
--cross-file "./tools/cross-wine64" \
%else
--cross-file "./tools/cross-wine32" \
%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