#! /bin/sh
# postinst script for root-cint
#
# see: dh_installdeb(1)

set -e

case "$1" in
    configure)
	# Add @prefix@/lib/root to the directories searched by ldd, if not
	# so already 
	if ! grep -qs ^@prefix@/lib/root\$ /etc/ld.so.conf ; then
                echo @prefix@/lib/root >> /etc/ld.so.conf
	fi

	# Alternatives update 
	 update-alternatives --install @prefix@/bin/cint cint \
	    @prefix@/bin/cint.root 30 \
	    --slave @prefix@/share/man/man1/cint.1.gz \
	    cint.1.gz @prefix@/share/man/man1/cint.root.1.gz 
	 update-alternatives --install @prefix@/bin/makecint makecint \
	    @prefix@/bin/makecint.root 30 \
	    --slave @prefix@/share/man/man1/makecint.1.gz \
	    makecint.1.gz @prefix@/share/man/man1/makecint.root.1.gz 
	;;

    abort-upgrade|abort-remove|abort-deconfigure)
	# Nothing to be done here
	;;

    *)
        echo "postinst called with unknown argument \`$1'" >&2
        exit 0
	;;
esac

# dh_installdeb will replace this with shell code automatically
# generated by other debhelper scripts.

#DEBHELPER#

exit 0


