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