--- cacti-0.8.7h.ebuild 2011-10-02 13:44:35.000000000 +0200 +++ cacti-0.8.7h.ebuild 2011-10-04 21:58:11.243946928 +0200 @@ -9,10 +9,12 @@ inherit eutils webapp depend.php # Support for _p* in version. MY_P=${P/_p*/} UPSTREAM_PATCHES="" +PLUGIN_VER="PA-v3.0" DESCRIPTION="Cacti is a complete frontend to rrdtool" HOMEPAGE="http://www.cacti.net/" -SRC_URI="http://www.cacti.net/downloads/${MY_P}.tar.gz" +SRC_URI="http://www.cacti.net/downloads/${MY_P}.tar.gz + plugin? ( http://www.cacti.net/downloads/pia/cacti-plugin-${PV}-${PLUGIN_VER}.tar.gz )" # patches if [[ -n ${UPSTREAM_PATCHES} ]]; then @@ -23,7 +25,7 @@ fi LICENSE="GPL-2" KEYWORDS="~alpha ~amd64 ~hppa ~ppc ~ppc64 ~sparc ~x86" -IUSE="snmp doc" +IUSE="snmp doc plugin" DEPEND="" @@ -39,12 +41,14 @@ RDEPEND="snmp? ( >=net-analyzer/net-snmp src_unpack() { unpack ${MY_P}.tar.gz + use plugin && unpack cacti-plugin-${PV}-${PLUGIN_VER}.tar.gz if [[ -n ${UPSTREAM_PATCHES} ]]; then [ ! ${MY_P} == ${P} ] && mv ${MY_P} ${P} fi } src_prepare() { + use plugin && epatch "${WORKDIR}"/cacti-plugin-arch/cacti-plugin-${PV}-${PLUGIN_VER}.diff if [[ -n ${UPSTREAM_PATCHES} ]]; then for i in ${UPSTREAM_PATCHES} ; do EPATCH_OPTS="-p1 -d ${S} -N" epatch "${DISTDIR}"/${i}.patch @@ -72,6 +76,7 @@ src_install() { dodir ${MY_HTDOCSDIR} cp -r . "${D}"${MY_HTDOCSDIR} + use plugin && cp "${WORKDIR}"/cacti-plugin-arch/pa.sql "${D}"${MY_HTDOCSDIR} webapp_serverowned ${MY_HTDOCSDIR}/rra webapp_serverowned ${MY_HTDOCSDIR}/log/cacti.log --- files/postinstall-en.txt 2008-02-13 15:00:08.000000000 +0200 +++ files/postinstall-en.txt 2011-10-04 22:03:04.645068552 +0200 @@ -60,3 +60,6 @@ permission to create new files in Cacti' ${MY_INSTALLDIR}/rra +If you have selected to install plugin architecture, you need to execute: + +shell> mysql -p --user=root cacti < ${MY_INSTALLDIR}/pa.sql