Just a little tip I learned recently that paid off after reading other distributions build scripts to start creating my own.
When and if you need to create a symlink for a package, such as using pkgtools which will be used for example here:
Create the symlink as such:
If the same directory:
Code:
( cd $tmp/path/to
ln -s /lib/library.so library.so.1
)
If between different directories:
Code:
ln -s /lib/library.so $tmp/usr/lib/library.so
Some packagers like pkgtools, for example, take all symlinks and rework them in post install if they exist. Even if the /path/to points to a real location on the drive, don't worry, the packager will pick this up and restore the symlink as intended, and if it doesn't, you still have an active symlink waiting for the actual package, when installed.
And make sure the directory is created within the package as well, or it may have issues.
Happy building.