wine/wine.spec

308 lines
8.7 KiB
RPMSpec
Raw Permalink Normal View History

2024-09-14 15:21:08 +08:00
%define _lto_cflags %{nil}
%define realver 9.17
%define develver 9.17
%define packagever 9.17
2024-09-14 15:21:08 +08:00
# defaults ..
%define pkg wine
%define compat_package winehq
%define _prefix /opt/wine
%define ver %packagever
2024-09-14 15:21:08 +08:00
%define lib_major 1
%define lib_name lib%{pkg}1
%define lib_name_devel lib%{pkg}-devel
%undefine _hardened_build
2024-09-14 15:21:08 +08:00
Name: %pkg
Version: %ver
Release: 1
Summary: WINE Is Not An Emulator - runs MS Windows programs
License: LGPLv2+
Group: Emulators
URL: https://www.winehq.org/
2024-09-14 15:21:08 +08:00
%define wine %{name}
%define mark64 %{nil}
2024-09-14 15:21:08 +08:00
Source0: https://dl.winehq.org/wine/source/9.x/wine-%{realver}.tar.xz
Source1: https://dl.winehq.org/wine/source/9.x/wine-%{realver}.tar.xz.sign
2024-09-14 15:21:08 +08:00
# Alexandres key
Source99: wine.keyring
2024-09-14 15:21:08 +08:00
BuildRequires: mingw32-gcc
BuildRequires: mingw64-gcc
BuildRequires: SDL2-devel
BuildRequires: opencl-headers
BuildRequires: ocl-icd-devel
BuildRequires: pcsc-lite-devel
BuildRequires: samba-devel
BuildRequires: icoutils
BuildRequires: vulkan-devel
BuildRequires: lcms2-devel
BuildRequires: gstreamer1-devel
BuildRequires: gstreamer1-plugins-base-devel
BuildRequires: fontforge
BuildRequires: fontpackages-devel
BuildRequires: libudev-devel
BuildRequires: libv4l-devel
BuildRequires: pulseaudio-libs-devel
BuildRequires: lzma
BuildRequires: audiofile-devel
BuildRequires: giflib-devel
BuildRequires: ImageMagick-devel
BuildRequires: libpcap-devel
BuildRequires: libXxf86dga-devel
BuildRequires: mesa-libOSMesa-devel
BuildRequires: libgphoto2-devel
BuildRequires: libusb1-devel
BuildRequires: alsa-lib-devel
BuildRequires: autoconf
2024-09-14 15:21:08 +08:00
BuildRequires: bison
BuildRequires: coreutils
BuildRequires: cups-devel
BuildRequires: dbus-devel
BuildRequires: desktop-file-utils
2024-09-14 15:21:08 +08:00
BuildRequires: flex
BuildRequires: fontconfig-devel
BuildRequires: freetype-devel
BuildRequires: freeglut-devel
2024-09-14 15:21:08 +08:00
BuildRequires: gawk
BuildRequires: xz
BuildRequires: gettext-devel
BuildRequires: gnutls-devel
BuildRequires: krb5-devel
BuildRequires: libattr-devel
BuildRequires: libieee1284-devel
BuildRequires: librsvg2
BuildRequires: librsvg2-devel
BuildRequires: libstdc++-devel
BuildRequires: libX11-devel
2024-09-14 15:21:08 +08:00
BuildRequires: libXcomposite-devel
BuildRequires: libXcursor-devel
BuildRequires: libXext-devel
2024-09-14 15:21:08 +08:00
BuildRequires: libXi-devel
BuildRequires: libXinerama-devel
2024-09-14 15:21:08 +08:00
BuildRequires: libxkbcommon-devel
BuildRequires: libXmu-devel
2024-09-14 15:21:08 +08:00
BuildRequires: libXrandr-devel
BuildRequires: libXrender-devel
BuildRequires: libXxf86vm-devel
BuildRequires: mesa-libGL-devel
BuildRequires: mesa-libGLU-devel
BuildRequires: ncurses-devel
BuildRequires: sane-backends-devel
BuildRequires: unixODBC-devel
BuildRequires: unzip
BuildRequires: util-linux
%ifarch aarch64
2024-09-14 15:21:08 +08:00
BuildRequires: clang
BuildRequires: lld
%else
2024-09-14 15:21:08 +08:00
BuildRequires: gcc
%endif
2024-09-14 15:21:08 +08:00
Provides: %{lib_name} = %{version}-%{release}
Obsoletes: %{lib_name} <= %{version}-%{release}
Provides: %{name}-bin = %{version}-%{release}
Requires: alsa-lib
Requires: attr
Requires: cups-libs
Requires: dbus-libs
Requires: fontconfig
Requires: freetype
Requires: gnutls
Requires: krb5-libs
Requires: ncurses-libs
Requires: unixODBC
Requires: mesa-libOSMesa
Requires: sane-backends-libs
2024-09-14 15:21:08 +08:00
Requires: SDL2
Requires: libv4l
Requires: vulkan-loader
Requires: libXcomposite
Requires: libXcursor
Requires: libXi
Requires: libXinerama
Requires: libXrandr
Requires: libXxf86vm
Suggests: sane-frontends
Requires(post): desktop-file-utils
Requires(postun): desktop-file-utils
%define desc Wine is a program which allows running Microsoft Windows programs \
(including DOS, Windows 3.x and Win32 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.
2024-09-14 15:21:08 +08:00
%description
%desc
2024-09-14 15:21:08 +08:00
%package -n %{wine}-devel
Summary: Static libraries and headers for %{name} (64-bit)
Group: Development/C
Requires: %{wine} = %{version}-%{release}
Provides: %{lib_name_devel} = %{version}-%{release}
Obsoletes: %{lib_name_devel} <= %{version}-%{release}
%description -n %{wine}-devel
Wine is a program which allows running Microsoft Windows programs
(including DOS, Windows 3.x and Win32 executables) on Unix.
2024-09-14 15:21:08 +08:00
This package contains the libraries and header files needed to
develop programs which make use of Wine.
2024-09-14 15:21:08 +08:00
%package -n %compat_package
Summary: WINE Is Not An Emulator - runs MS Windows programs
Group: Emulators
Requires: %{wine} = %{version}-%{release}
2024-09-14 15:21:08 +08:00
%description -n %compat_package
Wine is a program which allows running Microsoft Windows programs
(including DOS, Windows 3.x and Win32 executables) on Unix.
2024-09-14 15:21:08 +08:00
This compatibility package allows to use %{wine} system-wide as
the default Wine version.
%prep
2024-09-14 15:21:08 +08:00
# unpack tarball SOURCE0
%setup -n wine-%realver -q -T -b0
%build
2024-09-14 15:21:08 +08:00
export LDFLAGS="$(echo "%{build_ldflags}" | sed -e 's/-Wl,-z,relro//' -e 's/-Wl,--build-id=sha1//')"
%ifarch x86_64
2024-09-14 15:21:08 +08:00
export CFLAGS="$(echo "%{optflags}" | sed -e 's/-O2//' -e 's/-Wp,-D_FORTIFY_SOURCE=2//' -e 's/-fcf-protection//' -e 's/-fstack-protector-strong//' -e 's/-fstack-clash-protection//') -O2"
%else
2024-09-14 15:21:08 +08:00
export CFLAGS="$(echo "%{optflags}" | sed -e 's/-Wp,-D_FORTIFY_SOURCE=2//' -e 's/-fcf-protection//' -e 's/-fstack-protector-strong//' -e 's/-fstack-clash-protection//')"
%endif
%configure \
2024-09-14 15:21:08 +08:00
--with-gstreamer \
--disable-tests \
--enable-archs=i386,x86_64 \
--with-x
make -j4
%install
2024-09-14 15:21:08 +08:00
%makeinstall LDCONFIG=/bin/true
2024-09-14 15:21:08 +08:00
# Compat symlinks for bindir
mkdir -p "%{buildroot}/usr/bin"
for _file in $(ls "%{buildroot}/%{_bindir}"); do \
ln -s "%{_bindir}/$_file" "%{buildroot}/usr/bin/$_file"; \
done
2024-09-14 15:21:08 +08:00
# Compat symlinks for desktop file
mkdir -p "%{buildroot}/usr/share/applications"
for _file in $(ls "%{buildroot}/%{_datadir}/applications"); do \
ln -s "%{_datadir}/applications/$_file" "%{buildroot}/usr/share/applications/$_file"; \
done
2024-09-14 15:21:08 +08:00
# Compat manpages
for _dir in man1 de.UTF-8/man1 fr.UTF-8/man1 pl.UTF-8/man1; do \
mkdir -p "%{buildroot}/usr/share/man/$_dir"; \
done
2024-09-14 15:21:08 +08:00
install -p -m 0644 loader/wine.man "%{buildroot}/usr/share/man/man1/wine.1"
install -p -m 0644 loader/wine.de.UTF-8.man "%{buildroot}/usr/share/man/de.UTF-8/man1/wine.1"
install -p -m 0644 loader/wine.fr.UTF-8.man "%{buildroot}/usr/share/man/fr.UTF-8/man1/wine.1"
install -p -m 0644 loader/wine.pl.UTF-8.man "%{buildroot}/usr/share/man/pl.UTF-8/man1/wine.1"
2024-09-14 15:21:08 +08:00
%files -n %{wine}
%doc ANNOUNCE.md AUTHORS README.md
2024-09-14 15:21:08 +08:00
%{_bindir}/function_grep.pl
%{_bindir}/msiexec
%{_bindir}/msidb
%{_bindir}/notepad
%{_bindir}/regedit
%{_bindir}/regsvr32
%{_bindir}/widl
2024-09-14 15:21:08 +08:00
%{_bindir}/wineboot
%{_bindir}/winebuild
2024-09-14 15:21:08 +08:00
%{_bindir}/winecfg
%{_bindir}/wineconsole*
%{_bindir}/winecpp
2024-09-14 15:21:08 +08:00
%{_bindir}/winedbg
%{_bindir}/winedump
2024-09-14 15:21:08 +08:00
%{_bindir}/winefile
%{_bindir}/wineg++
%{_bindir}/winegcc
%{_bindir}/winemaker
2024-09-14 15:21:08 +08:00
%{_bindir}/winemine
%{_bindir}/winepath
%{_bindir}/wineserver
%{_bindir}/wmc
%{_bindir}/wrc
2024-09-14 15:21:08 +08:00
%lang(de) %{_mandir}/de.UTF-8/man?/winemaker.?*
%lang(de) %{_mandir}/de.UTF-8/man?/wineserver.?*
%lang(fr) %{_mandir}/fr.UTF-8/man?/winemaker.?*
%lang(fr) %{_mandir}/fr.UTF-8/man?/wineserver.?*
%{_mandir}/man?/widl.1*
%{_mandir}/man?/winebuild.1*
%{_mandir}/man?/winecpp.1*
%{_mandir}/man?/winedbg.1*
%{_mandir}/man?/winedump.1*
%{_mandir}/man?/wineg++.1*
%{_mandir}/man?/winegcc.1*
%{_mandir}/man?/winemaker.1*
%{_mandir}/man?/wmc.1*
%{_mandir}/man?/wrc.1*
%{_mandir}/man?/msiexec.?*
%{_mandir}/man?/notepad.?*
%{_mandir}/man?/regedit.?*
%{_mandir}/man?/regsvr32.?*
%{_mandir}/man?/wineboot.?*
%{_mandir}/man?/winecfg.?*
%{_mandir}/man?/wineconsole.?*
%{_mandir}/man?/winefile.?*
%{_mandir}/man?/winemine.?*
%{_mandir}/man?/winepath.?*
%{_mandir}/man?/wineserver.?*
%dir %{_datadir}/wine
%{_datadir}/wine/wine.inf
%{_datadir}/wine/nls/*.nls
%{_datadir}/applications/*.desktop
%dir %{_datadir}/wine/fonts
%{_datadir}/wine/fonts/*
%{_bindir}/wine
%{_bindir}/wine-preloader
%{_mandir}/man?/wine.?*
%lang(de) %{_mandir}/de.UTF-8/man?/wine.?*
%lang(fr) %{_mandir}/fr.UTF-8/man?/wine.?*
%lang(pl) %{_mandir}/pl.UTF-8/man?/wine.?*
%ifarch x86_64
%{_libdir}/wine/x86_64-unix/*.*
%else
%{_libdir}/wine/aarch64-unix/*.*
%endif
2024-09-14 15:21:08 +08:00
%{_libdir}/wine/i386-windows/*.*
%{_libdir}/wine/x86_64-windows/*.*
2024-09-14 15:21:08 +08:00
%files -n %{wine}-devel
%{_includedir}/*
2024-09-14 15:21:08 +08:00
%files -n %compat_package
/usr/bin/*
/usr/share/applications/*.desktop
/usr/share/man/man?/*
%lang(de) /usr/share/man/de.UTF-8/man?/*
%lang(fr) /usr/share/man/fr.UTF-8/man?/*
%lang(pl) /usr/share/man/pl.UTF-8/man?/*
%changelog
2024-09-14 15:21:08 +08:00
* Sat Sep 14 2024 Yang Feng <yangfeng@kylinsec.com.cn> - 9.17-1
- version update
2024-09-14 15:21:08 +08:00
* Fri Jan 19 2024 Li Shunlong <lishunlong@kylinsec.com.cn> - 9.0-2
- version update
2024-09-14 15:21:08 +08:00
* Tue Nov 24 2020 Zhiyi Weng <zhiyi@iscas.ac.cn> - 5.5-2
- Remove dependency of 32-bit packages.
2024-09-14 15:21:08 +08:00
* Thu Nov 12 2020 Zhiyi Weng <zhiyi@iscas.ac.cn> - 5.5-1
- Initial version.