Add support for 'lib' packaging along with an integration test.