1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-24 00:45:52 +00:00

- Stagify

PR:		ports/187537
Submitted by:	Johannes Jost Meixner <xmj@chaot.net>
This commit is contained in:
Steve Wills 2014-03-20 03:39:48 +00:00
parent b69727e049
commit d098e70dd7
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=348661
2 changed files with 14 additions and 15 deletions

View File

@ -35,7 +35,6 @@ APP_HOME= ${PREFIX}/${PKGNAMEPREFIX}${PORTNAME}${JRE_INTERNAL_VERSION}
SCRIPT_FILES= bin/jcontrol
BIN_DIRS= bin
NO_STAGE= yes
.include <bsd.port.pre.mk>
.if !exists(${DISTDIR}/${DISTNAME}${EXTRACT_SUFX})
@ -52,16 +51,16 @@ post-patch:
@${FIND} ${WRKSRC} -name '*.orig' -delete
do-install:
@${MKDIR} ${APP_HOME}
@cd ${WRKSRC} && ${COPYTREE_SHARE} . ${APP_HOME}
@${MKDIR} ${STAGEDIR}${APP_HOME}
@cd ${WRKSRC} && ${COPYTREE_SHARE} . ${STAGEDIR}${APP_HOME}
.for dir in ${BIN_DIRS}
@${CHOWN} -R ${BINOWN}:${BINGRP} "${APP_HOME}/${dir}"
@${FIND} ${APP_HOME}/${dir} -type f -exec "${CHMOD}" ${BINMODE} "{}" \;
@${CHOWN} -R ${BINOWN}:${BINGRP} "${STAGEDIR}${APP_HOME}/${dir}"
@${FIND} ${STAGEDIR}${APP_HOME}/${dir} -type f -exec "${CHMOD}" ${BINMODE} "{}" \;
.endfor
post-install:
${LOCALBASE}/bin/registervm "${APP_HOME}/bin/java # Linux-Sun-JRE${PORTVERSION}"
@${SED} -e "s:%%JRE_HOME%%:${APP_HOME}:g" \
@${SED} -e "s:%%JRE_HOME%%:${APP_HOME}:g; \
s:%%STAGEDIR%%:${STAGEDIR}:g" \
< ${FILESDIR}/pkg-install.in > ${PKGINSTALL}
@${SETENV} PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL

View File

@ -5,15 +5,15 @@ 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"
if [ ! -d "%%STAGEDIR%%${PREFS_LOCATION}/.systemPrefs" ] ; then
mkdir -m 755 "%%STAGEDIR%%${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"
if [ ! -f "%%STAGEDIR%%${PREFS_LOCATION}/.systemPrefs/.system.lock" ] ; then
touch "%%STAGEDIR%%${PREFS_LOCATION}/.systemPrefs/.system.lock"
chmod 644 "%%STAGEDIR%%${PREFS_LOCATION}/.systemPrefs/.system.lock"
fi
if [ ! -f "${PREFS_LOCATION}/.systemPrefs/.systemRootModFile" ] ; then
touch "${PREFS_LOCATION}/.systemPrefs/.systemRootModFile"
chmod 644 "${PREFS_LOCATION}/.systemPrefs/.systemRootModFile"
if [ ! -f "%%STAGEDIR%%${PREFS_LOCATION}/.systemPrefs/.systemRootModFile" ] ; then
touch "%%STAGEDIR%%${PREFS_LOCATION}/.systemPrefs/.systemRootModFile"
chmod 644 "%%STAGEDIR%%${PREFS_LOCATION}/.systemPrefs/.systemRootModFile"
fi
fi