import portstree and hooks

Makefiles will follow later