A thermodynamics for a system under shear