Refactor external depacker handling

Signed-off-by: Claudio Matsuoka <cmatsuoka@gmail.com>
Fix lite conditionals and add missing files

Signed-off-by: Claudio Matsuoka <cmatsuoka@gmail.com>