We present a strict Lyapunov function for hyperbolic systems of conservation laws that can be diagonalised with Riemann invariants. The time derivative of this Lyapunov function can be made strictly definite negative by an appropriate choice of the boundary conditions.  It is shown that the derived boundary control allows to guarantee the local convergence of the state towards a desired set point. Furthermore, the control can be implemented as a feedback of the state only measured at the boundaries. The control design method is illustrated with an hydraulic application, namely the level and flow regulation in an horizontal open channel. Full paper.