I am guessing at what you may want to achieve here. If it is what I think and you are in the process of migrating your SAS deployment from 9.4M5 to M7 then yes: export the library metadata in M5 management console to an SPK file and import that in the M7 server.
NOTE: there can, as you mentioned, be related objects (servers, accounts, authentication domains, users, groups, tables, ACT's etc) that you need to take into account as well before everything will work as expected.
If you have tables registered in your metadata it will usually work better to first export/import the library definitions and after that the tables in a separate step.
Hope this helps,
- Jan.