extract common tasks to pkg.mk to simplify our makefile