[en] High-resolution X-ray spectra of O-type stars revealed less wind absorption than expected from smooth winds with conventional mass-loss rates. Various solutions have been proposed, including porous winds, optically thick clumps, or an overall reduction of the mass-loss rates. The latter has a strong impact on the evolution of the star. Our final goal is to analyze high-resolution X-ray spectra of O-type stars with a multi-temperature plasma model in order to determine crucial stellar and wind parameters such as the mass-loss rate, the CNO abundances, and the X-ray temperature plasma distribution in the wind. In this context we are developing a modeling tool to calculate synthetic X-ray spectra. We present here the main ingredients and physics necessary for such a work. Our code uses the most recent version of the AtomDB emissivities to compute the intrinsic emissivity of the hot plasma as well as the CMFGEN model atmosphere code to evaluate the opacity of the cool wind. Following the comparison between two formalisms of stellar wind fragmentation, we introduce, for the first time in X-rays, the effects of a tenuous inter-clump medium. We then explore the quantitative impact of different model parameters on the X-ray spectra such as the position in the wind of the X-ray emitting plasma. For the first time, we also show that the two formalisms of stellar wind fragmentation yield different results, although the differences for individual lines are small and can probably not be tested with the current generation of X-ray telescopes. As an illustration of our method, we compare various synthetic line profiles to the observed O VIII λ18.97 line in the spectrum of ζ Puppis. We illustrate how different combinations of parameters can actually lead to the same morphology of a single line, underlining the need to analyze the whole spectrum in a consistent way when attempting to constrain the parameters of the wind.