Background
I am self-studying the book Elements of Gasdynamics by H.W. Liepmann and A. Roshko. In Chapter 1: Concepts from Thermodynamics, the authors discuss the First Law of thermodynamics and a way to describe the work done on a system.
The first law can be written $$ \Delta U=Q+W $$
where $U$ is the internal energy, $Q$ is the heat added to the system, and $W$ is the work done on the system. The work done on the system is determined by considering the classic cylinder-piston arrangement:
The work done can be written
$$ W=\int \vec{F}\cdot d\vec{r} $$
where $\vec{F}$ is the force vector and $\vec{r}$ is the displacement vector, i.e. the work done is the force times the distance in the direction of displacement. For an irreversible process, the force is just enough to move the piston slowly, so $F=pA$, where $A$ is the area of the cylinder. Then
$$ W=\int pA dr = -\int pdV $$
where the negative sign has been introduced since a decrease in volume is considered negative.
Question
The authors write
It is not difficult to [derive these equations] even in the case of pressures acting on a deformable enclosure of any shape.
Can anyone present an argument or direct me to an argument showing that the same work equation can be derived for an arbitrary deformable body?