diff --git a/cta.spec.in b/cta.spec.in
index e07289736a4b136acb7e3a6f84c9055b5263b9a7..9149c20451b0c2fa87601c1e6c9cfe5435596fe0 100644
--- a/cta.spec.in
+++ b/cta.spec.in
@@ -45,9 +45,8 @@ BuildRequires: cmake3 >= 3.17 redhat-rpm-config
 # The CTA client is the only component of CTA that can be compiled on both SLC6
 # and C77, therefore only the packages it depends on are required for SLC6
 
-%if "%{ctaVersion}" == "4"
 %define xrootdVersion 1:4.12.4-1
-%else
+%if "%{ctaVersion}" == "5"
 %define xrootdVersion 1:5.4.2-1
 %endif