Dependencies
sudo dnf install 'rpm-build'
Prepare Build Environment
Acquire SRPM
2.0 F25
wget -O ~/'Downloads/wine-2.0-1.fc25.src.rpm' 'https://kojipkgs.fedoraproject.org//packages/wine/2.0/1.fc25/src/wine-2.0-1.fc25.src.rpm'
rm -Rf ~/'rpmbuild' && rpm -ivh ~/'Downloads/wine'*'.src.rpm' && rm -fv ~/'Downloads/wine'*'.src.rpm' && sync
Download Patches
laino/wine-patches
Last commit at time of writing in laino/wine-patches is
3ffdac0
Between that last commit and
cbadc2, the only patch file that changes is
0007
Thus, anything beyond commit
cbadc2 is incompatible with Wine Staging 2.0
wget -O '/tmp/wine-patches-laino-cbadc2.zip' 'https://github.com/laino/wine-patches/archive/cbadc28b353d235a29945e2502b0622b8116e2c5.zip' && unzip '/tmp/wine-patches-laino-cbadc2' -d '/tmp' && mv '/tmp/wine-patches-cbadc28b353d235a29945e2502b0622b8116e2c5/'*'.patch' ~/'rpmbuild/SOURCES' && cd ~/'rpmbuild/SOURCES' && ls '00'*'.patch' && cd ~ && rm -Rfv '/tmp/wine-patches-laino-cbadc2.zip' '/tmp/wine-patches-cbadc28b353d235a29945e2502b0622b8116e2c5' && sync
Spec Config
gio open ~/'rpmbuild/SPECS/wine.spec'
wine-mono
F27 has wine-mono 4.7.1
Change 4.6.4 to 4.7.1
%global winemono 4.7.1
Release
Default release format is 1%{?dist}
Increase 1 for future package builds
Add .laino to the end to make 1%{?dist}.laino
If Version changes, start back at release 1
-
Release: 1%{?dist}.laino
Add Patches
Patch600: 0001-ntdll-improve-heap-allocation-performance.patch
Patch601: 0002-ntdll-heap.c-align-everything-to-64-byte-to-reduce-f.patch
Patch602: 0003-wine-list.h-linked-list-cache-line-prefetching.patch
Patch603: 0004-ntdll-heap.c-freelist_balance-prefetch-next-entry-ca.patch
Patch604: 0005-oleaut32-typelib.c-fix-cursor2-having-the-wrong-type.patch
Patch605: 0006-Ensure-16-byte-alignment-of-data.patch
Patch606: 0007-wined3d-use-SwitchToThread-and-calls-to-select-in-bu.patch
Apply Patches
# undo ntdll-Heap_FreeLists
patch -p1 -R < patches/ntdll-Heap_FreeLists/0001-ntdll-Improve-heap-allocation-performance-by-using-m.patch
# apply laino wine-patches
%patch600 -p1
%patch601 -p1
%patch602 -p1
%patch603 -p1
%patch604 -p1
%patch605 -p1
%patch606 -p1
GCC Flags
Ofast
export TEMP_CFLAGS="`echo $RPM_OPT_FLAGS | sed -e 's/-O2/-O1/'`"
export TEMP_CFLAGS="`echo $RPM_OPT_FLAGS | sed -e 's/-O2/-Ofast/'`"
Build SRPM
rpmbuild -bs ~/'rpmbuild/SPECS/wine.spec' && sync
~/rpmbuild/SRPMS
Compile Locally
sudo dnf builddep ~/'Downloads/wine'*'.src.rpm' && sync
rpmbuild -ba ~/'rpmbuild/SPECS/wine.spec' && sync
Cleanup
sudo dnf remove 'rpm-build'
rm -Rf ~/'rpmbuild' ~/'Downloads/wine'*'.src.rpm'