annotate app-admin/collectd/collectd-4.3.1.ebuild @ 2:0ea7846e04f1

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