In this paper, we present a spectral method for approximating the boundary optimal control problems of a well-known wave equation by the linear optimal control problems. The method is based upon constructing the Mth degree interpolation polynomials, using Chebyshevs nodes, to approximate the wave equation. Necessary conditions for optimal control functions are obtained by using the Pontryagin's maximum principle. Moreover, the control parameterization enhancing technique (CPET) is used to obtain the piecewise constant sub-optimal control functions. Finally, the efficiency of the proposed method is confirmed by a numerical example.