Upgrade packaging process with cmake helper functions.

Tested: local linux
Added tests for HDFFV-8879