This paper concerns the optimal control of lumped-distributed systems, an examplar of which is a mechanical system with rotating components connected by flexible rods. The underlying mathematical model is a controlled semilinear evolution equation, in which nonlinear terms involve a projection of the full state onto a finite dimensional subspace. We derive necessary conditions of optimality in the form of a maximum principle, for a problem formulation which involves pathwise and end-point constraints on the lumped components of the state variable. Perturbational methods are employed in the derivation, which allow for non-smooth data. A key step in the analysis is the reduction of the optimization problem with an infinite dimensional state space, to one with finite dimensional aspects. The computational implications of this reduction will be explored in future work. Necessary conditions for problems with state constraints and end-point constraints can only be achieved under rather strict compatibility hypotheses on the way the dynamics interact with the state constraint and end-point constraint sets, due the infinite dimensionality of the state space. This paper identifies a class of infinite dimensional problems, of engineering significance, for which necessary conditions of optimality can be derived, in the absence of any additional compatibility hypotheses.