1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-27 00:57:50 +00:00

. Use a more up to date browser plugin directory and respect ${X11BASE}

when doing do.
This commit is contained in:
Greg Lewis 2004-07-09 18:03:44 +00:00
parent 1d6c8de438
commit 905883fd2f
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=113301
6 changed files with 53 additions and 35 deletions

View File

@ -50,6 +50,9 @@ NO_BUILD= yes
INSTALL_DIR= ${PREFIX}/${PKGNAMEPREFIX}jdk${JDK_VERSION}
PKGINSTALL= ${WRKDIR}/pkg-install
PKGDEINSTALL= ${WRKDIR}/pkg-deinstall
.if defined(WITHOUT_PLUGIN)
PLIST_SUB+= PLUGIN:="@comment "
PKGNAMESUFFIX= -noplugin
@ -99,10 +102,16 @@ do-install:
post-install:
# Register the VM
${LOCALBASE}/bin/registervm "${INSTALL_DIR}/bin/java # DiabloCaffe${JDK_VERSION}"
${LOCALBASE}/bin/registervm \
"${INSTALL_DIR}/bin/java # DiabloCaffe${JDK_VERSION}"
.if !defined(WITHOUT_PLUGIN)
# Create pkg-(de)install
${SED} -e "s:%%X11BASE%%:${X11BASE}:g" < ${FILESDIR}/pkg-install.in \
> ${PKGINSTALL}
${SED} -e "s:%%X11BASE%%:${X11BASE}:g" < ${FILESDIR}/pkg-deinstall.in \
> ${PKGDEINSTALL}
# Install the plugin
${SETENV} PKG_PREFIX=${PREFIX} ${SH} ${PKGDIR}/pkg-install ${PKGNAME} POST-INSTALL
${SETENV} PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
.endif
.include <bsd.port.post.mk>

View File

@ -1,5 +1,5 @@
#!/bin/sh
# $FreeBSD: /tmp/pcvs/ports/java/diablo-jdk13/Attic/pkg-deinstall,v 1.1 2003-08-25 16:54:36 glewis Exp $
# $FreeBSD$
# Set up a standard path
PATH=/usr/bin:/bin
@ -12,7 +12,7 @@ fi
# Remove the plugin
# Plugin location variables
MOZILLAPLUGINDIR=/usr/X11R6/lib/mozilla/plugins
BROWSERPLUGINDIR=%%X11BASE%%/lib/browser_plugins
if [ `echo "$1" | grep jdk` ]; then
DIABLOPLUGINDIR=${PKG_PREFIX}/diablo-jdk1.3.1/jre/plugin/i386/ns600
else
@ -26,10 +26,10 @@ if [ ! -e "${DIABLOPLUGINDIR}/${PLUGIN}" ]; then
fi
# See if the browser plugin is a link to the package plugin and remove it if so.
if [ -e "${MOZILLAPLUGINDIR}/${PLUGIN}" -a \
-L "${MOZILLAPLUGINDIR}/${PLUGIN}" -a \
x`ls -l "${MOZILLAPLUGINDIR}/${PLUGIN}" 2>/dev/null | awk '/->/{print $NF;exit 0}END{exit 1}'` = x"${DIABLOPLUGINDIR}/${PLUGIN}" ]; then
rm -f "${MOZILLAPLUGINDIR}/${PLUGIN}"
if [ -e "${BROWSERPLUGINDIR}/${PLUGIN}" -a \
-L "${BROWSERPLUGINDIR}/${PLUGIN}" -a \
x`ls -l "${BROWSERPLUGINDIR}/${PLUGIN}" 2>/dev/null | awk '/->/{print $NF;exit 0}END{exit 1}'` = x"${DIABLOPLUGINDIR}/${PLUGIN}" ]; then
rm -f "${BROWSERPLUGINDIR}/${PLUGIN}"
fi
exit 0

View File

@ -1,5 +1,5 @@
#!/bin/sh
# $FreeBSD: /tmp/pcvs/ports/java/diablo-jdk13/Attic/pkg-install,v 1.2 2004-03-17 16:44:11 glewis Exp $
# $FreeBSD$
# Set up a standard path
PATH=/usr/bin:/bin
@ -12,7 +12,7 @@ fi
# Attempt to install a link for the browser plugin during post-install
if [ "$2" = "POST-INSTALL" ]; then
# Plugin location variables
MOZILLAPLUGINDIR=/usr/X11R6/lib/mozilla/plugins
BROWSERPLUGINDIR=%%X11BASE%%/lib/browser_plugins
if [ `echo "$1" | grep jdk` ]; then
DIABLOPLUGINDIR=${PKG_PREFIX}/diablo-jdk1.3.1/jre/plugin/i386/ns600
else
@ -26,25 +26,25 @@ if [ "$2" = "POST-INSTALL" ]; then
fi
# Check if the plugin directory exists.
if [ ! -d "${MOZILLAPLUGINDIR}" ]; then
if [ ! -d "${BROWSERPLUGINDIR}" ]; then
exit 0
fi
# Check if the browser plugin currently exists
if [ ! -e "${MOZILLAPLUGINDIR}/${PLUGIN}" ]; then
if [ ! -e "${BROWSERPLUGINDIR}/${PLUGIN}" ]; then
# Create symbolic link
ln -sf "${DIABLOPLUGINDIR}/${PLUGIN}" \
"${MOZILLAPLUGINDIR}/${PLUGIN}"
"${BROWSERPLUGINDIR}/${PLUGIN}"
exit 0
fi
# If the browser plugin exists and is a symlink, but the link
# doesn't exist, then overwrite with the diablo plugin.
if [ -L "${MOZILLAPLUGINDIR}/${PLUGIN}" ]; then
if [ -L "${BROWSERPLUGINDIR}/${PLUGIN}" ]; then
# Check if the linked to file exists.
if [ ! -e `ls -l "${MOZILLAPLUGINDIR}/${PLUGIN}" 2>/dev/null | awk '/->/{print $NF;exit 0}END{exit 1}'` ]; then
if [ ! -e `ls -l "${BROWSERPLUGINDIR}/${PLUGIN}" 2>/dev/null | awk '/->/{print $NF;exit 0}END{exit 1}'` ]; then
ln -sf "${DIABLOPLUGINDIR}/${PLUGIN}" \
"${MOZILLAPLUGINDIR}/${PLUGIN}"
"${BROWSERPLUGINDIR}/${PLUGIN}"
exit 0
fi
fi
@ -58,7 +58,7 @@ if [ "$2" = "POST-INSTALL" ]; then
case $ANSWER in
[yY]|[yY][eE][sS])
ln -sf "${DIABLOPLUGINDIR}/${PLUGIN}" \
"${MOZILLAPLUGINDIR}/${PLUGIN}"
"${BROWSERPLUGINDIR}/${PLUGIN}"
;;
*)
;;

View File

@ -50,6 +50,9 @@ NO_BUILD= yes
INSTALL_DIR= ${PREFIX}/${PKGNAMEPREFIX}jre${JRE_VERSION}
PKGINSTALL= ${WRKDIR}/pkg-install
PKGDEINSTALL= ${WRKDIR}/pkg-deinstall
.if defined(WITHOUT_PLUGIN)
PLIST_SUB+= PLUGIN:="@comment "
PKGNAMESUFFIX= -noplugin
@ -99,10 +102,16 @@ do-install:
post-install:
# Register the VM
${LOCALBASE}/bin/registervm "${INSTALL_DIR}/bin/java # DiabloLatte${JRE_VERSION}"
${LOCALBASE}/bin/registervm \
"${INSTALL_DIR}/bin/java # DiabloLatte${JRE_VERSION}"
.if !defined(WITHOUT_PLUGIN)
# Create pkg-(de)install
${SED} -e "s:%%X11BASE%%:${X11BASE}:g" < ${FILESDIR}/pkg-install.in \
> ${PKGINSTALL}
${SED} -e "s:%%X11BASE%%:${X11BASE}:g" < ${FILESDIR}/pkg-deinstall.in \
> ${PKGDEINSTALL}
# Install the plugin
${SETENV} PKG_PREFIX=${PREFIX} ${SH} ${PKGDIR}/pkg-install ${PKGNAME} POST-INSTALL
${SETENV} PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
.endif
.include <bsd.port.post.mk>

View File

@ -1,5 +1,5 @@
#!/bin/sh
# $FreeBSD: /tmp/pcvs/ports/java/diablo-jre13/Attic/pkg-deinstall,v 1.1 2003-08-25 16:53:03 glewis Exp $
# $FreeBSD$
# Set up a standard path
PATH=/usr/bin:/bin
@ -12,7 +12,7 @@ fi
# Remove the plugin
# Plugin location variables
MOZILLAPLUGINDIR=/usr/X11R6/lib/mozilla/plugins
BROWSERPLUGINDIR=%%X11BASE%%/lib/browser_plugins
if [ `echo "$1" | grep jdk` ]; then
DIABLOPLUGINDIR=${PKG_PREFIX}/diablo-jdk1.3.1/jre/plugin/i386/ns600
else
@ -26,10 +26,10 @@ if [ ! -e "${DIABLOPLUGINDIR}/${PLUGIN}" ]; then
fi
# See if the browser plugin is a link to the package plugin and remove it if so.
if [ -e "${MOZILLAPLUGINDIR}/${PLUGIN}" -a \
-L "${MOZILLAPLUGINDIR}/${PLUGIN}" -a \
x`ls -l "${MOZILLAPLUGINDIR}/${PLUGIN}" 2>/dev/null | awk '/->/{print $NF;exit 0}END{exit 1}'` = x"${DIABLOPLUGINDIR}/${PLUGIN}" ]; then
rm -f "${MOZILLAPLUGINDIR}/${PLUGIN}"
if [ -e "${BROWSERPLUGINDIR}/${PLUGIN}" -a \
-L "${BROWSERPLUGINDIR}/${PLUGIN}" -a \
x`ls -l "${BROWSERPLUGINDIR}/${PLUGIN}" 2>/dev/null | awk '/->/{print $NF;exit 0}END{exit 1}'` = x"${DIABLOPLUGINDIR}/${PLUGIN}" ]; then
rm -f "${BROWSERPLUGINDIR}/${PLUGIN}"
fi
exit 0

View File

@ -1,5 +1,5 @@
#!/bin/sh
# $FreeBSD: /tmp/pcvs/ports/java/diablo-jre13/Attic/pkg-install,v 1.2 2004-03-17 16:44:11 glewis Exp $
# $FreeBSD$
# Set up a standard path
PATH=/usr/bin:/bin
@ -12,7 +12,7 @@ fi
# Attempt to install a link for the browser plugin during post-install
if [ "$2" = "POST-INSTALL" ]; then
# Plugin location variables
MOZILLAPLUGINDIR=/usr/X11R6/lib/mozilla/plugins
BROWSERPLUGINDIR=%%X11BASE%%/lib/browser_plugins
if [ `echo "$1" | grep jdk` ]; then
DIABLOPLUGINDIR=${PKG_PREFIX}/diablo-jdk1.3.1/jre/plugin/i386/ns600
else
@ -26,25 +26,25 @@ if [ "$2" = "POST-INSTALL" ]; then
fi
# Check if the plugin directory exists.
if [ ! -d "${MOZILLAPLUGINDIR}" ]; then
if [ ! -d "${BROWSERPLUGINDIR}" ]; then
exit 0
fi
# Check if the browser plugin currently exists
if [ ! -e "${MOZILLAPLUGINDIR}/${PLUGIN}" ]; then
if [ ! -e "${BROWSERPLUGINDIR}/${PLUGIN}" ]; then
# Create symbolic link
ln -sf "${DIABLOPLUGINDIR}/${PLUGIN}" \
"${MOZILLAPLUGINDIR}/${PLUGIN}"
"${BROWSERPLUGINDIR}/${PLUGIN}"
exit 0
fi
# If the browser plugin exists and is a symlink, but the link
# doesn't exist, then overwrite with the diablo plugin.
if [ -L "${MOZILLAPLUGINDIR}/${PLUGIN}" ]; then
if [ -L "${BROWSERPLUGINDIR}/${PLUGIN}" ]; then
# Check if the linked to file exists.
if [ ! -e `ls -l "${MOZILLAPLUGINDIR}/${PLUGIN}" 2>/dev/null | awk '/->/{print $NF;exit 0}END{exit 1}'` ]; then
if [ ! -e `ls -l "${BROWSERPLUGINDIR}/${PLUGIN}" 2>/dev/null | awk '/->/{print $NF;exit 0}END{exit 1}'` ]; then
ln -sf "${DIABLOPLUGINDIR}/${PLUGIN}" \
"${MOZILLAPLUGINDIR}/${PLUGIN}"
"${BROWSERPLUGINDIR}/${PLUGIN}"
exit 0
fi
fi
@ -58,7 +58,7 @@ if [ "$2" = "POST-INSTALL" ]; then
case $ANSWER in
[yY]|[yY][eE][sS])
ln -sf "${DIABLOPLUGINDIR}/${PLUGIN}" \
"${MOZILLAPLUGINDIR}/${PLUGIN}"
"${BROWSERPLUGINDIR}/${PLUGIN}"
;;
*)
;;
@ -74,7 +74,7 @@ fi
more << EOF_LICENSE
FREEBSD FOUNDATION
Diablo Latte Version 1.3.1-0 ("Software")
Diablo Caffe Version 1.3.1-0 ("Software")
END USER LICENSE AGREEMENT