Development and construction of a photon spectrometer with variable line-space grating for the extreme-ultraviolet spectral range for experiments at the FAIR storage rings