umask 022
TMPDIR=`mktemp -d /tmp/$PACKAGE_NAME-build.XXXXXX`
PKGROOT=$TMPDIR/pkg/Package_Root
-mkdir -p $PKGROOT
mkdir -p $PKGROOT/opt/$PACKAGE_NAME/bin
+mkdir -p $PKGROOT/opt/$PACKAGE_NAME/man/man1
install -m 755 unix/vncviewer/vncviewer $PKGROOT/opt/$PACKAGE_NAME/bin/
> $PKGROOT/opt/$PACKAGE_NAME/bin/uninstall)
chmod 755 $PKGROOT/opt/$PACKAGE_NAME/bin/uninstall
+install -m 644 $SRCDIR/unix/vncviewer/vncviewer.man $PKGROOT/opt/$PACKAGE_NAME/man/man1/vncviewer.1
install -m 644 $SRCDIR/LICENCE.txt $PKGROOT/Library/Documentation/$PACKAGE_NAME/
sudo chown -R root:admin $PKGROOT
echo Removing directories ...
rmdir /opt/$PKGNAME/bin 2>&1 || RETCODE=-1
+rmdir /opt/$PKGNAME/man/man1 2>&1 || RETCODE=-1
+rmdir /opt/$PKGNAME/man 2>&1 || RETCODE=-1
rmdir /opt/$PKGNAME 2>&1 || RETCODE=-1
rmdir /Library/Documentation/$PKGNAME 2>&1 || RETCODE=-1