annotate app-admin/collectd/collectd-4.3.2.ebuild @ 13:85e343e4f152

mod_wsgi is upstream
author holger@hoho.dyndns.org
date Sat, 19 Apr 2008 17:21:37 +0200
parents df0553df6852
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
9
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
1 # Copyright 1999-2008 Gentoo Foundation
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
2 # Distributed under the terms of the GNU General Public License v2
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
3 # $Header: $
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
4
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
5 inherit eutils linux-info flag-o-matic
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
6
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
7 DESCRIPTION="A small daemon which collects system performance statistics"
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
8 HOMEPAGE="http://collectd.org/"
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
9
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
10 SRC_URI="${HOMEPAGE}/files/${P}.tar.bz2"
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
11 LICENSE="GPL-2"
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
12
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
13 SLOT="0"
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
14
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
15 KEYWORDS="~x86 ~amd64"
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
16 IUSE="
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
17 apache2
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
18 lighttpd
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
19 nginx
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
20 apcups
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
21 hddtemp
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
22 network
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
23 dns
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
24 email
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
25 qemu
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
26 xen
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
27 vserver
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
28 memcache
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
29 mysql
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
30 nfs
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
31 ntp
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
32 nut
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
33 perl
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
34 rrdtool
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
35 lm_sensors
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
36 snmp
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
37 syslog
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
38 hal
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
39 ithreads
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
40 "
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
41
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
42 DEPEND="
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
43 apache2? ( >=net-misc/curl-7.17.0 )
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
44 lighttpd? ( >=net-misc/curl-7.17.0 )
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
45 nginx? ( >=net-misc/curl-7.17.0 )
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
46 dns? ( >=net-libs/libpcap-0.9.8 )
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
47 qemu? ( >=app-emulation/libvirt-0.3.3 )
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
48 xen? ( >=app-emulation/libvirt-0.3.3 )
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
49 mysql? ( >=virtual/mysql-5.0 )
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
50 perl? ( >=dev-lang/perl-5.8.8-r4 )
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
51 nut? ( >=sys-power/nut-2.2.0 )
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
52 rrdtool? ( >=net-analyzer/rrdtool-1.2.27 )
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
53 lm_sensors? ( >=sys-apps/lm_sensors-2.10.4 )
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
54 snmp? ( >=net-analyzer/net-snmp-5.4.1-r3 )
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
55 hal? ( >=sys-apps/hal-0.5.9.1-r3 )
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
56
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
57 >=dev-libs/libxml2-2.6.31
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
58 "
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
59
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
60 RDEPEND="
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
61 ${DEPEND}
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
62 apcups? ( >=sys-power/apcupsd-3.14.2 )
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
63 hddtemp? ( >=app-admin/hddtemp-0.3_beta15-r3 )
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
64 memcache? ( >=net-misc/memcached-1.2.2-r2 )
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
65 ntp? ( >=net-misc/ntp-4.2.4_p4 )
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
66 syslog? ( virtual/logger )
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
67 !hal? ( >=sys-apps/dmidecode-2.9 )
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
68 "
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
69
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
70 pkg_setup()
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
71 {
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
72 linux-info_pkg_setup
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
73 }
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
74
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
75 src_compile()
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
76 {
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
77 local myconf
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
78 local disabled_plugins
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
79
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
80 ### NEEDS TO BE FIXED PROBABLY
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
81 append-flags -I/usr/src/linux/include
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
82
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
83 #################################################
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
84
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
85 myconf="${myconf}
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
86 --without-libiptc
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
87 --with-liboconfig
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
88 --with-libpthread
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
89 --without-libstatgrab
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
90 --without-libxmms
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
91 "
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
92
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
93 ### no checks
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
94 myconf="${myconf} --enable-csv"
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
95 myconf="${myconf} --enable-df"
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
96 myconf="${myconf} --enable-logfile"
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
97 myconf="${myconf} --enable-uuid" ## Depends on hal or dmidecode
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
98
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
99 ### procfs dependents
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
100 if ( linux_chkconfig_present PROC_FS ); then
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
101 myconf="${myconf} --enable-battery"
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
102 if ( !(linux_chkconfig_present ACPI_BATTERY) ); then
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
103 ewarn "ACPI_BATTERY needs to be enabled in your kernel for the battery plug-in to work correctly"
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
104 fi
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
105 myconf="${myconf} --enable-cpu"
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
106 myconf="${myconf} --enable-cpufreq"
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
107 if ( !(linux_chkconfig_present CPU_FREQ) ); then
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
108 ewarn "CPU_FREQ needs to be enabled in your kernel for the cpufreq plug-in to work correctly"
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
109 fi
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
110 myconf="${myconf} --enable-disk"
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
111 myconf="${myconf} --enable-entropy"
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
112 myconf="${myconf} --enable-irq"
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
113 myconf="${myconf} --enable-load"
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
114 myconf="${myconf} --enable-memory"
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
115 myconf="${myconf} --enable-processes"
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
116 myconf="${myconf} --enable-serial"
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
117 if ( !(linux_chkconfig_present SERIAL_CORE) ); then
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
118 ewarn "SERIAL_CORE needs to be enabled in your kernel for the serial plug-in to work correctly"
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
119 fi
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
120 myconf="${myconf} --enable-swap"
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
121 if ( !(linux_chkconfig_present SWAP) ); then
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
122 ewarn "SWAP needs to be enabled in your kernel for the swap plug-in to work correctly"
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
123 fi
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
124 myconf="${myconf} --enable-users"
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
125
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
126 ### Network
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
127 myconf="${myconf} $(use_enable network interface)"
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
128 #myconf="${myconf} $(use_enable network netlink) $(use_with network libnetlink)" ## BREAKS
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
129 myconf="${myconf} --disable-netlink --without-libnetlink"
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
130 disabled_plugins="${disabled_plugins} netlink"
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
131 myconf="${myconf} $(use_enable network)"
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
132 myconf="${myconf} $(use_enable network ping) $(use_with network liboping)"
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
133 myconf="${myconf} $(use_enable network tcpconns)"
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
134 myconf="${myconf} $(use_enable network unixsock)"
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
135 myconf="${myconf} $(use_enable network wireless)" ## NEEDS KERNEL CHECK
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
136
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
137 if ( use network ); then
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
138 myconf="${myconf} $(use_enable dns) $(use_with dns libpcap)"
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
139 myconf="${myconf} $(use_enable nfs)"
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
140 myconf="${myconf} $(use_enable ntp ntpd)"
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
141 myconf="${myconf} $(use_enable snmp) $(use_with snmp libnetsnmp)"
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
142 myconf="${myconf} $(use_enable vserver)"
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
143 myconf="${myconf} $(use_enable vserver ipvs)" #NEEDS CFLAGS -I -- FIX LATER
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
144 if ( (use vserver) && !(linux_chkconfig_present IP_VS) ); then
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
145 ewarn "IP_VS should to be enabled in your kernel when the USE flag vserver is enabled"
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
146 fi
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
147 else
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
148 myconf="${myconf} \
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
149 --disable-dns --without-libpcap
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
150 --disable-nfs
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
151 --disable-ntpd
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
152 --disable-snmp
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
153 --disable-vserver
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
154 --disable-ipvs
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
155 "
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
156 if ( use dns ); then die "The USE flag dns requires that the USE flag network is enabled"; fi
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
157 if ( use nfs ); then die "The USE flag nfs requires that the USE flag network is enabled"; fi
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
158 if ( use ntp ); then die "The USE flag ntp requires that the USE flag network is enabled"; fi
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
159 if ( use snmp ); then die "The USE flag snmp requires that the USE flag network is enabled"; fi
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
160 if ( use vserver ); then die "The USE flag vserver requires that the USE flag network is enabled"; fi
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
161 fi
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
162 else
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
163 ### Network
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
164 ## if ( use network ); then die "${P} requires that PROC_FS is enabled in the kernel for the USE flag network"; fi
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
165
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
166 die "${P} requires that PROC_FS is enabled in your kernel" ## UPDATE LATER
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
167 fi
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
168
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
169 ### Web Servers
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
170 if ( use apache2 || use lighttpd || use nginx );
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
171 then myconf="${myconf} --with-libcurl"
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
172 else myconf="${myconf} --without-libcurl"
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
173 fi
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
174
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
175 if ( use apache2 || use lighttpd );
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
176 then myconf="${myconf} --enable-apache"
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
177 else myconf="${myconf} --disable-apache"
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
178 fi
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
179
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
180 myconf="${myconf} $(use_enable nginx)"
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
181
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
182 ### APC UPS
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
183 myconf="${myconf} $(use_enable apcups)"
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
184
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
185 ### Apple
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
186 myconf="${myconf} --disable-apple_sensors" ## DISABLED
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
187 disabled_plugins="${disabled_plugins} apple_sensors"
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
188
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
189 ### Email
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
190 myconf="${myconf} $(use_enable email)"
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
191
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
192 ### hddtemp
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
193 myconf="${myconf} $(use_enable hddtemp)"
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
194
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
195 ### Virtualization -- NEEDS KERNEL CHECK
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
196 if ( use qemu || use xen )
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
197 then
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
198 myconf="${myconf} --enable-libvirt";
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
199 if (built_with_use libvirt qemu); then die "USE flag qemu requires that libvirt was compiled with the USE flag qemu"; fi
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
200 if (built_with_use libvirt xen); then die "USE flag xen requires that libvirt was compiled with the USE flag xen"; fi
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
201 else
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
202 myconf="${myconf} --disable-libvirt";
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
203 fi
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
204
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
205 ### Memcached
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
206 myconf="${myconf} $(use_enable memcache memcached)"
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
207
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
208 ### Mysql
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
209 myconf="${myconf} $(use_enable mysql) $(use_with mysql libmysql)"
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
210
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
211 ### Network UPS
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
212 myconf="${myconf} $(use_enable nut) $(use_with nut libupsclient)"
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
213
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
214 ### Perl
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
215 if (use perl); then
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
216 myconf="${myconf} $(use_with perl libperl)"
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
217 myconf="${myconf} $(use_with perl perl-bindings)"
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
218 if (use ithreads); then
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
219 if (built_with_use perl ithreads); then myconf="${myconf} --enable-perl"
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
220 else die "The perl plug-in requires that libperl was compiled with the USE flag ithreads"; fi
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
221 else
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
222 myconf="${myconf} --disable-perl"
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
223 einfo
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
224 einfo "The perl plug-in requires the ithreads USE flag."
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
225 fi
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
226
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
227 fi
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
228
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
229 ### RRDtool
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
230 myconf="${myconf} $(use_enable rrdtool) $(use_with rrdtool)"
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
231
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
232 ### lm_sensors
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
233 myconf="${myconf} $(use_enable lm_sensors sensors) $(use_with lm_sensors lm-sensors)"
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
234
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
235 ### Syslog
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
236 myconf="${myconf} $(use_enable syslog)"
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
237
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
238 ### DISABLED
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
239 myconf="${myconf} --disable-exec" ## NEEDS USERS
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
240 disabled_plugins="${disabled_plugins} exec"
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
241 myconf="${myconf} --disable-iptables" ## BREAKS
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
242 disabled_plugins="${disabled_plugins} iptables"
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
243 myconf="${myconf} --disable-mbmon" ## COULD NOT FIND DAEMON
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
244 disabled_plugins="${disabled_plugins} mbmon"
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
245 myconf="${myconf} --disable-multimeter" ## DISABLED
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
246 disabled_plugins="${disabled_plugins} multimeter"
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
247 myconf="${myconf} --disable-tape" ## SOLARIS ???
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
248 disabled_plugins="${disabled_plugins} tape"
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
249 myconf="${myconf} --disable-xmms" ## NOT IN GENTOO
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
250 disabled_plugins="${disabled_plugins} xmms"
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
251
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
252 einfo
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
253 einfo "The following plug-ins have been disabled in the ebuild"
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
254 einfo ${disabled_plugins}
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
255 einfo
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
256
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
257 ### Configure
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
258 econf \
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
259 ${myconf} \
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
260 --localstatedir=/var \
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
261 || die "econf failed"
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
262
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
263 ### Build
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
264 emake \
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
265 || die "emake failed"
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
266 }
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
267
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
268 src_install()
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
269 {
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
270 emake \
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
271 DESTDIR="${D}" \
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
272 install || die "emake install failed"
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
273
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
274 ### Documentation
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
275 docinto contrib/SpamAssassin
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
276 dodoc contrib/SpamAssassin/* \
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
277 || die "dodoc contrib failed"
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
278
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
279 docinto contrib/examples
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
280 dodoc contrib/examples/* \
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
281 || die "dodoc contrib failed"
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
282
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
283 docinto contrib/iptables
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
284 dodoc contrib/iptables/* \
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
285 || die "dodoc contrib failed"
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
286 docinto contrib
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
287
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
288 docinto contrib
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
289 dodoc contrib/README contrib/*\.[a-z]* \
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
290 || die "dodoc contrib failed"
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
291
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
292 dodoc AUTHORS ChangeLog NEWS README TODO \
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
293 || die "dodoc failed"
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
294
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
295
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
296 keepdir /var/lib/collectd \
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
297 || die "keepdir failed"
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
298
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
299 newinitd "${FILESDIR}/${P}.initd" collectd \
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
300 || die "newinitd failed"
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
301
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
302 newconfd "${FILESDIR}/${P}.confd" collectd \
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
303 || die "newconfd failed"
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
304 }
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
305
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
306 pkg_postinst()
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
307 {
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
308 einfo
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
309 einfo "collectd introduced some changes in the new 4.x series."
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
310 einfo "For further information, read http://collectd.org/migrate-v3-v4.shtml"
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
311 einfo "The migration script can be found at:"
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
312 einfo "/usr/share/doc/${P}/contrib/migrate-3-4.px.bz2"
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
313 einfo
df0553df6852 update collectd to 4.3.2
holger@hoho.dyndns.org
parents:
diff changeset
314 }