Installing a package with source code

I downloaded the source codes for BLAS and all other third parties and put it in the respective directories. Then, I changed the shell script to only unpack (removed the lines where it connects to a website and downloads the source code). But when i run Pkg.build("Ipopt") it still throws the error that recipe for target Ipopt failed with a numerous different errors. Please tell me how to successfully build the given package.
Thank you