1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-01 05:45:45 +00:00

. Install system preferences during post-install to avoid annoying error

messages.
This commit is contained in:
Greg Lewis 2003-10-11 05:39:21 +00:00
parent f41b10ff4a
commit 42189f5a5d
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=90832
3 changed files with 28 additions and 1 deletions

View File

@ -7,7 +7,7 @@
PORTNAME= jdk
PORTVERSION= ${INSTALL_JDK_VERSION}
PORTREVISION= 2
PORTREVISION= 3
CATEGORIES= java devel
MASTER_SITES= #
PKGNAMEPREFIX= linux-sun-
@ -71,6 +71,11 @@ do-install:
${RM} -f ${APP_HOME}/`dirname $$i`/`basename $$i .jar`.pack; \
fi \
done
post-install:
${LOCALBASE}/bin/registervm "${APP_HOME}/bin/java # Linux-Sun-JDK${PORTVERSION}"
${SED} -e "s:%%JRE_HOME%%:${APP_HOME}/jre:g" \
< ${FILESDIR}/pkg-install.in > ${PKGINSTALL}
${SETENV} PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
.include <bsd.port.post.mk>

View File

@ -0,0 +1,19 @@
#!/bin/sh
# System preference location
PREFS_LOCATION=%%JRE_HOME%%
# Set up system preferences during post install
if [ "$2" = "POST-INSTALL" ]; then
if [ ! -d "${PREFS_LOCATION}/.systemPrefs" ] ; then
mkdir -m 755 "${PREFS_LOCATION}/.systemPrefs"
fi
if [ ! -f "${PREFS_LOCATION}/.systemPrefs/.system.lock" ] ; then
touch "${PREFS_LOCATION}/.systemPrefs/.system.lock"
chmod 644 "${PREFS_LOCATION}/.systemPrefs/.system.lock"
fi
if [ ! -f "${PREFS_LOCATION}/.systemPrefs/.systemRootModFile" ] ; then
touch "${PREFS_LOCATION}/.systemPrefs/.systemRootModFile"
chmod 644 "${PREFS_LOCATION}/.systemPrefs/.systemRootModFile"
fi
fi

View File

@ -883,6 +883,8 @@
%%T%%/include/jvmpi.h
%%T%%/include/linux/jawt_md.h
%%T%%/include/linux/jni_md.h
%%T%%/jre/.systemPrefs/.system.lock
%%T%%/jre/.systemPrefs/.systemRootModFile
%%T%%/jre/CHANGES
%%T%%/jre/COPYRIGHT
%%T%%/jre/ControlPanel.html
@ -1589,6 +1591,7 @@
@dirrm %%T%%/jre/javaws/resources
@dirrm %%T%%/jre/javaws
@dirrm %%T%%/jre/bin
@dirrm %%T%%/jre/.systemPrefs
@dirrm %%T%%/jre
@dirrm %%T%%/include/linux
@dirrm %%T%%/include