Normal and superconducting state spectral properties of cuprates are theoretically described within the extended t-J model. The method is based on the equations of motion for projected fermionic operators and the mode-coupling approximation for the self-energy matrix. The dynamical spin susceptibility at various doping is considered as an input, extracted from experiments. The analysis shows that the onset of superconductivity is dominated by the spin-fluctuation contribution. The coupling to spin fluctuations directly involves the next-nearest-neighbor hopping t', hence Tc shows a pronounced dependence on t'. The latter can offer an explanation for the variation of Tc among different families of hole-doped cuprates. A formula for maximum Tc is given and it is shown that optimum doping, where maximum Tc is reached, is with increasing -t' progresively increased.