reorganize lib spec files into the expected hierarchy