From 358a0c0055157511b7a18bc408b1ae788bacc372 Mon Sep 17 00:00:00 2001 From: Martin Schlemmer Date: Sat, 23 Jul 2005 09:17:17 +0000 Subject: Commit proof of concept stuff for update-nsplugins. --- eclass/nsplugins.eclass | 35 +++++++++++++++++++++++++++++++++-- 1 file changed, 33 insertions(+), 2 deletions(-) (limited to 'eclass/nsplugins.eclass') diff --git a/eclass/nsplugins.eclass b/eclass/nsplugins.eclass index 7b1e3d6dd020..d7829d873b38 100644 --- a/eclass/nsplugins.eclass +++ b/eclass/nsplugins.eclass @@ -1,6 +1,6 @@ # Copyright 1999-2004 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/nsplugins.eclass,v 1.19 2005/07/11 15:08:06 swegener Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/nsplugins.eclass,v 1.20 2005/07/23 09:17:17 azarah Exp $ # # Author: Martin Schlemmer # @@ -8,9 +8,40 @@ inherit eutils - DESCRIPTION="Based on the ${ECLASS} eclass" +#DEPEND="www-client/update-nsplugins" + +NSPLUGINS_DIR="/usr/$(get_libdir)/nsplugins" +NSBROWSERS_DIR="${NSPLUGINS_DIR}/nsbrowsers" + +# This function installs a plugin with dosym to NSPLUGINS_DIR. +# First argument should be the plugin file. +install_nsplugin() { + local plugin=$1 + + dodir "${NSPLUGINS_DIR}" + dosym "${plugin}" "${NSPLUGINS_DIR}" +} + +# First argument should be the browser name (usually $PN), second +# is its plugin dir. This basically just makes update-nsplugins aware +# of the browser. +register_nsbrowser() { + local browser=$1 + local plugindir=$2 + + dodir "${NSBROWSERS_DIR}" + echo "${plugindir}" > "${D}${NSBROWSERS_DIR}/${browser}" +} + + +############################################################################### +# +# Depriciated Functions - Please do not use any more ! +# +############################################################################### + PLUGINS_DIR="nsbrowser/plugins" # This function move the plugin dir in src_install() to -- cgit v1.2.3-65-gdbad