| 1 |
azarah |
1.1 |
# Copyright 1999-2002 Gentoo Technologies, Inc.
|
| 2 |
|
|
# Distributed under the terms of the GNU General Public License v2
|
| 3 |
|
|
# Author: Martin Schlemmer <azarah@gentoo.org>
|
| 4 |
azarah |
1.3 |
# $Header: /home/cvsroot/gentoo-x86/eclass/nsplugins.eclass,v 1.2 2002/11/20 17:17:57 azarah Exp $
|
| 5 |
azarah |
1.1 |
# Just some re-usable functions for the netscape/moz plugins sharing
|
| 6 |
|
|
|
| 7 |
|
|
ECLASS=nsplugins
|
| 8 |
|
|
INHERITED="$INHERITED $ECLASS"
|
| 9 |
|
|
|
| 10 |
|
|
DESCRIPTION="Based on the ${ECLASS} eclass"
|
| 11 |
|
|
|
| 12 |
|
|
PLUGINS_DIR="nsbrowser/plugins"
|
| 13 |
|
|
|
| 14 |
|
|
# This function move the plugin dir in src_install() to
|
| 15 |
|
|
# ${D}/usr/lib/${PLUGIN_DIR}. First argument should be
|
| 16 |
|
|
# the full path (without $D) to old plugin dir.
|
| 17 |
|
|
src_mv_plugins() {
|
| 18 |
|
|
|
| 19 |
|
|
# Move plugins dir
|
| 20 |
azarah |
1.2 |
dodir /usr/lib/${PLUGINS_DIR}
|
| 21 |
|
|
cp -a ${D}/$1/* ${D}/usr/lib/${PLUGINS_DIR}
|
| 22 |
azarah |
1.1 |
rm -rf ${D}/$1
|
| 23 |
azarah |
1.2 |
dosym ../${PLUGINS_DIR} $1
|
| 24 |
azarah |
1.1 |
}
|
| 25 |
|
|
|
| 26 |
|
|
# This function move plugins in pkg_preinst() in old dir to
|
| 27 |
|
|
# ${ROOT}//usr/lib/${PLUGIN_DIR}. First argument should be
|
| 28 |
azarah |
1.3 |
# the full path (without $ROOT) to old plugin dir.
|
| 29 |
azarah |
1.1 |
pkg_mv_plugins() {
|
| 30 |
|
|
|
| 31 |
|
|
# Move old plugins dir
|
| 32 |
azarah |
1.2 |
if [ -d ${ROOT}/$1 ]
|
| 33 |
azarah |
1.1 |
then
|
| 34 |
azarah |
1.2 |
mkdir -p ${ROOT}/usr/lib/${PLUGINS_DIR}
|
| 35 |
|
|
cp -a ${ROOT}/$1/* ${ROOT}/usr/lib/${PLUGINS_DIR}
|
| 36 |
azarah |
1.1 |
rm -rf ${ROOT}/$1
|
| 37 |
|
|
fi
|
| 38 |
|
|
}
|
| 39 |
|
|
|