summaryrefslogtreecommitdiff
path: root/www/mozex
diff options
context:
space:
mode:
authorThierry Thomas <thierry@FreeBSD.org>2004-07-03 06:37:01 +0000
committerThierry Thomas <thierry@FreeBSD.org>2004-07-03 06:37:01 +0000
commit9d2489d5bf2c0be66ec8bcbdda5594297bea03b4 (patch)
treeedda7815457338d46b5de76285704ec794e9fdcb /www/mozex
parentUpgrade to latest (diff)
Adding www/mozex & www/mozex-firefox, external programs integration
into Mozilla / Firefox. The files Makefile.xpi and pkg-install.xpi have been designed to install any .xpi extension (hopefully). PR: ports/65589
Diffstat (limited to 'www/mozex')
-rw-r--r--www/mozex/Makefile24
-rw-r--r--www/mozex/Makefile.xpi74
-rw-r--r--www/mozex/distinfo2
-rw-r--r--www/mozex/files/installed-chrome.txt1
-rw-r--r--www/mozex/pkg-descr10
-rw-r--r--www/mozex/pkg-install.xpi59
-rw-r--r--www/mozex/pkg-message8
-rw-r--r--www/mozex/pkg-plist2
8 files changed, 180 insertions, 0 deletions
diff --git a/www/mozex/Makefile b/www/mozex/Makefile
new file mode 100644
index 000000000000..8147e7a6b4e0
--- /dev/null
+++ b/www/mozex/Makefile
@@ -0,0 +1,24 @@
+# Ports collection makefile for: mozex
+# Date created: Sun Oct 26, 2003
+# Whom: Thierry Thomas (<thierry@pompo.net>)
+#
+# $FreeBSD$
+#
+
+PORTNAME?= mozex
+PORTVERSION= 1.07
+CATEGORIES= www mail news ftp
+MASTER_SITES= http://mozex.mozdev.org/
+
+MAINTAINER?= ports@FreeBSD.org
+COMMENT?= Mozex allows Mozilla's users to use external programs for mail, news, etc.
+
+USE_X_PREFIX= yes # Cannot be included after <bsd.port.pre.mk>.
+
+.include <bsd.port.pre.mk>
+.include "${PORTSDIR}/www/mozex/Makefile.xpi"
+
+do-install:
+ @${INSTALL_DATA} ${WRKDIR}/mozex.jar ${MOZDIR}/chrome
+
+.include <bsd.port.post.mk>
diff --git a/www/mozex/Makefile.xpi b/www/mozex/Makefile.xpi
new file mode 100644
index 000000000000..6bae7a1005e1
--- /dev/null
+++ b/www/mozex/Makefile.xpi
@@ -0,0 +1,74 @@
+# Date created: Sun Oct 26, 2003
+# Whom: Thierry Thomas (<thierry@pompo.net>)
+#
+# $FreeBSD$
+#
+
+EXTRACT_SUFX= .xpi
+
+BUILD_DEPENDS+= ${MOZDIR}/regchrome:${PORTSDIR}/www/${MOZPORT}
+RUN_DEPENDS+= ${MOZDIR}:${PORTSDIR}/www/${MOZPORT}
+
+NO_BUILD= yes
+USE_ZIP= yes
+
+PKGINSTALL= ${PORTSDIR}/www/mozex/pkg-install.xpi
+PKGDEINSTALL= ${PKGINSTALL}
+
+.if !defined(WITH_FIREFOX)
+# "Regular" mozillas
+. if exists(${X11BASE}/lib)
+MOZDIR!= ${FIND} ${X11BASE}/lib -name mozilla-bin -exec dirname {} \; | ${HEAD} -n 1
+. else
+MOZDIR=
+. endif
+. if empty(MOZDIR)
+MOZPORT= mozilla
+MOZDIR= ${X11BASE}/lib/${MOZPORT}
+. else
+MOZPORT!= ${BASENAME} ${MOZDIR}
+. endif
+MOZLDIR= lib/${MOZPORT}
+.else
+# Firefox
+PKGNAMESUFFIX= -firefox
+. if exists(${X11BASE}/lib)
+MOZDIR!= ${FIND} ${X11BASE}/lib -name firefox-bin -exec dirname {} \; | ${HEAD} -n 1
+. else
+MOZDIR=
+. endif
+. if empty(MOZDIR)
+MOZVER= firefox-0.9 # Warning! chase this when upgrading firefox.
+. else
+MOZVER!= ${BASENAME} ${MOZDIR}
+. endif
+MOZPORT= firefox
+MOZLDIR= lib/firefox/lib/${MOZVER}
+.endif
+.if empty(MOZDIR)
+MOZDIR= ${X11BASE}/${MOZLDIR}
+.endif
+
+PLIST_SUB= MOZDIR=${MOZLDIR}
+
+pre-install:
+.if ${PREFIX} != ${X11BASE}
+ @${ECHO_MSG} ""
+ @${ECHO_MSG} "${PREFIX} invalid - must be installed under ${X11BASE}."
+ @${ECHO_MSG} ""
+ @${FALSE}
+.else
+ @${CP} ${FILESDIR}/installed-chrome.txt ${MOZDIR}/${PORTNAME}-installed-chrome.txt
+.endif
+
+post-install:
+ @${ECHO_CMD} ${MOZLDIR}/${PORTNAME}-installed-chrome.txt >> ${TMPPLIST}
+ @${CAT} ${MOZDIR}/${PORTNAME}-installed-chrome.txt \
+ >> ${MOZDIR}/chrome/installed-chrome.txt
+ @${ECHO_CMD} "@exec ${CAT} ${MOZDIR}/${PORTNAME}-installed-chrome.txt \
+ >> ${MOZDIR}/chrome/installed-chrome.txt" >> ${TMPPLIST}
+ @${SETENV} PKG_PREFIX=${PREFIX} \
+ ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
+.if exists(${PKGMESSAGE})
+ @${CAT} ${PKGMESSAGE}
+.endif
diff --git a/www/mozex/distinfo b/www/mozex/distinfo
new file mode 100644
index 000000000000..ec3715484dbd
--- /dev/null
+++ b/www/mozex/distinfo
@@ -0,0 +1,2 @@
+MD5 (mozex-1.07.xpi) = 9383380b78ed69409c0880a99b07e297
+SIZE (mozex-1.07.xpi) = 17072
diff --git a/www/mozex/files/installed-chrome.txt b/www/mozex/files/installed-chrome.txt
new file mode 100644
index 000000000000..4626d5403f1e
--- /dev/null
+++ b/www/mozex/files/installed-chrome.txt
@@ -0,0 +1 @@
+content,install,url,jar:resource:/chrome/mozex.jar!/content/mozex/
diff --git a/www/mozex/pkg-descr b/www/mozex/pkg-descr
new file mode 100644
index 000000000000..fe15d0df1edf
--- /dev/null
+++ b/www/mozex/pkg-descr
@@ -0,0 +1,10 @@
+Mozex is an extension to Mozilla or Firefox which allows the user to use
+external programs for these actions:
+
+ * view page source
+ * edit content of textareas (possibly utilizing a spell-checker in the
+ text editor)
+ * handle mailto, news, telnet and FTP links
+ * download files
+
+WWW: http://mozex.mozdev.org/index.html
diff --git a/www/mozex/pkg-install.xpi b/www/mozex/pkg-install.xpi
new file mode 100644
index 000000000000..829c6f129ef4
--- /dev/null
+++ b/www/mozex/pkg-install.xpi
@@ -0,0 +1,59 @@
+#!/bin/sh
+#
+# $FreeBSD$
+#
+# Date created: Mon Oct 27, 2003
+# Whom: Thierry Thomas (<thierry@pompo.net>)
+# Register the extension $1 in the chrome registry.
+
+umask 022
+PATH=/bin:/usr/bin
+
+[ "x$1" = "x" ] && exit 1
+[ "x$2" = "xPRE-INSTALL" ] && exit 0
+[ "x$2" = "xDEINSTALL" ] && exit 0
+
+PREFIX=${PKG_PREFIX:-/usr/X11R6}
+
+# If this is an extension for firefox, PKGNAMESUFFIX has been set
+PKG_NAME=${1%%-[0-9._]*}
+PKG_ROOT=$(echo $PKG_NAME | sed 's/-firefox$//')
+if [ $PKG_NAME = $PKG_ROOT ]; then
+MOZBIN=mozilla-bin
+else
+MOZBIN=firefox-bin
+fi
+
+MOZDIR=`find $PREFIX/lib -name $MOZBIN -exec dirname {} \; | head -n 1`
+REGXPCOM=$MOZDIR/regxpcom
+REGCHROME=$MOZDIR/regchrome
+
+if [ "x$2" = "xPOST-DEINSTALL" ]; then
+ case $PKG_ROOT in
+ fr-mozilla-flp|fr-firefox-flp)
+ MODEXT="FR.jar fr-unix.jar"
+ ;;
+
+ *)
+ MODEXT=$PKG_ROOT
+ ;;
+ esac
+ # Removing definition of extension $MODEXT
+ for mod in $MODEXT; do
+ sed -i .bak -e "/$mod/d" $MOZDIR/chrome/installed-chrome.txt
+ done
+fi
+
+echo "===> Re-building Chrome's registry..."
+rm -rf $MOZDIR/chrome/overlayinfo
+rm -f $MOZDIR/chrome/*.rdf
+mkdir -p $MOZDIR/chrome/overlayinfo
+rm -f $MOZDIR/component.reg
+
+LD_LIBRARY_PATH=$MOZDIR MOZILLA_FIVE_HOME=$MOZDIR $MOZDIR/regxpcom || true
+LD_LIBRARY_PATH=$MOZDIR MOZILLA_FIVE_HOME=$MOZDIR $MOZDIR/regchrome || true
+touch $MOZDIR/chrome/user-skins.rdf $MOZDIR/chrome/user-locales.rdf
+
+[ "x$2" = "xPOST-INSTALL" ] || rm $MOZDIR/chrome/installed-chrome.txt.bak
+
+exit 0
diff --git a/www/mozex/pkg-message b/www/mozex/pkg-message
new file mode 100644
index 000000000000..54740e0ef8ef
--- /dev/null
+++ b/www/mozex/pkg-message
@@ -0,0 +1,8 @@
+**************************************************************************
+Mozex has been installed. If Mozilla is running, restart it.
+A new "mozex" entry is present in page context menu (right click somewhere
+on the page), and you have to edit preferences (for every profile).
+
+To set up your external programs, please follow the instructions on
+<http://mozex.mozdev.org/arguments.html>.
+**************************************************************************
diff --git a/www/mozex/pkg-plist b/www/mozex/pkg-plist
new file mode 100644
index 000000000000..c604d6193377
--- /dev/null
+++ b/www/mozex/pkg-plist
@@ -0,0 +1,2 @@
+%%MOZDIR%%/chrome/mozex.jar
+%%MOZDIR%%/chrome/overlayinfo/browser/content/overlays.rdf