Add profile directory handling to packaging

Status Name Job ID Coverage
  Build
passed build_package #244181
librem5

00:02:04

failed build_package #243954
librem5