Move the libraries into separate packages.
Closes: #2329