summaryrefslogtreecommitdiff
path: root/math/R/files/pkg-index.tmpl
blob: 494ee8888240858bfd11de41d44680dfb13f7be6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# $NetBSD: pkg-index.tmpl,v 1.3 2011/11/20 04:57:03 markd Exp $
#
# Rebuild R package indices upon installation or deinstallation of an
# R extension.
#

rebuild_R_pkg_indices()
{
	${ECHO} "${PKGNAME}: rebuilding R package indices and help files"
	R CMD ${PERL5} ${PKG_PREFIX}/lib/R/share/perl/build-help.pl \
		--htmllists 2>/dev/null
}

case ${STAGE} in
POST-INSTALL)
	rebuild_R_pkg_indices
	;;
DEINSTALL)
	if [ "${PKGBASE}" = "R" ] ; then
		${RM} -f ${PKG_PREFIX}/lib/R/doc/html/packages.html
	fi
	;;
POST-DEINSTALL)
	[ "${PKGBASE}" = "R" ] || rebuild_R_pkg_indices
	;;
esac