#!/bin/sh
#
# $FreeBSD: ports/devel/pear/pear-deinstall,v 1.1 2005/12/09 18:58:03 ale Exp $
#
# Remove package declaration from PEAR's registry.

if [ x$2 != xDEINSTALL ]; then
    exit
fi
PKG_NAME=${1%%-[0-9._]*}
PACKAGE=$(echo $PKG_NAME | sed 's/pear-//')

PEAR=${PKG_PREFIX}/bin/pear

${PEAR} uninstall -r -n ${PACKAGE} || true
