For thermodynamic entropy, the inequality based on 2nd law is
$$dS \geq \frac{\delta Q}{T_{surr}}$$
However, the entropy inequality for hyperbolic PDE system is
$$\partial_t \eta(U(x,t)) + \partial_x q(U(x,t))\leq 0$$ where $(\eta,q)$ is the entropy-entropy flux pair and entropy here is a convex function on the state variable $U$.
I understand the first inequality but not the second. Even if mathematical entropy is more general than thermodynamic entropy, assuming the the convex function $\eta$ is written to recover the thermodynamic entropy from the state variable $U$, how does the second inequality imply the first inequality?