Import of pkgsrc-2016Q3

This commit is contained in:
2016-10-14 07:49:11 +02:00
committed by Lionel Sambuc
parent 9d819b6d54
commit 1242aa1e36
35952 changed files with 949749 additions and 377083 deletions

5
sysutils/facette/DESCR Normal file
View File

@@ -0,0 +1,5 @@
Facette is a time series data (called metrics) visualization software, it
doesn't collect nor store these data on its own. Through providers, it
inventories other collect/storage tools' local metrics, and queries those
remote storage resources when the user requests time series data to be
displayed on a graph.

111
sysutils/facette/Makefile Normal file
View File

@@ -0,0 +1,111 @@
# $NetBSD: Makefile,v 1.8 2016/09/10 19:47:21 bsiegert Exp $
DISTNAME= facette-0.4.0dev
PKGREVISION= 8
CATEGORIES= sysutils
MASTER_SITES= ${MASTER_SITE_GITHUB:=facette/}
MAINTAINER= imil@NetBSD.org
HOMEPAGE= https://facette.io/
COMMENT= Time series data visualization and graphing
LICENSE= modified-bsd
GITHUB_PROJECT= facette
GITHUB_TAG= d77e77680d52d232305d0f12af6e3e1c857903cb
EXTRACT_USING= bsdtar
USE_TOOLS+= bsdtar gmake gsed pax pkg-config
BUILD_DEPENDS+= go-[0-9]*:../../lang/go
BUILD_DEPENDS+= nodejs-[0-9]*:../../lang/nodejs
BUILD_DEFS+= VARBASE
SUBST_CLASSES+= prefix
SUBST_MESSAGE.prefix= Fixing prefix.
SUBST_STAGE.prefix= pre-build
SUBST_FILES.prefix= Makefile docs/examples/facette.json
SUBST_SED.prefix= -e 's,/usr/local,${PREFIX},g'
SUBST_CLASSES+= conf
SUBST_MESSAGE.conf= Fixing configuration path.
SUBST_STAGE.conf= pre-build
SUBST_FILES.conf= cmd/facette/facette.go \
cmd/facettectl/facettectl.go \
docs/examples/facette.json \
docs/man/facette.1.md \
docs/man/facettectl.8.md \
pkg/config/config.go
SUBST_SED.conf= -e 's,/etc,${PKG_SYSCONFDIR},g'
SUBST_CLASSES+= rrd
SUBST_MESSAGE.rrd= Fixing collectd rrd path.
SUBST_STAGE.rrd= pre-build
SUBST_FILES.rrd= docs/examples/providers/collectd.json
SUBST_SED.rrd= -e 's,/var/lib,${VARBASE}/db,g'
CHECK_PORTABILITY_SKIP= vendor/src/github.com/influxdb/influxdb/configure
.include "../../mk/bsd.prefs.mk"
FACETTE_USER?= facette
FACETTE_GROUP?= facette
RCD_SCRIPTS+= facette
RCD_SCRIPT_SRC.facette= ${FILESDIR}/facette.sh
FACETTE_DOCDIR= ${PREFIX}/share/doc/facette
FACETTE_HTDOCS= ${PREFIX}/share/facette
FACETTE_DATADIR= ${VARBASE}/lib/facette
FACETTE_LOGDIR= ${VARBASE}/log/facette
EGDIR= ${PREFIX}/share/examples/facette
INSTALLATION_DIRS+= bin ${EGDIR} ${FACETTE_DOCDIR}
INSTALLATION_DIRS+= ${FACETTE_HTDOCS}/template ${FACETTE_HTDOCS}/static
OWN_DIRS+= ${PKG_SYSCONFDIR}/facette
OWN_DIRS+= ${PKG_SYSCONFDIR}/facette/providers
OWN_DIRS+= ${VARBASE}/run/facette
OWN_DIRS+= ${FACETTE_DATADIR} ${FACETTE_LOGDIR}
OWN_DIRS_PERMS+= ${VARBASE}/run/facette \
${FACETTE_USER} ${FACETTE_GROUP} 0755
OWN_DIRS_PERMS+= ${FACETTE_DATADIR} \
${FACETTE_USER} ${FACETTE_GROUP} 0755
OWN_DIRS_PERMS+= ${FACETTE_LOGDIR} \
${FACETTE_USER} ${FACETTE_GROUP} 0755
PKG_GROUPS+= ${FACETTE_GROUP}
PKG_USERS+= ${FACETTE_USER}:${FACETTE_GROUP}
PKG_GECOS.${FACETTE_USER}= Facette daemon user
PKG_HOME.${FACETTE_USER}= ${FACETTE_DATADIR}
FILES_SUBST+= FACETTE_USER=${FACETTE_USER}
FILES_SUBST+= FACETTE_GROUP=${FACETTE_GROUP}
FILES_SUBST+= FACETTE_LOGDIR=${FACETTE_LOGDIR}
CONF_FILES+= ${EGDIR}/facette.json \
${PKG_SYSCONFDIR}/facette/facette.json
CONF_FILES+= ${EGDIR}/providers/collectd.json \
${PKG_SYSCONFDIR}/facette/providers/collectd.json
CGO_LDFLAGS= -L${PREFIX}/lib ${COMPILER_RPATH_FLAG},${PREFIX}/lib
do-build:
cd ${WRKSRC} && CGO_LDFLAGS=${CGO_LDFLAGS:Q} ${GMAKE} build
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/build/*/bin/facette \
${DESTDIR}${PREFIX}/bin/
${INSTALL_PROGRAM} ${WRKSRC}/build/*/bin/facettectl \
${DESTDIR}${PREFIX}/bin/
cd ${WRKSRC}/docs/man && ${PAX} -rw * ${DESTDIR}${FACETTE_DOCDIR}
cd ${WRKSRC}/docs/examples && ${PAX} -rw * ${DESTDIR}${EGDIR}
cd ${WRKSRC}/build/*/template && \
${PAX} -rw * ${DESTDIR}${FACETTE_HTDOCS}/template
cd ${WRKSRC}/build/*/static && \
${PAX} -rw * ${DESTDIR}${FACETTE_HTDOCS}/static
.include "../../databases/rrdtool/buildlink3.mk"
.include "../../mk/bsd.pkg.mk"

65
sysutils/facette/PLIST Normal file
View File

@@ -0,0 +1,65 @@
@comment $NetBSD: PLIST,v 1.2 2016/03/08 20:21:50 imil Exp $
bin/facette
bin/facettectl
share/doc/facette/facette.1.md
share/doc/facette/facettectl.8.md
share/examples/facette/facette.apache2
share/examples/facette/facette.json
share/examples/facette/facette.nginx
share/examples/facette/providers/collectd.json
share/examples/facette/providers/graphite.json
share/examples/facette/providers/influxdb.json
share/examples/facette/providers/kairosdb.json
share/facette/static/canvg.js
share/facette/static/facette.js
share/facette/static/facette.src.js
share/facette/static/favicon.png
share/facette/static/fonts/Lato-Bold.ttf
share/facette/static/fonts/Lato-Light.ttf
share/facette/static/fonts/Lato-Regular.ttf
share/facette/static/fonts/fontawesome-webfont.eot
share/facette/static/fonts/fontawesome-webfont.svg
share/facette/static/fonts/fontawesome-webfont.ttf
share/facette/static/fonts/fontawesome-webfont.woff
share/facette/static/highcharts.exporting.js
share/facette/static/highcharts.js
share/facette/static/i18next.js
share/facette/static/jquery.datepicker.js
share/facette/static/jquery.js
share/facette/static/loader.gif
share/facette/static/logo-text-light.png
share/facette/static/logo-text.png
share/facette/static/messages.json
share/facette/static/moment.js
share/facette/static/rgbcolor.js
share/facette/static/sprintf.js
share/facette/static/style.css
share/facette/static/style.print.css
share/facette/static/style.print.src.css
share/facette/static/style.src.css
share/facette/template/admin/catalog_list.html
share/facette/template/admin/collection_edit.html
share/facette/template/admin/collection_list.html
share/facette/template/admin/graph_edit.html
share/facette/template/admin/graph_edit_linked.html
share/facette/template/admin/graph_list.html
share/facette/template/admin/group_edit.html
share/facette/template/admin/group_list.html
share/facette/template/admin/index.html
share/facette/template/admin/layout.html
share/facette/template/admin/scale_edit.html
share/facette/template/admin/scale_list.html
share/facette/template/admin/unit_edit.html
share/facette/template/admin/unit_list.html
share/facette/template/browse/collection.html
share/facette/template/browse/graph.html
share/facette/template/browse/index.html
share/facette/template/browse/layout.html
share/facette/template/browse/search.html
share/facette/template/common/element.html
share/facette/template/common/graph.html
share/facette/template/error.html
share/facette/template/layout.html
share/facette/template/opensearch.xml
share/facette/template/show/graph.html
share/facette/template/show/layout.html

View File

@@ -0,0 +1,7 @@
$NetBSD: distinfo,v 1.1 2016/03/08 16:52:44 imil Exp $
SHA1 (facette-0.4.0dev-d77e77680d52d232305d0f12af6e3e1c857903cb.tar.gz) = d0025f1b4612b5c6230793fa962dd9d9cc753b72
RMD160 (facette-0.4.0dev-d77e77680d52d232305d0f12af6e3e1c857903cb.tar.gz) = 94821f0b05c8381f12140827827e23faf9277608
SHA512 (facette-0.4.0dev-d77e77680d52d232305d0f12af6e3e1c857903cb.tar.gz) = 6739f0c2b599b4297b9dec12c0a288f4f1b0a9e6aed8774a2b8daa82cfbe5f577d3e4c5bb247a2853a1775ba6a5f7502e5b03f1e77aab85a46b6da82dff0852c
Size (facette-0.4.0dev-d77e77680d52d232305d0f12af6e3e1c857903cb.tar.gz) = 3580148 bytes
SHA1 (patch-Makefile) = 7f91867729aa60c7329138af846239cc61f3898c

View File

@@ -0,0 +1,25 @@
#!@RCD_SCRIPTS_SHELL@
#
# $NetBSD: facette.sh,v 1.1 2016/03/09 12:09:29 imil Exp $
#
# PROVIDE: facette
# REQUIRE: DAEMON network
# KEYWORD: shutdown
if [ -f /etc/rc.subr ]; then
. /etc/rc.subr
fi
name="facette"
rcvar=$name
command="@PREFIX@/bin/facette"
command_args="-l @FACETTE_LOGDIR@/${name}.log &"
facette_user="@FACETTE_USER@"
if [ -f /etc/rc.subr ]; then
load_rc_config $name
run_rc_command "$1"
else
echo -n "${name}"
@SU@ -m ${facette_user} -c "${command} ${command_args}"
fi

View File

@@ -0,0 +1,67 @@
$NetBSD: patch-Makefile,v 1.1 2016/03/08 16:52:44 imil Exp $
Make facette Makefile NetBSD-friendly.
* Use gsed to support all used flags
* Disable pandoc
* Use pax instead of rsync
--- Makefile.orig 2015-12-22 05:00:11.000000000 +0000
+++ Makefile
@@ -16,6 +16,13 @@ UNAME := $(shell uname -s)
GO ?= go
+# might apply to other BSDs
+ifeq ($(UNAME), NetBSD)
+SED = gsed
+else
+SED = sed
+endif
+
GOOS ?= $(shell $(GO) env GOOS)
GOARCH ?= $(shell $(GO) env GOARCH)
@@ -88,7 +95,12 @@ clean: clean-bin clean-doc clean-static
@(test ! -d $(BUILD_DIR) || rmdir $(BUILD_DIR)) && \
$(call mesg_ok) || $(call mesg_fail)
-build: build-bin build-doc build-static
+# NetBSD doesn't have pandoc packaged yet
+ifneq ($(UNAME), NetBSD)
+do_buid_docs = build-doc
+endif
+
+build: build-bin $(do_buid_docs) build-static
.PHONY: install
install: install-bin install-doc install-static
@@ -277,7 +289,7 @@ $(SCRIPT_EXTRA_OUTPUT): $(SCRIPT_EXTRA)
$(MESG_OUTPUT): $(MESG_SRC)
@$(call mesg_start,static,Packing $(MESG_SRC) file...)
@install -d -m 0755 $(BUILD_DIR)/static && \
- sed -e 's/^\s\+//g;s/\s\+$$//g' $(MESG_SRC) | sed -e ':a;N;s/\n//;ta' >$(MESG_OUTPUT) && \
+ $(SED) -e 's/^\s\+//g;s/\s\+$$//g' $(MESG_SRC) | $(SED) -e ':a;N;s/\n//;ta' >$(MESG_OUTPUT) && \
$(call mesg_ok) || $(call mesg_fail)
$(STYLE_OUTPUT): lessc $(STYLE_SRC)
@@ -302,8 +314,8 @@ $(STYLE_EXTRA_OUTPUT): $(STYLE_EXTRA)
$(call mesg_ok) || $(call mesg_fail)
$(TMPL_OUTPUT): $(TMPL_SRC)
-ifeq ($(UNAME), Darwin)
- $(eval COPY_CMD=rsync -rR)
+ifneq ($(UNAME), Linux)
+ $(eval COPY_CMD=pax -rwpe)
else
$(eval COPY_CMD=cp -r --parents)
endif
@@ -337,7 +349,7 @@ devel-static: build-static
$(call mesg_ok) || $(call mesg_fail)
@$(call mesg_start,install,Copying static third-party development files...)
@(for ENTRY in $(SCRIPT_EXTRA:.js=.src.js); do \
- cp $$ENTRY $(BUILD_DIR)/static/`basename $$ENTRY | sed -e 's@\.src\.js$$@.js@'`; \
+ cp $$ENTRY $(BUILD_DIR)/static/`basename $$ENTRY | $(SED) -e 's@\.src\.js$$@.js@'`; \
done) && $(call mesg_ok) || $(call mesg_fail)
lint-static: jshint $(SCRIPT_OUTPUT)