Single γ-ray spectra from proton-proton collisions at centre-of-mass energies from 30 to 50 GeV