APY-142 : Rewrite packiging code

Repaired the setups init for packaging, added also basic
rest distribution.