This will also install dependencies specified in metadata.desktop, so you can test it locally on your system. Type kpackagetool5 -h to see more options.
kpackagetool5 -h