summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Schlemmer <azarah@gentoo.org>2002-11-20 15:09:29 +0000
committerMartin Schlemmer <azarah@gentoo.org>2002-11-20 15:09:29 +0000
commit77f882d9e6fb47dc36f7a367fd3154c9b42861cf (patch)
tree10d021d1542e4cec5d608702f74207f6fb4f8622 /eclass/nsplugins.eclass
parentCloses #10736. (diff)
downloadhistorical-77f882d9e6fb47dc36f7a367fd3154c9b42861cf.tar.gz
historical-77f882d9e6fb47dc36f7a367fd3154c9b42861cf.tar.bz2
historical-77f882d9e6fb47dc36f7a367fd3154c9b42861cf.zip
plugin eclass
Diffstat (limited to 'eclass/nsplugins.eclass')
-rw-r--r--eclass/nsplugins.eclass39
1 files changed, 39 insertions, 0 deletions
diff --git a/eclass/nsplugins.eclass b/eclass/nsplugins.eclass
new file mode 100644
index 000000000000..8bd233fe4a5d
--- /dev/null
+++ b/eclass/nsplugins.eclass
@@ -0,0 +1,39 @@
+# Copyright 1999-2002 Gentoo Technologies, Inc.
+# Distributed under the terms of the GNU General Public License v2
+# Author: Martin Schlemmer <azarah@gentoo.org>
+# $Header: /var/cvsroot/gentoo-x86/eclass/nsplugins.eclass,v 1.1 2002/11/20 15:09:29 azarah Exp $
+# Just some re-usable functions for the netscape/moz plugins sharing
+
+ECLASS=nsplugins
+INHERITED="$INHERITED $ECLASS"
+
+DESCRIPTION="Based on the ${ECLASS} eclass"
+
+PLUGINS_DIR="nsbrowser/plugins"
+
+# This function move the plugin dir in src_install() to
+# ${D}/usr/lib/${PLUGIN_DIR}. First argument should be
+# the full path (without $D) to old plugin dir.
+src_mv_plugins() {
+
+ # Move plugins dir
+ dodir /usr/lib/${PLUGIN_DIR}
+ cp -a ${D}/$1/* ${D}/usr/lib/${PLUGIN_DIR}
+ rm -rf ${D}/$1
+ dosym ../${PLUGIN_DIR} $1
+}
+
+# This function move plugins in pkg_preinst() in old dir to
+# ${ROOT}//usr/lib/${PLUGIN_DIR}. First argument should be
+# the full path (without $D) to old plugin dir.
+pkg_mv_plugins() {
+
+ # Move old plugins dir
+ if [ -d ${ROOT}/usr/lib/mozilla/plugins ]
+ then
+ mkdir -p ${ROOT}/usr/lib/${PLUGIN_DIR}
+ cp -a ${ROOT}/$1/* ${ROOT}/usr/lib/${PLUGIN_DIR}
+ rm -rf ${ROOT}/$1
+ fi
+}
+