--- /usr/portage/eclass/nsplugins.eclass 2004-06-25 03:13:00.000000000 +0200 +++ nsplugins.eclass 2004-08-07 15:10:05.172051808 +0200 @@ -26,6 +26,21 @@ dosym /usr/lib/${PLUGINS_DIR} $1 } +SEARCHPLUGINS_DIR="nsbrowser/searchplugins" + +# This function move the searchplugin 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_searchplugins() { + + # Move plugins dir. We use keepdir so that it might not be unmerged + # by mistake ... + keepdir /usr/lib/${SEARCHPLUGINS_DIR} + cp -a ${D}/$1/* ${D}/usr/lib/${SEARCHPLUGINS_DIR} + rm -rf ${D}/$1 + dosym /usr/lib/${SEARCHPLUGINS_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 $ROOT) to old plugin dir. @@ -40,6 +55,20 @@ fi } +# This function move searchplugins in pkg_preinst() in old dir to +# ${ROOT}//usr/lib/${PLUGIN_DIR}. First argument should be +# the full path (without $ROOT) to old plugin dir. +pkg_mv_searchplugins() { + + # Move old searchplugins dir + if [ -d "${ROOT}/$1" -a ! -L "${ROOT}/$1" ] + then + mkdir -p ${ROOT}/usr/lib/${SEARCHPLUGINS_DIR} + cp -a ${ROOT}/$1/* ${ROOT}/usr/lib/${SEARCHPLUGINS_DIR} + rm -rf ${ROOT}/$1 + fi +} + # This function installs a plugin with dosym to PLUGINS_DIR. # First argument should be the plugin file. inst_plugin() {