====== Information ====== * Wine ((https://github.com/wine-mirror/wine)) * Wine Staging ((https://github.com/wine-staging/wine-staging)) * https://copr.fedorainfracloud.org/coprs/espionage724/wine-staging-master ====== Dependencies ====== **** sudo dnf install 'rpm-build' ====== Prepare Build Environment ====== ===== Acquire SRPM ===== * Acquire SRPM from https://koji.fedoraproject.org/koji/packageinfo?packageID=4106 * Currently ''wine-3.4-1.fc27'' wget -O ~/'Downloads/wine-fc27.src.rpm' 'https://kojipkgs.fedoraproject.org//packages/wine/3.4/1.fc27/src/wine-3.4-1.fc27.src.rpm' ===== Extract SRPM ===== **** rm -Rf ~/'rpmbuild' && rpm -ivh ~/'Downloads/wine'*'.src.rpm' && rm -fv ~/'Downloads/wine'*'.src.rpm' && sync ====== Spec Config ====== **** gio open ~/'rpmbuild/SPECS/wine.spec' ===== Enable Wine Staging ===== * Change ''0'' to ''1'' specifically on the following line * If Fedora provides a new SRPM in the future that includes Staging, they'll likely do this, in which case this can be removed from here %global compholio 0 %global compholio 1 ===== Version ===== * ''Version'' should **always** be ''master'' Version: master ===== Release ===== * Default release format is ''1%{?dist}'' * Increase ''1'' for future package builds * Since this is ''master'' and no newer ''Version'' is expected, this number should continue increasing forever * Check https://copr.fedorainfracloud.org/coprs/espionage724/wine-staging-master/packages/ Release: 7%{?dist} ===== Sources ===== ==== Wine ==== * For ''Source10'', there is no signing key for ''master'' archives; I'm pretty sure this doesn't matter //that// much so to make life easier, just hard-code this to whatever the SRPM includes already Source0: https://github.com/wine-mirror/wine/archive/master.tar.gz#/wine-%{version}.tar.gz Source10: http://downloads.sourceforge.net/wine/wine-3.3.tar.xz.sign ==== Wine Staging ==== **** Source900: https://github.com/wine-staging/wine-staging/archive/master.tar.gz#/wine-staging-%{version}.tar.gz ===== GCC Flags ===== ==== Ofast ==== * Find the following line under ''%build'' * Change ''O1'' to ''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/'`" ===== Fixes ===== ==== Vulkan ICD loader DLL ==== * Remove this entire section from the ''spec'' file ((the correct dll is already present a bit later in the spec file)) * TODO: I had a way to verify if this was needed at some point by referencing some upstream code; re-figure that out %if 0%{?compholio} %{_libdir}/wine/vulkan-1.dll.so %{_libdir}/wine/vulkan.dll.so %endif ==== Other ==== * TODO: Fix after tested * Add: %{_libdir}/wine/strmdll.dll.so * Remove: %if 0%{?compholio} %{_libdir}/wine/api-ms-win-appmodel-runtime-l1-1-1.dll.so %endif ====== Wine Source Packages ====== ===== Remove Existing Archive ===== **** rm -fv ~/'rpmbuild/SOURCES/wine-'*'.tar.xz' ===== Wine ===== * master * Check [[https://github.com/wine-staging/wine-staging/commits/master|wine-staging commits]] to see when it was last rebased, and then compare to [[https://github.com/wine-mirror/wine/commits/master|wine's commits]] * If the commit and staging rebase don't match, either blindly try Wine's master anyway, or manually download the tree from the last rebase Staging did wget -O ~/'rpmbuild/SOURCES/wine-master.tar.gz' 'https://github.com/wine-mirror/wine/archive/master.tar.gz' ===== Wine Staging ===== * master wget -O ~/'rpmbuild/SOURCES/wine-staging-master.tar.gz' 'https://github.com/wine-staging/wine-staging/archive/master.tar.gz' ====== Build SRPM ====== * https://copr.fedorainfracloud.org/coprs/espionage724/wine-staging-master/add_build_upload 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'