Upgrade packaging process with cmake helper functions.

Tested: local linux

git-svn-id: https://svn.hdfgroup.uiuc.edu/hdf5/trunk@25617 dab4d1a6-ed17-0410-a064-d1ae371a2980
Added tests for HDFFV-8879



git-svn-id: https://svn.hdfgroup.uiuc.edu/hdf5/trunk@25618 dab4d1a6-ed17-0410-a064-d1ae371a2980