support building directly from the package root

Signed-off-by: Jan Dvořák <mordae@anilinux.org>