hooks: initial build method.

related to #557.
hooks: implemented method to run build hooks.

related to #557.