post_install() {
	sed -e '/^include \/usr\/share\/xpdf\/.*\/add-to-xpdfrc/d' -i etc/xpdfrc
	ls usr/share/xpdf/*/add-to-xpdfrc &>/dev/null && \
	for i in usr/share/xpdf/*/add-to-xpdfrc; do
		echo "include /${i}" >> etc/xpdfrc
	done
	true
}

post_upgrade() {
	[[ `vercmp $2 3.0.3` = -1 ]] && sed -e '/^include \/etc\/xpdf\//d' -i etc/xpdfrc
	post_install
}

post_remove() {
	post_install
}
