annotate app-admin/collectd/collectd-4.4.1.ebuild @ 43:365d3f380d8d

pulled in changes from Holgi
author Dirk Olmes <dirk@xanthippe.ping.de>
date Fri, 20 Jun 2008 15:09:02 +0200
parents 9283c4b8218f
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
15
ff022172f31a bump collectd to 4.3.3
holger@hoho.dyndns.org
parents:
diff changeset
1 # Copyright 1999-2008 Gentoo Foundation
ff022172f31a bump collectd to 4.3.3
holger@hoho.dyndns.org
parents:
diff changeset
2 # Distributed under the terms of the GNU General Public License v2
ff022172f31a bump collectd to 4.3.3
holger@hoho.dyndns.org
parents:
diff changeset
3 # $Header: $
ff022172f31a bump collectd to 4.3.3
holger@hoho.dyndns.org
parents:
diff changeset
4
ff022172f31a bump collectd to 4.3.3
holger@hoho.dyndns.org
parents:
diff changeset
5 inherit autotools eutils flag-o-matic linux-info
ff022172f31a bump collectd to 4.3.3
holger@hoho.dyndns.org
parents:
diff changeset
6
ff022172f31a bump collectd to 4.3.3
holger@hoho.dyndns.org
parents:
diff changeset
7 DESCRIPTION="A small daemon which collects system performance statistics"
ff022172f31a bump collectd to 4.3.3
holger@hoho.dyndns.org
parents:
diff changeset
8 HOMEPAGE="http://collectd.org/"
ff022172f31a bump collectd to 4.3.3
holger@hoho.dyndns.org
parents:
diff changeset
9
ff022172f31a bump collectd to 4.3.3
holger@hoho.dyndns.org
parents:
diff changeset
10 SRC_URI="${HOMEPAGE}/files/${P}.tar.bz2"
ff022172f31a bump collectd to 4.3.3
holger@hoho.dyndns.org
parents:
diff changeset
11 LICENSE="GPL-2"
ff022172f31a bump collectd to 4.3.3
holger@hoho.dyndns.org
parents:
diff changeset
12
ff022172f31a bump collectd to 4.3.3
holger@hoho.dyndns.org
parents:
diff changeset
13 SLOT="0"
ff022172f31a bump collectd to 4.3.3
holger@hoho.dyndns.org
parents:
diff changeset
14
ff022172f31a bump collectd to 4.3.3
holger@hoho.dyndns.org
parents:
diff changeset
15 KEYWORDS="~x86 ~amd64"
ff022172f31a bump collectd to 4.3.3
holger@hoho.dyndns.org
parents:
diff changeset
16 IUSE="
ff022172f31a bump collectd to 4.3.3
holger@hoho.dyndns.org
parents:
diff changeset
17 apache2 apcups dns email hal hddtemp ithreads lighttpd lm_sensors memcache
ff022172f31a bump collectd to 4.3.3
holger@hoho.dyndns.org
parents:
diff changeset
18 mysql network nfs nginx ntp nut perl qemu rrdtool snmp syslog vserver xen
ff022172f31a bump collectd to 4.3.3
holger@hoho.dyndns.org
parents:
diff changeset
19 "
ff022172f31a bump collectd to 4.3.3
holger@hoho.dyndns.org
parents:
diff changeset
20
ff022172f31a bump collectd to 4.3.3
holger@hoho.dyndns.org
parents:
diff changeset
21 DEPEND="
ff022172f31a bump collectd to 4.3.3
holger@hoho.dyndns.org
parents:
diff changeset
22 apache2? ( >=net-misc/curl-7.17.0 )
ff022172f31a bump collectd to 4.3.3
holger@hoho.dyndns.org
parents:
diff changeset
23 lighttpd? ( >=net-misc/curl-7.17.0 )
ff022172f31a bump collectd to 4.3.3
holger@hoho.dyndns.org
parents:
diff changeset
24 nginx? ( >=net-misc/curl-7.17.0 )
ff022172f31a bump collectd to 4.3.3
holger@hoho.dyndns.org
parents:
diff changeset
25 dns? ( >=net-libs/libpcap-0.9.8 )
ff022172f31a bump collectd to 4.3.3
holger@hoho.dyndns.org
parents:
diff changeset
26 qemu? ( >=app-emulation/libvirt-0.3.3 )
ff022172f31a bump collectd to 4.3.3
holger@hoho.dyndns.org
parents:
diff changeset
27 xen? ( >=app-emulation/libvirt-0.3.3 )
ff022172f31a bump collectd to 4.3.3
holger@hoho.dyndns.org
parents:
diff changeset
28 mysql? ( >=virtual/mysql-5.0 )
ff022172f31a bump collectd to 4.3.3
holger@hoho.dyndns.org
parents:
diff changeset
29 perl? ( >=dev-lang/perl-5.8.8-r4 )
ff022172f31a bump collectd to 4.3.3
holger@hoho.dyndns.org
parents:
diff changeset
30 nut? ( >=sys-power/nut-2.2.0 )
ff022172f31a bump collectd to 4.3.3
holger@hoho.dyndns.org
parents:
diff changeset
31 rrdtool? ( >=net-analyzer/rrdtool-1.2.27 )
ff022172f31a bump collectd to 4.3.3
holger@hoho.dyndns.org
parents:
diff changeset
32 lm_sensors? ( >=sys-apps/lm_sensors-2.10.4 )
ff022172f31a bump collectd to 4.3.3
holger@hoho.dyndns.org
parents:
diff changeset
33 snmp? ( >=net-analyzer/net-snmp-5.4.1-r3 )
ff022172f31a bump collectd to 4.3.3
holger@hoho.dyndns.org
parents:
diff changeset
34 hal? ( >=sys-apps/hal-0.5.9.1-r3 )
ff022172f31a bump collectd to 4.3.3
holger@hoho.dyndns.org
parents:
diff changeset
35 >=dev-libs/libxml2-2.6.31
ff022172f31a bump collectd to 4.3.3
holger@hoho.dyndns.org
parents:
diff changeset
36 "
ff022172f31a bump collectd to 4.3.3
holger@hoho.dyndns.org
parents:
diff changeset
37
ff022172f31a bump collectd to 4.3.3
holger@hoho.dyndns.org
parents:
diff changeset
38 RDEPEND="
ff022172f31a bump collectd to 4.3.3
holger@hoho.dyndns.org
parents:
diff changeset
39 ${DEPEND}
ff022172f31a bump collectd to 4.3.3
holger@hoho.dyndns.org
parents:
diff changeset
40 apcups? ( >=sys-power/apcupsd-3.14.2 )
ff022172f31a bump collectd to 4.3.3
holger@hoho.dyndns.org
parents:
diff changeset
41 hddtemp? ( >=app-admin/hddtemp-0.3_beta15-r3 )
ff022172f31a bump collectd to 4.3.3
holger@hoho.dyndns.org
parents:
diff changeset
42 memcache? ( >=net-misc/memcached-1.2.2-r2 )
ff022172f31a bump collectd to 4.3.3
holger@hoho.dyndns.org
parents:
diff changeset
43 ntp? ( >=net-misc/ntp-4.2.4_p4 )
ff022172f31a bump collectd to 4.3.3
holger@hoho.dyndns.org
parents:
diff changeset
44 syslog? ( virtual/logger )
ff022172f31a bump collectd to 4.3.3
holger@hoho.dyndns.org
parents:
diff changeset
45 !hal? ( >=sys-apps/dmidecode-2.9 )
ff022172f31a bump collectd to 4.3.3
holger@hoho.dyndns.org
parents:
diff changeset
46 "
ff022172f31a bump collectd to 4.3.3
holger@hoho.dyndns.org
parents:
diff changeset
47
ff022172f31a bump collectd to 4.3.3
holger@hoho.dyndns.org
parents:
diff changeset
48 pkg_setup()
ff022172f31a bump collectd to 4.3.3
holger@hoho.dyndns.org
parents:
diff changeset
49 {
ff022172f31a bump collectd to 4.3.3
holger@hoho.dyndns.org
parents:
diff changeset
50 linux-info_pkg_setup
ff022172f31a bump collectd to 4.3.3
holger@hoho.dyndns.org
parents:
diff changeset
51
ff022172f31a bump collectd to 4.3.3
holger@hoho.dyndns.org
parents:
diff changeset
52 if ( !(linux_chkconfig_present ACPI_BATTERY) ); then einfo
ff022172f31a bump collectd to 4.3.3
holger@hoho.dyndns.org
parents:
diff changeset
53 ewarn "ACPI_BATTERY needs to be enabled in your kernel for the battery plug-in to work correctly"; fi
ff022172f31a bump collectd to 4.3.3
holger@hoho.dyndns.org
parents:
diff changeset
54 if ( !(linux_chkconfig_present CPU_FREQ) ); then einfo
ff022172f31a bump collectd to 4.3.3
holger@hoho.dyndns.org
parents:
diff changeset
55 ewarn "CPU_FREQ needs to be enabled in your kernel for the cpufreq plug-in to work correctly"; fi
ff022172f31a bump collectd to 4.3.3
holger@hoho.dyndns.org
parents:
diff changeset
56 if ( !(linux_chkconfig_present SERIAL_CORE) ); then einfo
ff022172f31a bump collectd to 4.3.3
holger@hoho.dyndns.org
parents:
diff changeset
57 ewarn "SERIAL_CORE needs to be enabled in your kernel for the serial plug-in to work correctly"; fi
ff022172f31a bump collectd to 4.3.3
holger@hoho.dyndns.org
parents:
diff changeset
58 if ( !(linux_chkconfig_present SWAP) ); then einfo
ff022172f31a bump collectd to 4.3.3
holger@hoho.dyndns.org
parents:
diff changeset
59 ewarn "SWAP needs to be enabled in your kernel for the swap plug-in to work correctly"; fi
ff022172f31a bump collectd to 4.3.3
holger@hoho.dyndns.org
parents:
diff changeset
60 if ( (use vserver) && !(linux_chkconfig_present IP_VS) ); then einfo
ff022172f31a bump collectd to 4.3.3
holger@hoho.dyndns.org
parents:
diff changeset
61 ewarn "IP_VS should to be enabled in your kernel when the USE flag vserver is enabled"; fi
ff022172f31a bump collectd to 4.3.3
holger@hoho.dyndns.org
parents:
diff changeset
62 if (use qemu && !(built_with_use libvirt qemu) ); then
ff022172f31a bump collectd to 4.3.3
holger@hoho.dyndns.org
parents:
diff changeset
63 die "USE flag qemu requires that libvirt was compiled with the USE flag qemu"; fi
ff022172f31a bump collectd to 4.3.3
holger@hoho.dyndns.org
parents:
diff changeset
64 if (use xen && !(built_with_use libvirt xen) ); then
ff022172f31a bump collectd to 4.3.3
holger@hoho.dyndns.org
parents:
diff changeset
65 die "USE flag xen requires that libvirt was compiled with the USE flag xen"; fi
ff022172f31a bump collectd to 4.3.3
holger@hoho.dyndns.org
parents:
diff changeset
66
ff022172f31a bump collectd to 4.3.3
holger@hoho.dyndns.org
parents:
diff changeset
67 if (use perl); then
ff022172f31a bump collectd to 4.3.3
holger@hoho.dyndns.org
parents:
diff changeset
68 if (use ithreads); then
ff022172f31a bump collectd to 4.3.3
holger@hoho.dyndns.org
parents:
diff changeset
69 (built_with_use perl ithreads) \
ff022172f31a bump collectd to 4.3.3
holger@hoho.dyndns.org
parents:
diff changeset
70 || die "The perl plug-in requires that libperl was compiled with the USE flag ithreads"
ff022172f31a bump collectd to 4.3.3
holger@hoho.dyndns.org
parents:
diff changeset
71 else
ff022172f31a bump collectd to 4.3.3
holger@hoho.dyndns.org
parents:
diff changeset
72 einfo
ff022172f31a bump collectd to 4.3.3
holger@hoho.dyndns.org
parents:
diff changeset
73 ewarn "The perl plug-in requires the ithreads USE flag."
ff022172f31a bump collectd to 4.3.3
holger@hoho.dyndns.org
parents:
diff changeset
74 fi
ff022172f31a bump collectd to 4.3.3
holger@hoho.dyndns.org
parents:
diff changeset
75 fi
ff022172f31a bump collectd to 4.3.3
holger@hoho.dyndns.org
parents:
diff changeset
76 einfo
ff022172f31a bump collectd to 4.3.3
holger@hoho.dyndns.org
parents:
diff changeset
77
ff022172f31a bump collectd to 4.3.3
holger@hoho.dyndns.org
parents:
diff changeset
78 if ( !(linux_chkconfig_present PROC_FS) ); then
ff022172f31a bump collectd to 4.3.3
holger@hoho.dyndns.org
parents:
diff changeset
79 ## if ( use network ); then
ff022172f31a bump collectd to 4.3.3
holger@hoho.dyndns.org
parents:
diff changeset
80 ## die "${P} requires that PROC_FS is enabled in the kernel for the USE flag network"; fi
ff022172f31a bump collectd to 4.3.3
holger@hoho.dyndns.org
parents:
diff changeset
81 die "${P} requires that PROC_FS is enabled in your kernel" ## UPDATE LATER
ff022172f31a bump collectd to 4.3.3
holger@hoho.dyndns.org
parents:
diff changeset
82 fi
ff022172f31a bump collectd to 4.3.3
holger@hoho.dyndns.org
parents:
diff changeset
83
ff022172f31a bump collectd to 4.3.3
holger@hoho.dyndns.org
parents:
diff changeset
84 if ( !(use network) ); then
ff022172f31a bump collectd to 4.3.3
holger@hoho.dyndns.org
parents:
diff changeset
85 if ( use dns ); then die "The USE flag dns requires that the USE flag network is enabled"; fi
ff022172f31a bump collectd to 4.3.3
holger@hoho.dyndns.org
parents:
diff changeset
86 if ( use email ); then die "The USE flag email requires that the USE flag network is enabled"; fi
ff022172f31a bump collectd to 4.3.3
holger@hoho.dyndns.org
parents:
diff changeset
87 if ( use nfs ); then die "The USE flag nfs requires that the USE flag network is enabled"; fi
ff022172f31a bump collectd to 4.3.3
holger@hoho.dyndns.org
parents:
diff changeset
88 if ( use ntp ); then die "The USE flag ntp requires that the USE flag network is enabled"; fi
ff022172f31a bump collectd to 4.3.3
holger@hoho.dyndns.org
parents:
diff changeset
89 if ( use snmp ); then die "The USE flag snmp requires that the USE flag network is enabled"; fi
ff022172f31a bump collectd to 4.3.3
holger@hoho.dyndns.org
parents:
diff changeset
90 if ( use vserver ); then die "The USE flag vserver requires that the USE flag network is enabled"; fi
ff022172f31a bump collectd to 4.3.3
holger@hoho.dyndns.org
parents:
diff changeset
91 fi
ff022172f31a bump collectd to 4.3.3
holger@hoho.dyndns.org
parents:
diff changeset
92 }
ff022172f31a bump collectd to 4.3.3
holger@hoho.dyndns.org
parents:
diff changeset
93
ff022172f31a bump collectd to 4.3.3
holger@hoho.dyndns.org
parents:
diff changeset
94 src_unpack() {
ff022172f31a bump collectd to 4.3.3
holger@hoho.dyndns.org
parents:
diff changeset
95 if [ "${A}" != "" ]; then
ff022172f31a bump collectd to 4.3.3
holger@hoho.dyndns.org
parents:
diff changeset
96 unpack ${A}
ff022172f31a bump collectd to 4.3.3
holger@hoho.dyndns.org
parents:
diff changeset
97 fi
ff022172f31a bump collectd to 4.3.3
holger@hoho.dyndns.org
parents:
diff changeset
98
ff022172f31a bump collectd to 4.3.3
holger@hoho.dyndns.org
parents:
diff changeset
99 cd ${S}
ff022172f31a bump collectd to 4.3.3
holger@hoho.dyndns.org
parents:
diff changeset
100
ff022172f31a bump collectd to 4.3.3
holger@hoho.dyndns.org
parents:
diff changeset
101 sed -i -e '/^AC_PLUGIN/ s/\ [[].*[]],/[no],/' \
ff022172f31a bump collectd to 4.3.3
holger@hoho.dyndns.org
parents:
diff changeset
102 configure.in \
ff022172f31a bump collectd to 4.3.3
holger@hoho.dyndns.org
parents:
diff changeset
103 || die "sed no-automagic-patch failed"
ff022172f31a bump collectd to 4.3.3
holger@hoho.dyndns.org
parents:
diff changeset
104
ff022172f31a bump collectd to 4.3.3
holger@hoho.dyndns.org
parents:
diff changeset
105 eautoreconf \
ff022172f31a bump collectd to 4.3.3
holger@hoho.dyndns.org
parents:
diff changeset
106 || die "eautoreconf failed"
ff022172f31a bump collectd to 4.3.3
holger@hoho.dyndns.org
parents:
diff changeset
107 }
ff022172f31a bump collectd to 4.3.3
holger@hoho.dyndns.org
parents:
diff changeset
108
ff022172f31a bump collectd to 4.3.3
holger@hoho.dyndns.org
parents:
diff changeset
109 src_compile()
ff022172f31a bump collectd to 4.3.3
holger@hoho.dyndns.org
parents:
diff changeset
110 {
ff022172f31a bump collectd to 4.3.3
holger@hoho.dyndns.org
parents:
diff changeset
111 local myconf
ff022172f31a bump collectd to 4.3.3
holger@hoho.dyndns.org
parents:
diff changeset
112 local disabled_plugins
ff022172f31a bump collectd to 4.3.3
holger@hoho.dyndns.org
parents:
diff changeset
113
ff022172f31a bump collectd to 4.3.3
holger@hoho.dyndns.org
parents:
diff changeset
114 ### NEEDS TO BE FIXED PROBABLY
ff022172f31a bump collectd to 4.3.3
holger@hoho.dyndns.org
parents:
diff changeset
115 append-flags -I/usr/src/linux/include
ff022172f31a bump collectd to 4.3.3
holger@hoho.dyndns.org
parents:
diff changeset
116
ff022172f31a bump collectd to 4.3.3
holger@hoho.dyndns.org
parents:
diff changeset
117 if ( use apache2 || use lighttpd );
ff022172f31a bump collectd to 4.3.3
holger@hoho.dyndns.org
parents:
diff changeset
118 then myconf="${myconf} --enable-apache"; fi
ff022172f31a bump collectd to 4.3.3
holger@hoho.dyndns.org
parents:
diff changeset
119 myconf="${myconf} $(use_enable apcups)"
ff022172f31a bump collectd to 4.3.3
holger@hoho.dyndns.org
parents:
diff changeset
120 myconf="${myconf} --disable-apple_sensors" ## DISABLED
ff022172f31a bump collectd to 4.3.3
holger@hoho.dyndns.org
parents:
diff changeset
121 disabled_plugins="${disabled_plugins} apple_sensors"
ff022172f31a bump collectd to 4.3.3
holger@hoho.dyndns.org
parents:
diff changeset
122 myconf="${myconf} --enable-battery" ## Kernel check PROCFS
ff022172f31a bump collectd to 4.3.3
holger@hoho.dyndns.org
parents:
diff changeset
123 myconf="${myconf} --enable-cpu" ## PROCFS
ff022172f31a bump collectd to 4.3.3
holger@hoho.dyndns.org
parents:
diff changeset
124 myconf="${myconf} --enable-cpufreq" ## Kernel check SYSFS
ff022172f31a bump collectd to 4.3.3
holger@hoho.dyndns.org
parents:
diff changeset
125 myconf="${myconf} --enable-csv" ## no checks
ff022172f31a bump collectd to 4.3.3
holger@hoho.dyndns.org
parents:
diff changeset
126 myconf="${myconf} --enable-df" ## no checks
ff022172f31a bump collectd to 4.3.3
holger@hoho.dyndns.org
parents:
diff changeset
127 myconf="${myconf} --enable-disk" ## PROCFS
ff022172f31a bump collectd to 4.3.3
holger@hoho.dyndns.org
parents:
diff changeset
128 myconf="${myconf} $(use network && use_enable dns)"
ff022172f31a bump collectd to 4.3.3
holger@hoho.dyndns.org
parents:
diff changeset
129 myconf="${myconf} $(use network && use_enable email)"
ff022172f31a bump collectd to 4.3.3
holger@hoho.dyndns.org
parents:
diff changeset
130 myconf="${myconf} --enable-entropy" ## PROCFS
ff022172f31a bump collectd to 4.3.3
holger@hoho.dyndns.org
parents:
diff changeset
131 myconf="${myconf} --disable-exec" ## NEEDS USERS
ff022172f31a bump collectd to 4.3.3
holger@hoho.dyndns.org
parents:
diff changeset
132 disabled_plugins="${disabled_plugins} exec"
ff022172f31a bump collectd to 4.3.3
holger@hoho.dyndns.org
parents:
diff changeset
133 myconf="${myconf} $(use_enable hddtemp)" ## PROCFS
ff022172f31a bump collectd to 4.3.3
holger@hoho.dyndns.org
parents:
diff changeset
134 myconf="${myconf} $(use_enable network interface)" ## PROCFS
ff022172f31a bump collectd to 4.3.3
holger@hoho.dyndns.org
parents:
diff changeset
135 myconf="${myconf} --disable-iptables" ## BREAKS
ff022172f31a bump collectd to 4.3.3
holger@hoho.dyndns.org
parents:
diff changeset
136 disabled_plugins="${disabled_plugins} iptables"
ff022172f31a bump collectd to 4.3.3
holger@hoho.dyndns.org
parents:
diff changeset
137 myconf="${myconf} $(use network && use_enable vserver ipvs)" ## Kernel check NEEDS CFLAGS -I -- FIX LATER
ff022172f31a bump collectd to 4.3.3
holger@hoho.dyndns.org
parents:
diff changeset
138 myconf="${myconf} --enable-irq" ## PROCFS
ff022172f31a bump collectd to 4.3.3
holger@hoho.dyndns.org
parents:
diff changeset
139 if ( use qemu || use xen ); then ## NEEDS KERNEL CHECK
ff022172f31a bump collectd to 4.3.3
holger@hoho.dyndns.org
parents:
diff changeset
140 myconf="${myconf} --enable-libvirt"; fi
ff022172f31a bump collectd to 4.3.3
holger@hoho.dyndns.org
parents:
diff changeset
141 myconf="${myconf} --enable-load" ## PROCFS
ff022172f31a bump collectd to 4.3.3
holger@hoho.dyndns.org
parents:
diff changeset
142 myconf="${myconf} --enable-logfile" ## no checks
ff022172f31a bump collectd to 4.3.3
holger@hoho.dyndns.org
parents:
diff changeset
143 myconf="${myconf} --disable-mbmon" ## COULD NOT FIND DAEMON
ff022172f31a bump collectd to 4.3.3
holger@hoho.dyndns.org
parents:
diff changeset
144 disabled_plugins="${disabled_plugins} mbmon"
ff022172f31a bump collectd to 4.3.3
holger@hoho.dyndns.org
parents:
diff changeset
145 myconf="${myconf} $(use_enable memcache memcached)"
ff022172f31a bump collectd to 4.3.3
holger@hoho.dyndns.org
parents:
diff changeset
146 myconf="${myconf} --enable-memory" ## PROCFS
ff022172f31a bump collectd to 4.3.3
holger@hoho.dyndns.org
parents:
diff changeset
147 myconf="${myconf} --enable-multimeter"
ff022172f31a bump collectd to 4.3.3
holger@hoho.dyndns.org
parents:
diff changeset
148 myconf="${myconf} $(use_enable mysql)"
ff022172f31a bump collectd to 4.3.3
holger@hoho.dyndns.org
parents:
diff changeset
149 myconf="${myconf} --disable-netlink" ## BREAKS
ff022172f31a bump collectd to 4.3.3
holger@hoho.dyndns.org
parents:
diff changeset
150 disabled_plugins="${disabled_plugins} netlink"
ff022172f31a bump collectd to 4.3.3
holger@hoho.dyndns.org
parents:
diff changeset
151 myconf="${myconf} $(use_enable network)" ## NO PROCFS
ff022172f31a bump collectd to 4.3.3
holger@hoho.dyndns.org
parents:
diff changeset
152 myconf="${myconf} $(use network && use_enable nfs)" ## PROCFS
ff022172f31a bump collectd to 4.3.3
holger@hoho.dyndns.org
parents:
diff changeset
153 myconf="${myconf} $(use_enable nginx)"
ff022172f31a bump collectd to 4.3.3
holger@hoho.dyndns.org
parents:
diff changeset
154 myconf="${myconf} $(use network && use_enable ntp ntpd)"
ff022172f31a bump collectd to 4.3.3
holger@hoho.dyndns.org
parents:
diff changeset
155 myconf="${myconf} $(use_enable nut)"
ff022172f31a bump collectd to 4.3.3
holger@hoho.dyndns.org
parents:
diff changeset
156 myconf="${myconf} $(use ithreads && use_enable perl)"
ff022172f31a bump collectd to 4.3.3
holger@hoho.dyndns.org
parents:
diff changeset
157 myconf="${myconf} $(use_with perl perl-bindings)"
ff022172f31a bump collectd to 4.3.3
holger@hoho.dyndns.org
parents:
diff changeset
158 myconf="${myconf} $(use_enable network ping)"
ff022172f31a bump collectd to 4.3.3
holger@hoho.dyndns.org
parents:
diff changeset
159 myconf="${myconf} --enable-processes" ## PROCFS
ff022172f31a bump collectd to 4.3.3
holger@hoho.dyndns.org
parents:
diff changeset
160 myconf="${myconf} $(use_enable rrdtool)"
ff022172f31a bump collectd to 4.3.3
holger@hoho.dyndns.org
parents:
diff changeset
161 myconf="${myconf} $(use_enable lm_sensors sensors)"
ff022172f31a bump collectd to 4.3.3
holger@hoho.dyndns.org
parents:
diff changeset
162 myconf="${myconf} --enable-serial" ## Kernel check PROCFS
ff022172f31a bump collectd to 4.3.3
holger@hoho.dyndns.org
parents:
diff changeset
163 myconf="${myconf} $(use network && use_enable snmp)"
ff022172f31a bump collectd to 4.3.3
holger@hoho.dyndns.org
parents:
diff changeset
164 myconf="${myconf} --enable-swap" ## Kernel check PROCFS
ff022172f31a bump collectd to 4.3.3
holger@hoho.dyndns.org
parents:
diff changeset
165 myconf="${myconf} $(use_enable syslog)"
ff022172f31a bump collectd to 4.3.3
holger@hoho.dyndns.org
parents:
diff changeset
166 myconf="${myconf} --disable-tape" ## SOLARIS ???
ff022172f31a bump collectd to 4.3.3
holger@hoho.dyndns.org
parents:
diff changeset
167 disabled_plugins="${disabled_plugins} tape"
ff022172f31a bump collectd to 4.3.3
holger@hoho.dyndns.org
parents:
diff changeset
168 myconf="${myconf} $(use_enable network tcpconns)" ## PROCFS
ff022172f31a bump collectd to 4.3.3
holger@hoho.dyndns.org
parents:
diff changeset
169 myconf="${myconf} $(use_enable network unixsock)"
ff022172f31a bump collectd to 4.3.3
holger@hoho.dyndns.org
parents:
diff changeset
170 myconf="${myconf} --enable-users"
ff022172f31a bump collectd to 4.3.3
holger@hoho.dyndns.org
parents:
diff changeset
171 myconf="${myconf} --enable-uuid" ## Depends on hal or dmidecode PROCFS
ff022172f31a bump collectd to 4.3.3
holger@hoho.dyndns.org
parents:
diff changeset
172 myconf="${myconf} $(use network && use_enable vserver)" ## PROCFS
ff022172f31a bump collectd to 4.3.3
holger@hoho.dyndns.org
parents:
diff changeset
173 myconf="${myconf} $(use_enable network wireless)" ## NEEDS KERNEL CHECK ## PROCFS
ff022172f31a bump collectd to 4.3.3
holger@hoho.dyndns.org
parents:
diff changeset
174 myconf="${myconf} --disable-xmms" ## NOT IN GENTOO
ff022172f31a bump collectd to 4.3.3
holger@hoho.dyndns.org
parents:
diff changeset
175 disabled_plugins="${disabled_plugins} xmms"
ff022172f31a bump collectd to 4.3.3
holger@hoho.dyndns.org
parents:
diff changeset
176
ff022172f31a bump collectd to 4.3.3
holger@hoho.dyndns.org
parents:
diff changeset
177 einfo
ff022172f31a bump collectd to 4.3.3
holger@hoho.dyndns.org
parents:
diff changeset
178 elog "The following plug-ins have been disabled in the ebuild"
ff022172f31a bump collectd to 4.3.3
holger@hoho.dyndns.org
parents:
diff changeset
179 elog ${disabled_plugins}
ff022172f31a bump collectd to 4.3.3
holger@hoho.dyndns.org
parents:
diff changeset
180 einfo
ff022172f31a bump collectd to 4.3.3
holger@hoho.dyndns.org
parents:
diff changeset
181
ff022172f31a bump collectd to 4.3.3
holger@hoho.dyndns.org
parents:
diff changeset
182 ### Configure
ff022172f31a bump collectd to 4.3.3
holger@hoho.dyndns.org
parents:
diff changeset
183 econf \
ff022172f31a bump collectd to 4.3.3
holger@hoho.dyndns.org
parents:
diff changeset
184 ${myconf} \
ff022172f31a bump collectd to 4.3.3
holger@hoho.dyndns.org
parents:
diff changeset
185 --localstatedir=/var \
ff022172f31a bump collectd to 4.3.3
holger@hoho.dyndns.org
parents:
diff changeset
186 || die "econf failed"
ff022172f31a bump collectd to 4.3.3
holger@hoho.dyndns.org
parents:
diff changeset
187
ff022172f31a bump collectd to 4.3.3
holger@hoho.dyndns.org
parents:
diff changeset
188 ### Build
ff022172f31a bump collectd to 4.3.3
holger@hoho.dyndns.org
parents:
diff changeset
189 emake \
ff022172f31a bump collectd to 4.3.3
holger@hoho.dyndns.org
parents:
diff changeset
190 || die "emake failed"
ff022172f31a bump collectd to 4.3.3
holger@hoho.dyndns.org
parents:
diff changeset
191 }
ff022172f31a bump collectd to 4.3.3
holger@hoho.dyndns.org
parents:
diff changeset
192
ff022172f31a bump collectd to 4.3.3
holger@hoho.dyndns.org
parents:
diff changeset
193 src_install()
ff022172f31a bump collectd to 4.3.3
holger@hoho.dyndns.org
parents:
diff changeset
194 {
ff022172f31a bump collectd to 4.3.3
holger@hoho.dyndns.org
parents:
diff changeset
195 emake \
ff022172f31a bump collectd to 4.3.3
holger@hoho.dyndns.org
parents:
diff changeset
196 DESTDIR="${D}" \
ff022172f31a bump collectd to 4.3.3
holger@hoho.dyndns.org
parents:
diff changeset
197 install || die "emake install failed"
ff022172f31a bump collectd to 4.3.3
holger@hoho.dyndns.org
parents:
diff changeset
198
ff022172f31a bump collectd to 4.3.3
holger@hoho.dyndns.org
parents:
diff changeset
199 ### Documentation
ff022172f31a bump collectd to 4.3.3
holger@hoho.dyndns.org
parents:
diff changeset
200 dodoc AUTHORS ChangeLog NEWS README TODO \
ff022172f31a bump collectd to 4.3.3
holger@hoho.dyndns.org
parents:
diff changeset
201 || die "dodoc failed"
ff022172f31a bump collectd to 4.3.3
holger@hoho.dyndns.org
parents:
diff changeset
202
ff022172f31a bump collectd to 4.3.3
holger@hoho.dyndns.org
parents:
diff changeset
203 docinto contrib/SpamAssassin
ff022172f31a bump collectd to 4.3.3
holger@hoho.dyndns.org
parents:
diff changeset
204 dodoc contrib/SpamAssassin/* \
ff022172f31a bump collectd to 4.3.3
holger@hoho.dyndns.org
parents:
diff changeset
205 || die "dodoc contrib failed"
ff022172f31a bump collectd to 4.3.3
holger@hoho.dyndns.org
parents:
diff changeset
206
ff022172f31a bump collectd to 4.3.3
holger@hoho.dyndns.org
parents:
diff changeset
207 docinto contrib/examples
ff022172f31a bump collectd to 4.3.3
holger@hoho.dyndns.org
parents:
diff changeset
208 dodoc contrib/examples/* \
ff022172f31a bump collectd to 4.3.3
holger@hoho.dyndns.org
parents:
diff changeset
209 || die "dodoc contrib failed"
ff022172f31a bump collectd to 4.3.3
holger@hoho.dyndns.org
parents:
diff changeset
210
ff022172f31a bump collectd to 4.3.3
holger@hoho.dyndns.org
parents:
diff changeset
211 docinto contrib/iptables
ff022172f31a bump collectd to 4.3.3
holger@hoho.dyndns.org
parents:
diff changeset
212 dodoc contrib/iptables/* \
ff022172f31a bump collectd to 4.3.3
holger@hoho.dyndns.org
parents:
diff changeset
213 || die "dodoc contrib failed"
ff022172f31a bump collectd to 4.3.3
holger@hoho.dyndns.org
parents:
diff changeset
214 docinto contrib
ff022172f31a bump collectd to 4.3.3
holger@hoho.dyndns.org
parents:
diff changeset
215
ff022172f31a bump collectd to 4.3.3
holger@hoho.dyndns.org
parents:
diff changeset
216 docinto contrib
ff022172f31a bump collectd to 4.3.3
holger@hoho.dyndns.org
parents:
diff changeset
217 dodoc contrib/README contrib/*\.[a-z]* \
ff022172f31a bump collectd to 4.3.3
holger@hoho.dyndns.org
parents:
diff changeset
218 || die "dodoc contrib failed"
ff022172f31a bump collectd to 4.3.3
holger@hoho.dyndns.org
parents:
diff changeset
219
ff022172f31a bump collectd to 4.3.3
holger@hoho.dyndns.org
parents:
diff changeset
220
ff022172f31a bump collectd to 4.3.3
holger@hoho.dyndns.org
parents:
diff changeset
221 keepdir /var/lib/collectd \
ff022172f31a bump collectd to 4.3.3
holger@hoho.dyndns.org
parents:
diff changeset
222 || die "keepdir failed"
ff022172f31a bump collectd to 4.3.3
holger@hoho.dyndns.org
parents:
diff changeset
223
ff022172f31a bump collectd to 4.3.3
holger@hoho.dyndns.org
parents:
diff changeset
224 newinitd "${FILESDIR}/${PN}-4.3.2.initd" ${PN} \
ff022172f31a bump collectd to 4.3.3
holger@hoho.dyndns.org
parents:
diff changeset
225 || die "newinitd failed"
ff022172f31a bump collectd to 4.3.3
holger@hoho.dyndns.org
parents:
diff changeset
226
ff022172f31a bump collectd to 4.3.3
holger@hoho.dyndns.org
parents:
diff changeset
227 newconfd "${FILESDIR}/${PN}-4.3.2.confd" ${PN} \
ff022172f31a bump collectd to 4.3.3
holger@hoho.dyndns.org
parents:
diff changeset
228 || die "newconfd failed"
ff022172f31a bump collectd to 4.3.3
holger@hoho.dyndns.org
parents:
diff changeset
229 }
ff022172f31a bump collectd to 4.3.3
holger@hoho.dyndns.org
parents:
diff changeset
230
ff022172f31a bump collectd to 4.3.3
holger@hoho.dyndns.org
parents:
diff changeset
231 pkg_postinst()
ff022172f31a bump collectd to 4.3.3
holger@hoho.dyndns.org
parents:
diff changeset
232 {
ff022172f31a bump collectd to 4.3.3
holger@hoho.dyndns.org
parents:
diff changeset
233 einfo
ff022172f31a bump collectd to 4.3.3
holger@hoho.dyndns.org
parents:
diff changeset
234 einfo "collectd introduced some changes in the new 4.x series."
ff022172f31a bump collectd to 4.3.3
holger@hoho.dyndns.org
parents:
diff changeset
235 einfo "For further information, read http://collectd.org/migrate-v3-v4.shtml"
ff022172f31a bump collectd to 4.3.3
holger@hoho.dyndns.org
parents:
diff changeset
236 einfo "The migration script can be found at:"
ff022172f31a bump collectd to 4.3.3
holger@hoho.dyndns.org
parents:
diff changeset
237 einfo "/usr/share/doc/${P}/contrib/migrate-3-4.px.bz2"
ff022172f31a bump collectd to 4.3.3
holger@hoho.dyndns.org
parents:
diff changeset
238 einfo
ff022172f31a bump collectd to 4.3.3
holger@hoho.dyndns.org
parents:
diff changeset
239 }