The compactification of five-dimensional N = 2 SUSY Yang-Mills (YM) theory onto a circle provides a four-dimensional YM model with N = 4 SUSY. This supersymmetry can be broken down to N = 2 if non-trivial boundary conditions in the compact dimension, ø(x5 + R) = e2π¡∈ ø(x5), are imposed on half of the fields. This two-parameter (R, ∈) family of compactifications includes as particular limits most of the previously studied four-dimensional N = 2 SUSY YM models with supermultiplets in the adjoint representation of the gauge group. The finitedimensional integrable system associated to these theories via the Seiberg-Witten construction is the generic elliptic Ruijsenaars-Schneider model. In particular the perturbative (weak coupling) limit is described by the trigonometric Ruijsenaars-Schneider model.