I'm creating an installer using PackageMaker v3.0.4.
One of the payloads is a library, which I'm installing to the location /usr/local/lib/
The permissions of the library itself are set up thus:
-rwxr-xr-x 1 root admin 992180 1 Jun 2009 libxxxx.0.dylib
This works correctly, so long as the lib
directory already exists when the installer is run. However, if the lib
directory doesn't exist when the installer runs, then it is created with the following permissions:
drwx------ 3 username wheel 102 30 Jun 10:44 lib
And subsequently, the application cannot open the lib when runs the code:
void *theDylib = dlopen("/usr/local/lib/libxxxx.0.dylib",RTLD_NOW);
How can I get PackageMaker to install the directory with the correct permissions?