On 2016/05/20 19:59, Sebastian Reitenbach wrote:
> Hi,
> 
> I've finally got pnp4nagios running for me with icinga2, and now would 
> like to get this icinga2 flavor up and running ;)
> 
> The icinga2 is only touching the RUN_DEPENDS, and the location
> where the default perfdata dir located is.
> 
> Alternatively, instead of a FLAVOR, maybe the RUN_DEPENDS
> to icinga, and icingaweb could just be dropped, and the admin
> is going to install/use whatever he prefers?

Yep, a flavour to just change RUN_DEPENDS is a bit pointless.
So if the perfdata path is just for the default setting and it
can be overridden in config, it would be better to just add a
note to the README explaining what to do.

Also I think that there's no advantage to having a separate
README-cgi and README-main for this port, it would probably be
more sensible to roll them into a single README-main file.

> With regard to FLAVORS, there is no separate pkg/DESCR,
> I should list the FLAVORS in the single DESCR?
> 
> Same question goes to the README?
> 
> I got it working for me now behind chrooted nginx, rrdtool and php_fpm,
> with npcd in bulk mode. Does that make sense to add something
> about that to the README as well, or is the apache example enough ;)
> 
> Anyways, here is a minimal FLAVOR variant: Have an icinga and an
> icinga2 flavor, whereas the icinga flavor is the default (to keep the
> current status quo) and the pkgname of that flavor is tweaked
> to match the current name of the current package/subpackage.
> 
> I hope I got that right?
> 
> Let me know what people might prefer: FLAVOR, or dropped RUN_DEPENDS?
> Even I sent the FLAVOR version, I'm kind a biased towards a
> version with dropped RUN_DEPENDS?
> 
> cheers,
> Sebastian
> 
> 
> Index: Makefile
> ===================================================================
> RCS file: /cvs/ports/www/pnp4nagios/Makefile,v
> retrieving revision 1.4
> diff -u -r1.4 Makefile
> --- Makefile  18 May 2016 17:34:00 -0000      1.4
> +++ Makefile  20 May 2016 17:43:34 -0000
> @@ -10,6 +10,9 @@
>  REVISION-main =      1
>  REVISION-cgi =       0
> 
> +FLAVORS=     icinga icinga2
> +FLAVOR?=     icinga
> +
>  CATEGORIES = www
> 
>  HOMEPAGE =   https://docs.pnp4nagios.org/
> @@ -19,16 +22,25 @@
>  # GPLv2
>  PERMIT_PACKAGE_CDROM =       Yes
> 
> +.if ${FLAVOR:Micinga2}
> +ICINGA_VERSION_EXT = 2
> +.else
> +FULLPKGNAME-main =   ${PKGNAME-main}
> +FULLPKGPATH-main =   www/pnp4nagios,-main
> +FULLPKGNAME-cgi =    ${PKGNAME-cgi}
> +FULLPKGPATH-cgi =    www/pnp4nagios,-cgi
> +.endif
> +
>  WANTLIB-main =               c pthread
> 
>  MASTER_SITES =               ${MASTER_SITE_SOURCEFORGE:=pnp4nagios/}
> 
>  MODULES =            lang/php
>  BUILD_DEPENDS =              net/rrdtool
> -RUN_DEPENDS-main =   net/icinga/core \
> +RUN_DEPENDS-main =   net/icinga/core${ICINGA_VERSION_EXT} \
>                       net/rrdtool
>  RUN_DEPENDS-cgi =    lang/php/${MODPHP_VERSION},-gd \
> -                     net/icinga/web \
> +                     net/icinga/web${ICINGA_VERSION_EXT} \
>                       www/pnp4nagios,-main
> 
>  FAKE_FLAGS =         INSTALL_OPTS="-o root -g bin" \
> @@ -42,7 +54,7 @@
>                       --datarootdir=${VARBASE}/www/pnp4nagios/ \
>                       --libexecdir=${PREFIX}/libexec/nagios \
>                       --with-perfdata-dir=${VARBASE}/www/pnp4nagios/rrd \
> -                     --with-perfdata-spool-dir=${VARBASE}/spool/icinga \
> +                     
> --with-perfdata-spool-dir=${VARBASE}/spool/icinga${ICINGA_VERSION_EXT} \
>                       
> --with-perfdata-logfile=${VARBASE}/log/pnp4nagios/pnp4nagios.log
> 
>  MULTI_PACKAGES =     -main -cgi
> 
> 

Reply via email to