File wine-staging.txt of Package wine-staging

#
# spec file for package wine-staging (64-bit only)
#
# Copyright (c) 2025 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

%define _winelibdir %_libdir

%global         flavor staging
%define         psuffix -staging
%define         wow64 0
%define         staging 1

%global _mingw64_find_debuginfo \
    rm -f %{_builddir}/mingw64-debugfiles.list; \
    bash -x /usr/lib/rpm/mingw64-find-debuginfo.sh --no-debug-source-package %{_builddir}; \
    mkdir -p %{buildroot}/usr/lib/debug%{_winelibdir}/wine/x86_64-windows; \
    mv %{buildroot}%{_winelibdir}/wine/x86_64-windows/*.debug %{buildroot}/usr/lib/debug%{_winelibdir}/wine/x86_64-windows; \
    sed -i 's,^%{_winelibdir},/usr/lib/debug%{_winelibdir},g' %{_builddir}/mingw64-debugfiles.list; \
    mkdir -p %{buildroot}/usr/src/debug/%{name}-%{version}; \
    echo "%dir /usr/src/debug/%{name}-%{version}" >> %{_builddir}/mingw64-debugfiles.list; \
    %{nil}

%global __arch_install_post %_mingw64_find_debuginfo
%global _win_debug_package %_mingw64_debug_package -e -C wine%{psuffix}-win-debuginfo -N wine%{psuffix}-win-debuginfo

%define         _lto_cflags %{nil}
Name:           wine%{psuffix}
%define downloadver  10.15
Version:        10.15
Release:        0
Summary:        An MS Windows Emulator (64-bit Staging version)
Group:          System/Emulators/PC
License:        LGPL-2.1-or-later
URL:            https://winehq.org
Source0:        https://dl.winehq.org/wine/source/10.x/wine-%{downloadver}.tar.xz
Source1:        https://dl.winehq.org/wine/source/10.x/wine-%{downloadver}.tar.xz.sign
Source2:        https://keyserver.ubuntu.com/pks/lookup?op=get&search=0xda23579a74d4ad9af9d3f945cefac8eaaf17519d#/wine.keyring
Source3:        https://github.com/wine-staging/wine-staging/archive/v%{downloadver}.tar.gz#/wine-staging-%{downloadver}.tar.xz
Source97:       baselibs.conf
Source98:       wine.rpmlintrc
Source99:       get-sources.sh

BuildRequires:  autoconf
BuildRequires:  bison
BuildRequires:  flex
BuildRequires:  giflib-devel
BuildRequires:  libgsm-devel
BuildRequires:  update-desktop-files
BuildRequires:  pkgconfig(OpenCL)
BuildRequires:  pkgconfig(alsa)
BuildRequires:  pkgconfig(dbus-1)
BuildRequires:  pkgconfig(fontconfig)
BuildRequires:  pkgconfig(freetype2)
BuildRequires:  pkgconfig(gl)
BuildRequires:  pkgconfig(glib-2.0)
BuildRequires:  pkgconfig(glut)
BuildRequires:  pkgconfig(gnutls)
BuildRequires:  pkgconfig(gstreamer-1.0)
BuildRequires:  pkgconfig(gstreamer-plugins-base-1.0)
BuildRequires:  pkgconfig(gtk+-3.0)
BuildRequires:  pkgconfig(krb5)
BuildRequires:  pkgconfig(lcms2)
BuildRequires:  pkgconfig(ldap)
BuildRequires:  pkgconfig(libavcodec)
BuildRequires:  pkgconfig(libgphoto2)
BuildRequires:  pkgconfig(libjpeg)
BuildRequires:  pkgconfig(libmpg123)
BuildRequires:  pkgconfig(libpcap)
BuildRequires:  pkgconfig(libpcsclite)
BuildRequires:  pkgconfig(libpng)
BuildRequires:  pkgconfig(libpulse)
BuildRequires:  pkgconfig(libsystemd)
BuildRequires:  pkgconfig(libtiff-4)
BuildRequires:  pkgconfig(libudev)
BuildRequires:  pkgconfig(libunwind)
BuildRequires:  pkgconfig(libusb-1.0)
BuildRequires:  pkgconfig(libv4l2)
BuildRequires:  pkgconfig(libvkd3d)
BuildRequires:  pkgconfig(libxml-2.0)
BuildRequires:  pkgconfig(libxslt)
BuildRequires:  pkgconfig(ncurses)
BuildRequires:  pkgconfig(odbc)
BuildRequires:  pkgconfig(openal)
BuildRequires:  pkgconfig(openssl)
BuildRequires:  pkgconfig(sane-backends)
BuildRequires:  pkgconfig(sdl2)
BuildRequires:  pkgconfig(smbclient)
BuildRequires:  pkgconfig(vulkan)
BuildRequires:  pkgconfig(wayland-egl)
BuildRequires:  pkgconfig(x11)
BuildRequires:  pkgconfig(xcomposite)
BuildRequires:  pkgconfig(xcursor)
BuildRequires:  pkgconfig(xext)
BuildRequires:  pkgconfig(xfixes)
BuildRequires:  pkgconfig(xi)
BuildRequires:  pkgconfig(xinerama)
BuildRequires:  pkgconfig(xkbcommon)
BuildRequires:  pkgconfig(xkbregistry)
BuildRequires:  pkgconfig(xrandr)
BuildRequires:  pkgconfig(xrender)
BuildRequires:  pkgconfig(xxf86vm)
BuildRequires:  pkgconfig(zlib)
BuildRequires:  git-core
BuildRequires:  pkgconfig(gtk+-3.0)
BuildRequires:  pkgconfig(libva)
BuildRequires:  mingw64-cross-gcc
BuildRequires:  mingw64-filesystem >= 20250221

Requires:       samba-winbind
Recommends:     wine-gecko >= 2.47.4
Recommends:     wine-mono >= 9.4.0
Recommends:     winetricks
Conflicts:      wine
Conflicts:      wine-gecko < 2.47.4
Conflicts:      wine-mono < 9.4.0
Provides:       wine = %{version}-%{release}
ExclusiveArch:  x86_64

%description
Wine is a compatibility layer capable of running Windows
applications. Instead of simulating internal Windows logic like a
virtual machine or emulator, Wine translates Windows API calls into
POSIX calls on-the-fly, eliminating the performance and memory
penalties of other methods and allowing you to cleanly integrate
Windows applications into your desktop.

This is a 64-bit only version of WINE with the "staging" development
patchset on top of the regular Wine release, which includes additional
features and improvements not yet merged into the main Wine tree.

%package devel
Summary:        Files for Wine development (64-bit Staging version)
Provides:       wine-devel = %{version}
Conflicts:      wine-devel

%description devel
This RPM contains the header files and development tools for the 64-bit
WINE staging libraries.

%_win_debug_package

%prep
%autosetup -n wine-%{downloadver}
tar xf %{SOURCE3}
python3 wine-staging-%{downloadver}/staging/patchinstall.py --all

%build
export WIDL_TIME_OVERRIDE="0" 	# for reproducible builds.
autoreconf -i -f
export CFLAGS="${CFLAGS:-%{optflags}}"
export CXXFLAGS="${CXXFLAGS:-%{optflags}}"

%configure \
        --libdir=%_libdir \
        --with-x \
        --with-wayland \
        --with-gstreamer \
        --enable-win64 \
        --verbose || cat config.log
grep "have_x=yes" config.log || exit 1

# generate baselibs.conf
echo "# autogenerated in .spec file" >%SOURCE97
echo "%name" >> %SOURCE97
echo "  +^/usr/lib64/wine/x86_64-windows" >> %SOURCE97
echo "  +^/usr/lib64/wine/x86_64-unix" >> %SOURCE97
grep SONAME_ config.log
grep SONAME_ config.log|grep -v 'so"'|sed -e 's/^.*\(".*"\).*$/ requires \1/;'|sort -u >>%SOURCE97
echo " provides \"wine-<targettype> = <version>\"" >> %SOURCE97
echo " conflicts \"otherproviders(wine-<targettype>)\"" >> %SOURCE97
echo "%%post" >> %SOURCE97
echo "    ln -s /usr/lib64/wine/x86_64-windows /%_winelibdir/wine/x86_64-windows" >> %SOURCE97
echo "    ln -s /usr/lib64/wine/x86_64-unix /%_winelibdir/wine/x86_64-unix" >> %SOURCE97
echo "%name-devel" >> %SOURCE97
echo "  +^/usr/lib/wine/.*def" >> %SOURCE97
echo " provides \"wine-devel-<targettype> = <version>\"" >> %SOURCE97
echo " conflicts \"otherproviders(wine-devel-<targettype>)\"" >> %SOURCE97

cat %SOURCE97

%make_build all

%install
%make_install DESTDIR=%{buildroot}

rm -rf %{buildroot}%{_mandir}/{pl,de,fr}.UTF-8

# find the implicit dependencies
%define winedir %_builddir/wine-%downloadver
cat >%winedir/my-find-requires.sh <<EOF
#!/bin/bash
%{__find_requires}
grep SONAME_ %winedir/config.log|grep -v 'so"'|sed -e 's/^.*"\(.*\)".*$/\1()(64bit)/;'|sort -u
EOF
chmod 755 %winedir/my-find-requires.sh
%define _use_internal_dependency_generator 0
%define __find_requires %winedir/my-find-requires.sh

%ldconfig_scriptlets

%files
%license LICENSE LICENSE.OLD
%doc ANNOUNCE.md AUTHORS README.md
%{_bindir}/function_grep.pl
%{_bindir}/msidb
%{_bindir}/msiexec
%{_bindir}/notepad
%{_bindir}/regedit
%{_bindir}/regsvr32
%{_bindir}/wineboot
%{_bindir}/winecfg
%{_bindir}/wineconsole
%{_bindir}/winedbg
%{_bindir}/winefile
%{_bindir}/winemine
%{_bindir}/winepath
%{_bindir}/wineserver
%{_datadir}/applications/wine.desktop
%{_mandir}/man?/winedbg.?%{?ext_man}
%{_mandir}/man?/wineserver.?%{?ext_man}
%{_mandir}/man?/msiexec.?%{?ext_man}
%{_mandir}/man?/notepad.?%{?ext_man}
%{_mandir}/man?/regedit.?%{?ext_man}
%{_mandir}/man?/regsvr32.?%{?ext_man}
%{_mandir}/man?/wineboot.?%{?ext_man}
%{_mandir}/man?/winebuild.?%{?ext_man}
%{_mandir}/man?/winecfg.?%{?ext_man}
%{_mandir}/man?/wineconsole.?%{?ext_man}
%{_mandir}/man?/winecpp.?%{?ext_man}
%{_mandir}/man?/winefile.?%{?ext_man}
%{_mandir}/man?/winemine.?%{?ext_man}
%{_mandir}/man?/winepath.?%{?ext_man}
%{_datadir}/wine
%{_mandir}/man?/wine.?%{?ext_man}
%dir %{_winelibdir}/wine
%{_bindir}/wine
%{_winelibdir}/wine/x86_64-unix
%exclude %{_winelibdir}/wine/x86_64-unix/*.a
%{_winelibdir}/wine/x86_64-windows
%exclude %{_winelibdir}/wine/x86_64-windows/*.a

%files devel
%{_includedir}/wine
%{_bindir}/widl
%{_bindir}/winebuild
%{_bindir}/winecpp
%{_bindir}/winedump
%{_bindir}/wineg++
%{_bindir}/winegcc
%{_bindir}/winemaker
%{_bindir}/wmc
%{_bindir}/wrc
%{_mandir}/man?/winemaker.?%{?ext_man}
%{_mandir}/man?/widl.?%{?ext_man}
%{_mandir}/man?/winedump.?%{?ext_man}
%{_mandir}/man?/wineg++.?%{?ext_man}
%{_mandir}/man?/winegcc.?%{?ext_man}
%{_mandir}/man?/wmc.?%{?ext_man}
%{_mandir}/man?/wrc.?%{?ext_man}
%{_winelibdir}/wine/x86_64-unix/*.a
%{_winelibdir}/wine/x86_64-windows/*.a

%changelog
openSUSE Build Service is sponsored by