7364507 adapt build and install scriptlets to fix issues in dependencies

Authored and Committed by decathorpe a year ago
    adapt build and install scriptlets to fix issues in dependencies