Permalink
Browse files

Add collectd5 here for pre 2014Q1 releases, so that we can remove fro…

…m wip
  • Loading branch information...
1 parent 331ba9a commit 202ec354fa5a5b606e5fd090ad156c86a46fbb54 @mamash mamash committed Mar 4, 2014
View
@@ -0,0 +1 @@
+rrdtool plugin for collectd
View
@@ -0,0 +1,13 @@
+# $NetBSD$
+
+COLLECTD_PACKAGE= rrdtool
+COLLECTD_PLUGINS= rrdtool rrdcached
+
+COMMENT= Statistics collection daemon - rrdtool plugins
+
+.include "../../joyent/collectd5/Makefile.common"
+
+CONFIGURE_ARGS+= --with-librrd=${BUILDLINK_PREFIX.rrdtool}
+
+.include "../../databases/rrdtool/buildlink3.mk"
+.include "../../mk/bsd.pkg.mk"
View
@@ -0,0 +1,3 @@
+collectd is a daemon which collects system performance statistics periodically
+and provides mechanisms to store the values in a variety of ways, for example
+in RRD-files.
View
@@ -0,0 +1,44 @@
+# $NetBSD$
+#
+
+.include "../../joyent/collectd5/Makefile.common"
+
+COMMENT= Statistics collection daemon base
+
+RCD_SCRIPTS= collectd
+
+.include "../../mk/bsd.prefs.mk"
+
+SMF_SRCDIR= ${WRKSRC}/contrib/solaris-smf
+SMF_MANIFEST= collectd.xml
+SMF_MANIFEST_SRC= ${SMF_SRCDIR}/${SMF_MANIFEST}
+
+# Simple plugins that have no dependencies
+DEFAULT_PLUGINS+= aggregation apcups csv email exec filecount \
+ hddtemp logfile match_empty_counter match_hashed\
+ match_regex match_timediff match_value mbmon \
+ ntpd olsrd openvpn powerdns statsd table tail \
+ tail_csv target_notification target_replace \
+ target_scale target_set target_v5upgrade \
+ teamspeak2 threshold unixsock uuid write_graphite
+
+.for option in ${DEFAULT_PLUGINS}
+CONFIGURE_ARGS+= --enable-${option}
+.endfor
+
+.include "options.mk"
+
+CONF_FILES+= share/examples/collectd/collectd.conf \
+ ${PKG_SYSCONFDIR}/collectd.conf
+
+OWN_DIRS+= ${VARBASE}/db/collectd
+
+COLLECTD_USER?= collectd
+COLLECTD_GROUP?= ${COLLECTD_USER}
+PKG_USERS_VARS+= COLLECTD_USER
+PKG_GROUPS_VARS+= COLLECTD_GROUP
+PKG_GROUPS= ${COLLECTD_GROUP}
+PKG_USERS= ${COLLECTD_USER}:${COLLECTD_GROUP}
+PKG_GECOS.${COLLECTD_USER}= collectd unprivileged user
+
+.include "../../mk/bsd.pkg.mk"
View
@@ -0,0 +1,71 @@
+# $NetBSD$
+#
+# used by joyent/collectd5/Makefile
+# used by joyent/collectd5-curl/Makefile
+# used by joyent/collectd5-dbi/Makefile
+# used by joyent/collectd5-dns/Makefile
+# used by joyent/collectd5-memcached/Makefile
+# used by joyent/collectd5-mysql/Makefile
+# used by joyent/collectd5-network/Makefile
+# used by joyent/collectd5-notify-email/Makefile
+# used by joyent/collectd5-postgresql/Makefile
+# used by joyent/collectd5-rrdtool/Makefile
+# used by joyent/collectd5-snmp/Makefile
+
+DISTNAME= collectd-5.4.0
+MASTER_SITES= http://collectd.org/files/
+CATEGORIES= sysutils
+
+MAINTAINER= msporleder@gmail.com
+HOMEPAGE= http://collectd.org/
+LICENSE= gnu-gpl-v2
+
+GNU_CONFIGURE= yes
+USE_LIBTOOL= yes
+USE_TOOLS+= pkg-config
+USE_LANGUAGES= c c++
+
+DISTINFO_FILE= ${.CURDIR}/../../joyent/collectd5/distinfo
+PATCHDIR= ${.CURDIR}/../../joyent/collectd5/patches
+
+.if !empty(COLLECTD_PACKAGE)
+PKGNAME?= ${DISTNAME:S/collectd/collectd-${COLLECTD_PACKAGE}/}
+
+DEPENDS+= ${DISTNAME}:../../joyent/collectd5
+
+COLLECTD_PLUGINS?= ${COLLECTD_PACKAGE:S/-/_/}
+
+BUILD_DIRS= src
+BUILD_TARGET= ${COLLECTD_PLUGINS:S/$/.la/}
+INSTALL_DIRS= src
+INSTALL_TARGET= install-pkglibLTLIBRARIES
+. for plugin in ${COLLECTD_PLUGINS}
+CONFIGURE_ARGS+= --enable-${plugin}
+GENERATE_PLIST+= ${ECHO} "lib/collectd/${plugin}.la";
+. endfor
+.endif
+
+.include "../../mk/bsd.prefs.mk"
+
+BUILD_DEFS+= VARBASE
+
+# Disable all libs support by default
+DISABLED_LIBS= aquaero5 credis curl dbi esmtp ganglia gcrypt \
+ iptc lvm2app memcached mnl modbus mongoc mysql \
+ netsnmp notify oping owcapi pcap perl pq \
+ rabbitmq routeros rrd sensors sigrok statgrab \
+ tokyotyrant upsclient varnish xml2 xmms yajl
+CONFIGURE_ARGS+= --with-java=no --with-mic=no --with-oracle=no \
+ --with-perl-bindings=no --with-python=no \
+ --disable-all-plugins
+.for lib in ${DISABLED_LIBS}
+CONFIGURE_ARGS+= --with-lib${lib}=no
+.endfor
+CONFIGURE_ARGS+= --localstatedir=${VARBASE}
+CONFIGURE_ARGS+= --with-ltdl-lib=${BUILDLINK_PREFIX.libltdl}/lib
+CONFIGURE_ARGS+= --with-ltdl-include=${BUILDLINK_PREFIX.libltdl}/include
+
+CPPFLAGS.SunOS+= -D__EXTENSIONS__ -DSOLARIS2=11
+
+.include "../../devel/libltdl/buildlink3.mk"
+.include "../../mk/pthread.buildlink3.mk"
View
@@ -0,0 +1,83 @@
+@comment $NetBSD$
+bin/collectd-nagios
+bin/collectd-tg
+bin/collectdctl
+include/collectd/client.h
+include/collectd/lcc_features.h
+include/collectd/network.h
+include/collectd/network_buffer.h
+lib/collectd/aggregation.la
+lib/collectd/apcups.la
+${PLIST.apple-sensors}lib/collectd/apple_sensors.la
+${PLIST.battery}lib/collectd/battery.la
+${PLIST.contextswitch}lib/collectd/contextswitch.la
+${PLIST.cpu}lib/collectd/cpu.la
+lib/collectd/csv.la
+${PLIST.df}lib/collectd/df.la
+${PLIST.disk}lib/collectd/disk.la
+lib/collectd/email.la
+lib/collectd/exec.la
+lib/collectd/filecount.la
+lib/collectd/hddtemp.la
+${PLIST.interface}lib/collectd/interface.la
+${PLIST.load}lib/collectd/load.la
+lib/collectd/logfile.la
+lib/collectd/match_empty_counter.la
+lib/collectd/match_hashed.la
+lib/collectd/match_regex.la
+lib/collectd/match_timediff.la
+lib/collectd/match_value.la
+lib/collectd/mbmon.la
+${PLIST.memory}lib/collectd/memory.la
+${PLIST.nfs}lib/collectd/nfs.la
+lib/collectd/ntpd.la
+lib/collectd/olsrd.la
+lib/collectd/openvpn.la
+${PLIST.perl}lib/collectd/perl.la
+${PLIST.pf}lib/collectd/pf.la
+lib/collectd/powerdns.la
+${PLIST.processes}lib/collectd/processes.la
+${PLIST.python}lib/collectd/python.la
+lib/collectd/statsd.la
+${PLIST.swap}lib/collectd/swap.la
+${PLIST.syslog}lib/collectd/syslog.la
+lib/collectd/table.la
+lib/collectd/tail.la
+lib/collectd/tail_csv.la
+lib/collectd/target_notification.la
+lib/collectd/target_replace.la
+lib/collectd/target_scale.la
+lib/collectd/target_set.la
+lib/collectd/target_v5upgrade.la
+lib/collectd/teamspeak2.la
+${PLIST.tcpconns}lib/collectd/tcpconns.la
+lib/collectd/threshold.la
+lib/collectd/unixsock.la
+${PLIST.uptime}lib/collectd/uptime.la
+${PLIST.users}lib/collectd/users.la
+lib/collectd/uuid.la
+lib/collectd/write_graphite.la
+${PLIST.zfs-arc}lib/collectd/zfs_arc.la
+lib/libcollectdclient.la
+lib/pkgconfig/libcollectdclient.pc
+man/man1/collectd-nagios.1
+man/man1/collectd-tg.1
+man/man1/collectd.1
+man/man1/collectdctl.1
+man/man1/collectdmon.1
+man/man5/collectd-email.5
+man/man5/collectd-exec.5
+man/man5/collectd-java.5
+man/man5/collectd-perl.5
+man/man5/collectd-python.5
+man/man5/collectd-snmp.5
+man/man5/collectd-threshold.5
+man/man5/collectd-unixsock.5
+man/man5/collectd.conf.5
+man/man5/types.db.5
+sbin/collectd
+sbin/collectdmon
+share/collectd/postgresql_default.conf
+share/collectd/types.db
+share/examples/collectd/collectd.conf
+share/examples/rc.d/collectd
View
@@ -0,0 +1,15 @@
+$NetBSD$
+
+SHA1 (collectd-5.4.0.tar.gz) = a90fe6cc53b76b7bdd56dc57950d90787cb9c96e
+RMD160 (collectd-5.4.0.tar.gz) = be426e95b872fcf76fdaa01d330dfdd313cab470
+Size (collectd-5.4.0.tar.gz) = 1893721 bytes
+SHA1 (patch-Makefile.in) = 17e77b6d31b45947366ca37bb3fc79cf8acf2104
+SHA1 (patch-configure) = 8ae2897c21e80bead8280d1350173313714774c4
+SHA1 (patch-contrib_solaris-smf_collectd.xml) = 938580577302a738365046eb7b6b0b9d28db99d5
+SHA1 (patch-src_Makefile.in) = 45b29dcf57676637a010fffed9170794cf4db63e
+SHA1 (patch-src_collectd.c) = df5f970d77dcb091469c1a5aaa7ed340a610c9b2
+SHA1 (patch-src_collectd.conf.in) = e6704c89c2382cf80cd1af1223bb09e7cace5f7f
+SHA1 (patch-src_curl__xml.c) = 9c236c568ad9cd399a377befc423b16200a92dfb
+SHA1 (patch-src_df.c) = cdafede12153097b7a3958a20401493059244cfc
+SHA1 (patch-src_libcollectclient_network__buffer.c) = a91a7e375dcbfd26a62072baac1d54d40b3c2903
+SHA1 (patch-src_network.c) = 15b92c7be6c843b4e5b56a1f28c6f4687fb5098c
@@ -0,0 +1,26 @@
+#!@RCD_SCRIPTS_SHELL@
+#
+# $NetBSD$
+#
+# PROVIDE: collectd
+# REQUIRE: DAEMON
+# KEYWORD: shutdown
+#
+# You will need to set some variables in /etc/rc.conf to start collectd:
+#
+# collectd=YES
+#
+
+if [ -f /etc/rc.subr ]
+then
+ . /etc/rc.subr
+fi
+
+name="collectd"
+rcvar=${name}
+command=@PREFIX@/sbin/collectd
+pidfile="@VARBASE@/run/collectd.pid"
+required_files=@PKG_SYSCONFDIR@/collectd.conf
+
+load_rc_config ${name}
+run_rc_command "$1"
View
@@ -0,0 +1,54 @@
+# $NetBSD$
+
+PKG_OPTIONS_VAR= PKG_OPTIONS.collectd
+PKG_SUPPORTED_OPTIONS= cpu df interface load memory perl python syslog uptime
+PKG_SUGGESTED_OPTIONS+= cpu df interface load memory syslog uptime
+
+.if ${OPSYS} == "NetBSD"
+PKG_SUPPORTED_OPTIONS+= contextswitch pf tcpconns users
+PKG_SUGGESTED_OPTIONS+= contextswitch pf tcpconns users
+.endif
+
+.if ${OPSYS} == "FreeBSD"
+PKG_SUPPORTED_OPTIONS+= contextswitch pf processes swap tcpconns zfs-arc
+PKG_SUGGESTED_OPTIONS+= contextswitch pf processes swap tcpconns zfs-arc
+.endif
+
+.if ${OPSYS} == "Darwin"
+PKG_SUPPORTED_OPTIONS+= apple-sensors battery contextswitch disk processes swap \
+ tcpconns users
+PKG_SUGGESTED_OPTIONS+= apple-sensors battery contextswitch disk processes swap \
+ tcpconns users
+.endif
+
+.if ${OPSYS} == "SunOS"
+PKG_SUPPORTED_OPTIONS+= disk nfs swap users zfs-arc
+PKG_SUGGESTED_OPTIONS+= disk nfs swap users zfs-arc
+.endif
+
+.include "../../mk/bsd.options.mk"
+
+PLIST_VARS+= apple-sensors battery contextswitch cpu df disk \
+ interface load memory nfs perl pf processes python swap \
+ syslog tcpconns uptime users zfs-arc
+
+.for option in ${PLIST_VARS}
+. if !empty(PKG_OPTIONS:M${option})
+CONFIGURE_ARGS+= --enable-${option:S/-/_/}
+PLIST.${option}= yes
+. endif
+.endfor
+
+.if !empty(PKG_OPTIONS:Mperl)
+USE_TOOLS+= perl
+PERL5_CONFIGURE= no
+PERL5_PACKLIST+= auto/Collectd/.packlist
+CONFIGURE_ARGS+= --with-libperl=${BUILDLINK_PREFIX.perl}
+CONFIGURE_ARGS+= --with-perl-bindings=${MAKE_PARAMS:Q}
+. include "../../lang/perl5/module.mk"
+.endif
+
+.if !empty(PKG_OPTIONS:Mpython)
+CONFIGURE_ARGS+= --with-python=${PYTHONBIN}
+. include "../../lang/python/application.mk"
+.endif
@@ -0,0 +1,14 @@
+$NetBSD$
+
+Use a reasonable db dir.
+--- Makefile.in.orig 2013-08-18 10:25:00.482540421 +0000
++++ Makefile.in
+@@ -875,7 +875,7 @@ uninstall-am:
+
+ install-exec-hook:
+ $(mkinstalldirs) $(DESTDIR)$(localstatedir)/run
+- $(mkinstalldirs) $(DESTDIR)$(localstatedir)/lib/$(PACKAGE_NAME)
++ $(mkinstalldirs) $(DESTDIR)$(localstatedir)/db/$(PACKAGE_NAME)
+ $(mkinstalldirs) $(DESTDIR)$(localstatedir)/log
+
+ maintainer-clean-local:
@@ -0,0 +1,47 @@
+$NetBSD$
+
+Remove m4 cruft.
+Fix IOKit linking on modern OS X.
+--- configure.orig 2013-08-18 10:25:01.622558671 +0000
++++ configure
+@@ -18292,19 +18292,19 @@ $as_echo_n "checking if have htonll defi
+ have_htonll="no"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h. */
+-[
++
+ #include <sys/types.h>
+ #include <netinet/in.h>
+ #if HAVE_INTTYPES_H
+ # include <inttypes.h>
+ #endif
+-]
++
+ int
+ main ()
+ {
+-[
++
+ return htonll(0);
+-]
++
+
+ ;
+ return 0;
+@@ -19120,13 +19120,13 @@ fi
+
+
+ with_libiokit="no"
+-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for IOServiceGetMatchingServices in -lIOKit" >&5
+-$as_echo_n "checking for IOServiceGetMatchingServices in -lIOKit... " >&6; }
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for IOServiceGetMatchingServices in '-framework IOKit'" >&5
++$as_echo_n "checking for IOServiceGetMatchingServices in '-framework IOKit'... " >&6; }
+ if ${ac_cv_lib_IOKit_IOServiceGetMatchingServices+:} false; then :
+ $as_echo_n "(cached) " >&6
+ else
+ ac_check_lib_save_LIBS=$LIBS
+-LIBS="-lIOKit $LIBS"
++LIBS="-framework IOKit $LIBS"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h. */
+
Oops, something went wrong.

0 comments on commit 202ec35

Please sign in to comment.