Although there is little chance that we will ever have a package
conflict on OS X, the convention from our Linux packages is to use the
package name, not the project name, for the name of the documentation
directory.
if [ "$PREFIX" = "@CMAKE_INSTALL_DEFAULT_PREFIX@" -a "$DOCDIR" = "@CMAKE_INSTALL_DEFAULT_PREFIX@/doc" ]; then
mkdir -p $PKGROOT/Library/Documentation
- safedirmove $PKGROOT$DOCDIR $PKGROOT/Library/Documentation/@CMAKE_PROJECT_NAME@ $TMPDIR/__tmpdoc
- ln -fs /Library/Documentation/@CMAKE_PROJECT_NAME@ $PKGROOT$DOCDIR
+ safedirmove $PKGROOT$DOCDIR $PKGROOT/Library/Documentation/$PACKAGE_NAME $TMPDIR/__tmpdoc
+ ln -fs /Library/Documentation/$PACKAGE_NAME $PKGROOT$DOCDIR
fi
if [ $UNIVERSAL = 1 -a "$BUILDDIR32" != "" ]; then
rm $PREFIX/doc 2>&1 || EXITSTATUS=-1
fi
rmdir $PREFIX 2>&1 || EXITSTATUS=-1
-rmdir /Library/Documentation/@CMAKE_PROJECT_NAME@ 2>&1 || EXITSTATUS=-1
+rmdir /Library/Documentation/$PACKAGE 2>&1 || EXITSTATUS=-1
if [ -d $RECEIPT ]; then
echo Removing package receipt ...