How to create a package for a host-only tool


How do you create package or other build instructions for tool that is needed during image creation time only, e.g. preparing factory image so that vendor firmware accepts it? It's not needed otherwise and not going to be installed on device.