From 0d6cf602b6e2e4d1d1502038a35a088526c8423d Mon Sep 17 00:00:00 2001 From: Anders da Silva Rytter Hansen Date: Thu, 17 Sep 2026 18:06:44 +0200 Subject: [PATCH] Include patch in srpm on fedora too but only apply it on EL9 --- 12to11.spec | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/12to11.spec b/12to11.spec index 2a6bd61..ccc3ee8 100644 --- a/12to11.spec +++ b/12to11.spec @@ -25,10 +25,11 @@ URL: https://github.com/fish4terrisa-MSDSM/12to11 Source0: %{url}/archive/refs/tags/v%{version}/%{name}-%{version}.tar.gz # EL9 ships wayland 1.21, which lacks WL_SUBCOMPOSITOR_ERROR_BAD_PARENT -# (added in wayland 1.22). Only needed on EL9. -%if 0%{?rhel} == 9 +# (added in wayland 1.22). Patch0 must be declared unconditionally: +# COPR's SRPM import parses this spec on Fedora (where %%{?rhel} is +# undefined), so a conditional Patch tag would never be collected. +# The patch is only applied on EL9 (see %%prep). Patch0: 12to11-1.0.0-wayland-1.21-compat.patch -%endif # Build dependencies BuildRequires: make @@ -80,7 +81,10 @@ fish4terrisa-MSDSM; the original SourceForge project has been unmaintained since 2022. %prep -%autosetup -p1 +%autosetup -N +%if 0%{?rhel} == 9 +%patch0 -p1 +%endif %build # Export the RPM build flags: the Makefile uses CFLAGS ?= / LDFLAGS +=