How to successfully package and install self developed plugins?

First topic when searching for “error -4”