| ... | ... | --- a/wine.spec |
| ... | ... | +++ b/wine.spec |
| ... | ... | @@ -17,14 +17,14 @@ |
| 17 | 17 |
%define devname %mklibname %{name} -d
|
| 18 | 18 |
|
| 19 | 19 |
# Switch between systemd-binfmt and sysvinit support
|
| 20 |
%define with_systemd 1
|
|
| 20 |
%bcond_without systemd
|
|
| 21 | 21 |
|
| 22 | 22 |
%define winetricks_ver 20171018
|
| 23 | 23 |
|
| 24 | 24 |
Summary: WINE Is Not An Emulator - runs MS Windows programs
|
| 25 | 25 |
Name: wine
|
| 26 | 26 |
Version: 2.21
|
| 27 |
Release: 1
|
|
| 27 |
Release: 2
|
|
| 28 | 28 |
Epoch: 2
|
| 29 | 29 |
License: LGPLv2+
|
| 30 | 30 |
Group: Emulators
|
| ... | ... | @@ -120,6 +120,45 @@ ExclusiveArch: x86_64 |
| … | … | |
| 120 | 120 |
|
| 121 | 121 |
#----------------------------------------------------------------------------
|
| 122 | 122 |
|
| 123 |
%package binfmt
|
|
| 124 |
Summary: Support for launching Windows executables directly
|
|
| 125 |
Group: Emulators
|
|
| 126 |
Requires: %{wine} = %{EVRD}
|
|
| 127 |
Requires(post): %{wine} = %{EVRD}
|
|
| 128 |
%if %{with systemd}
|
|
| 129 |
Requires(post,postun): systemd
|
|
| 130 |
%endif
|
|
| 131 |
Conflicts: %{wine} < 2:2.21-2
|
|
| 132 |
|
|
| 133 |
%description binfmt
|
|
| 134 |
Wine is a program which allows running Microsoft Windows programs
|
|
| 135 |
(including DOS, Windows 3.x and Win32 executables) on Unix.
|
|
| 136 |
|
|
| 137 |
This package provides support for launching Windows executables directly.
|
|
| 138 |
|
|
| 139 |
%files binfmt
|
|
| 140 |
%if %{with systemd}
|
|
| 141 |
%{_binfmtdir}/%{name}.conf
|
|
| 142 |
%else
|
|
| 143 |
%{_initrddir}/%{name}
|
|
| 144 |
%endif
|
|
| 145 |
|
|
| 146 |
%if %{with systemd}
|
|
| 147 |
# Systemd binfmt support
|
|
| 148 |
%post binfmt
|
|
| 149 |
%binfmt_apply %{name}.conf
|
|
| 150 |
%postun binfmt
|
|
| 151 |
%_postun_unit systemd-binfmt.service
|
|
| 152 |
%else
|
|
| 153 |
# Old sysvinit
|
|
| 154 |
%post binfmt
|
|
| 155 |
%_post_service %{name}
|
|
| 156 |
%preun binfmt
|
|
| 157 |
%_preun_service %{name}
|
|
| 158 |
%endif
|
|
| 159 |
|
|
| 160 |
#----------------------------------------------------------------------------
|
|
| 161 |
|
|
| 123 | 162 |
%ifarch x86_64
|
| 124 | 163 |
%package -n %{wine}
|
| 125 | 164 |
Summary: WINE Is Not An Emulator - runs MS Windows programs
|
| ... | ... | @@ -156,11 +195,9 @@ Suggests: sane-frontends |
| … | … | |
| 195 | 195 |
Requires: cabextract
|
| 196 | 196 |
Requires: unzip
|
| 197 | 197 |
Suggests: webcore-fonts
|
| 198 |
Suggests: %{name}-binfmt
|
|
| 198 | 199 |
Requires(post,postun): desktop-common-data
|
| 199 | 200 |
Requires(post,preun): rpm-helper
|
| 200 |
%if %{with_systemd}
|
|
| 201 |
Requires(post,postun): systemd
|
|
| 202 |
%endif
|
|
| 203 | 201 |
|
| 204 | 202 |
%ifarch %{ix86}
|
| 205 | 203 |
Conflicts: wine64
|
| ... | ... | @@ -329,15 +366,15 @@ autoreconf -vfi |
| … | … | |
| 366 | 366 |
install -m 0755 %{SOURCE11} %{buildroot}%{_bindir}/
|
| 367 | 367 |
install -m 0755 %{SOURCE12} %{buildroot}%{_bindir}/
|
| 368 | 368 |
|
| 369 |
# Disabled binfmt, because its insecure, see https://nixtux.ru/450
|
|
| 370 |
## Allow users to launch Windows programs by just clicking on the .exe file...
|
|
| 371 |
#%if %{with_systemd}
|
|
| 372 |
## ... using systemd (>= 230)
|
|
| 373 |
#install -m 644 %{SOURCE3} -D %{buildroot}%{_binfmtdir}/%{name}.conf
|
|
| 374 |
#%else
|
|
| 375 |
## ... using the old sysvinit way
|
|
| 376 |
#install -m755 %{SOURCE2} -D %{buildroot}%{_initrddir}/%{name}
|
|
| 377 |
#%endif
|
|
| 369 |
# Note: binfmt is insecure, see https://nixtux.ru/450
|
|
| 370 |
# Allow users to launch Windows programs by just clicking on the .exe file...
|
|
| 371 |
%if %{with systemd}
|
|
| 372 |
# ... using systemd (>= 230)
|
|
| 373 |
install -m 644 %{SOURCE3} -D %{buildroot}%{_binfmtdir}/%{name}.conf
|
|
| 374 |
%else
|
|
| 375 |
# ... using the old sysvinit way
|
|
| 376 |
install -m755 %{SOURCE2} -D %{buildroot}%{_initrddir}/%{name}
|
|
| 377 |
%endif
|
|
| 378 | 378 |
|
| 379 | 379 |
mkdir -p %{buildroot}%{_sysconfdir}/xdg/menus/applications-merged
|
| 380 | 380 |
cat > %{buildroot}%{_sysconfdir}/xdg/menus/applications-merged/mandriva-%{name}.menu <<EOF
|
| ... | ... | @@ -454,26 +491,6 @@ you need to also install the 'wine32' package from the 32-bit repository. |
| … | … | |
| 491 | 491 |
EOF
|
| 492 | 492 |
%endif
|
| 493 | 493 |
|
| 494 |
|
|
| 495 |
%preun -n %{wine}
|
|
| 496 |
%_preun_service %{name}
|
|
| 497 |
|
|
| 498 |
%if %{with_systemd}
|
|
| 499 |
# Systemd binfmt support
|
|
| 500 |
%post -n %{wine}
|
|
| 501 |
%binfmt_apply %{name}.conf
|
|
| 502 |
%else
|
|
| 503 |
# Old sysvinit
|
|
| 504 |
%post -n %{wine}
|
|
| 505 |
%_post_service %{name}
|
|
| 506 |
%endif
|
|
| 507 |
|
|
| 508 |
%if %{with_systemd}
|
|
| 509 |
%postun -n %{wine}
|
|
| 510 |
%_postun_unit systemd-binfmt.service
|
|
| 511 |
%endif
|
|
| 512 |
|
|
| 513 |
|
|
| 514 | 494 |
%files -n %{wine}
|
| 515 | 495 |
%doc ANNOUNCE AUTHORS README
|
| 516 | 496 |
%ifarch x86_64
|
| ... | ... | @@ -481,11 +498,6 @@ EOF |
| … | … | |
| 498 | 498 |
%{_bindir}/wine64
|
| 499 | 499 |
%{_bindir}/wine64-preloader
|
| 500 | 500 |
%endif
|
| 501 |
%if %{with_systemd}
|
|
| 502 |
%{_binfmtdir}/%{name}.conf
|
|
| 503 |
%else
|
|
| 504 |
%{_initrddir}/%{name}
|
|
| 505 |
%endif
|
|
| 506 | 501 |
%{_bindir}/winecfg
|
| 507 | 502 |
%{_bindir}/wineconsole*
|
| 508 | 503 |
%{_bindir}/wineserver
|
New comment