1 |
dertobi123 10/09/02 20:44:35 |
2 |
|
3 |
Modified: ChangeLog |
4 |
Added: nagios-core-3.2.2.ebuild |
5 |
Log: |
6 |
Version bump |
7 |
|
8 |
(Portage version: 2.2_rc73/cvs/Linux x86_64) |
9 |
|
10 |
Revision Changes Path |
11 |
1.166 net-analyzer/nagios-core/ChangeLog |
12 |
|
13 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-analyzer/nagios-core/ChangeLog?rev=1.166&view=markup |
14 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-analyzer/nagios-core/ChangeLog?rev=1.166&content-type=text/plain |
15 |
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-analyzer/nagios-core/ChangeLog?r1=1.165&r2=1.166 |
16 |
|
17 |
Index: ChangeLog |
18 |
=================================================================== |
19 |
RCS file: /var/cvsroot/gentoo-x86/net-analyzer/nagios-core/ChangeLog,v |
20 |
retrieving revision 1.165 |
21 |
retrieving revision 1.166 |
22 |
diff -u -r1.165 -r1.166 |
23 |
--- ChangeLog 23 Jul 2010 12:14:43 -0000 1.165 |
24 |
+++ ChangeLog 2 Sep 2010 20:44:35 -0000 1.166 |
25 |
@@ -1,6 +1,12 @@ |
26 |
# ChangeLog for net-analyzer/nagios-core |
27 |
# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2 |
28 |
-# $Header: /var/cvsroot/gentoo-x86/net-analyzer/nagios-core/ChangeLog,v 1.165 2010/07/23 12:14:43 klausman Exp $ |
29 |
+# $Header: /var/cvsroot/gentoo-x86/net-analyzer/nagios-core/ChangeLog,v 1.166 2010/09/02 20:44:35 dertobi123 Exp $ |
30 |
+ |
31 |
+*nagios-core-3.2.2 (02 Sep 2010) |
32 |
+ |
33 |
+ 02 Sep 2010; Tobias Scherbaum <dertobi123@g.o> |
34 |
+ +nagios-core-3.2.2.ebuild: |
35 |
+ Version bump |
36 |
|
37 |
23 Jul 2010; Tobias Klausmann <klausman@g.o> |
38 |
nagios-core-3.2.1.ebuild: |
39 |
|
40 |
|
41 |
|
42 |
1.1 net-analyzer/nagios-core/nagios-core-3.2.2.ebuild |
43 |
|
44 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-analyzer/nagios-core/nagios-core-3.2.2.ebuild?rev=1.1&view=markup |
45 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-analyzer/nagios-core/nagios-core-3.2.2.ebuild?rev=1.1&content-type=text/plain |
46 |
|
47 |
Index: nagios-core-3.2.2.ebuild |
48 |
=================================================================== |
49 |
# Copyright 1999-2010 Gentoo Foundation |
50 |
# Distributed under the terms of the GNU General Public License v2 |
51 |
# $Header: /var/cvsroot/gentoo-x86/net-analyzer/nagios-core/nagios-core-3.2.2.ebuild,v 1.1 2010/09/02 20:44:35 dertobi123 Exp $ |
52 |
|
53 |
EAPI="2" |
54 |
|
55 |
inherit eutils depend.apache toolchain-funcs |
56 |
|
57 |
MY_P=${PN/-core}-${PV} |
58 |
DESCRIPTION="Nagios Core - Check daemon, CGIs, docs" |
59 |
HOMEPAGE="http://www.nagios.org/" |
60 |
SRC_URI="mirror://sourceforge/nagios/${MY_P}.tar.gz" |
61 |
|
62 |
LICENSE="GPL-2" |
63 |
SLOT="0" |
64 |
KEYWORDS="~alpha ~amd64 ~ppc ~ppc64 ~sparc ~x86" |
65 |
IUSE="debug lighttpd perl +web vim-syntax" |
66 |
DEPEND="virtual/mailx |
67 |
web? ( |
68 |
>=media-libs/gd-1.8.3-r5[jpeg,png] |
69 |
lighttpd? ( www-servers/lighttpd dev-lang/php[cgi] ) |
70 |
apache2? ( || ( dev-lang/php[apache2] dev-lang/php[cgi] ) ) |
71 |
) |
72 |
perl? ( >=dev-lang/perl-5.6.1-r7 )" |
73 |
RDEPEND="${DEPEND} |
74 |
vim-syntax? ( app-vim/nagios-syntax )" |
75 |
|
76 |
want_apache2 |
77 |
|
78 |
S="${WORKDIR}/${MY_P}" |
79 |
|
80 |
pkg_setup() { |
81 |
depend.apache_pkg_setup |
82 |
|
83 |
enewgroup nagios |
84 |
enewuser nagios -1 /bin/bash /var/nagios/home nagios |
85 |
} |
86 |
|
87 |
src_prepare() { |
88 |
local strip="$(echo '$(MAKE) strip-post-install')" |
89 |
sed -i -e "s:${strip}::" {cgi,base}/Makefile.in || die "sed failed in Makefile.in" |
90 |
} |
91 |
|
92 |
src_configure() { |
93 |
local myconf |
94 |
|
95 |
if use perl ; then |
96 |
myconf="${myconf} --enable-embedded-perl --with-perlcache" |
97 |
fi |
98 |
|
99 |
if use debug; then |
100 |
myconf="${myconf} --enable-DEBUG0" |
101 |
myconf="${myconf} --enable-DEBUG1" |
102 |
myconf="${myconf} --enable-DEBUG2" |
103 |
myconf="${myconf} --enable-DEBUG3" |
104 |
myconf="${myconf} --enable-DEBUG4" |
105 |
myconf="${myconf} --enable-DEBUG5" |
106 |
fi |
107 |
|
108 |
if use !apache2 && use !lighttpd ; then |
109 |
myconf="${myconf} --with-command-group=nagios" |
110 |
else |
111 |
if use apache2 ; then |
112 |
myconf="${myconf} --with-command-group=apache" |
113 |
myconf="${myconf} --with-httpd-conf=/etc/apache2/conf.d" |
114 |
elif use lighttpd ; then |
115 |
myconf="${myconf} --with-command-group=lighttpd" |
116 |
fi |
117 |
fi |
118 |
|
119 |
econf ${myconf} \ |
120 |
--prefix=/usr \ |
121 |
--bindir=/usr/sbin \ |
122 |
--sbindir=/usr/$(get_libdir)/nagios/cgi-bin \ |
123 |
--datadir=/usr/share/nagios/htdocs \ |
124 |
--localstatedir=/var/nagios \ |
125 |
--sysconfdir=/etc/nagios \ |
126 |
--libexecdir=/usr/$(get_libdir)/nagios/plugins \ |
127 |
|| die "./configure failed" |
128 |
} |
129 |
|
130 |
src_compile() { |
131 |
emake CC=$(tc-getCC) nagios || die "make failed" |
132 |
|
133 |
if use web ; then |
134 |
# Only compile the CGI's if "web" useflag is set. |
135 |
emake CC=$(tc-getCC) DESTDIR="${D}" cgis || die |
136 |
fi |
137 |
} |
138 |
|
139 |
src_install() { |
140 |
dodoc Changelog INSTALLING LEGAL README UPGRADING |
141 |
|
142 |
if ! use web ; then |
143 |
sed -i -e 's/cd $(SRC_CGI) && $(MAKE) $@/# line removed due missing web use flag/' \ |
144 |
-e 's/cd $(SRC_HTM) && $(MAKE) $@/# line removed due missing web use flag/' \ |
145 |
Makefile |
146 |
fi |
147 |
|
148 |
sed -i -e 's/^contactgroups$//g' Makefile |
149 |
|
150 |
emake DESTDIR="${D}" install |
151 |
emake DESTDIR="${D}" install-config |
152 |
emake DESTDIR="${D}" install-commandmode |
153 |
|
154 |
newinitd "${FILESDIR}"/nagios3 nagios |
155 |
newconfd "${FILESDIR}"/conf.d nagios |
156 |
|
157 |
# Apache Module |
158 |
if use web ; then |
159 |
if use apache2 ; then |
160 |
insinto "${APACHE_MODULES_CONFDIR}" |
161 |
doins "${FILESDIR}"/99_nagios3.conf |
162 |
elif use lighttpd ; then |
163 |
insinto /etc/lighttpd |
164 |
newins "${FILESDIR}/lighttpd_nagios3-r1.conf" nagios.conf |
165 |
else |
166 |
ewarn "${CATEGORY}/${PF} only supports Apache-2.x or Lighttpd webserver" |
167 |
ewarn "out-of-the-box. Since you are not using one of them, you" |
168 |
ewarn "have to configure your webserver accordingly yourself." |
169 |
fi |
170 |
|
171 |
fi |
172 |
|
173 |
for dir in etc/nagios var/nagios ; do |
174 |
chown -R nagios:nagios "${D}/${dir}" || die "Failed chown of ${D}/${dir}" |
175 |
done |
176 |
|
177 |
chown -R root:root "${D}"/usr/$(get_libdir)/nagios |
178 |
find "${D}"/usr/$(get_libdir)/nagios -type d -print0 | xargs -0 chmod 755 |
179 |
find "${D}"/usr/$(get_libdir)/nagios/cgi-bin -type f -print0 | xargs -0 chmod 755 |
180 |
|
181 |
keepdir /etc/nagios |
182 |
keepdir /var/nagios |
183 |
keepdir /var/nagios/archives |
184 |
keepdir /var/nagios/rw |
185 |
keepdir /var/nagios/spool/checkresults |
186 |
|
187 |
if use !apache2 && use !lighttpd; then |
188 |
chown -R nagios:nagios "${D}"/var/nagios/rw || die "Failed chown of ${D}/var/nagios/rw" |
189 |
else |
190 |
if use apache2 ; then |
191 |
chown -R nagios:apache "${D}"/var/nagios/rw || die "Failed chown of ${D}/var/nagios/rw" |
192 |
elif use lighttpd ; then |
193 |
chown -R nagios:lighttpd "${D}"/var/nagios/rw || die "Failed chown of ${D}/var/nagios/rw" |
194 |
fi |
195 |
fi |
196 |
|
197 |
chmod ug+s "${D}"/var/nagios/rw || die "Failed Chmod of ${D}/var/nagios/rw" |
198 |
chmod 0750 "${D}"/etc/nagios || die "Failed chmod of ${D}/etc/nagios" |
199 |
} |
200 |
|
201 |
pkg_postinst() { |
202 |
elog "If you want nagios to start at boot time" |
203 |
elog "remember to execute:" |
204 |
elog " rc-update add nagios default" |
205 |
elog |
206 |
|
207 |
if use web ; then |
208 |
elog "This does not include cgis that are perl-dependent" |
209 |
elog "Currently traceroute.cgi is perl-dependent" |
210 |
elog "To have ministatus.cgi requires copying of ministatus.c" |
211 |
elog "to cgi directory for compiling." |
212 |
|
213 |
elog "Note that the user your webserver is running at needs" |
214 |
elog "read-access to /etc/nagios." |
215 |
elog |
216 |
|
217 |
if use apache2 || use lighttpd ; then |
218 |
elog "There are several possible solutions to accomplish this," |
219 |
elog "choose the one you are most comfortable with:" |
220 |
elog |
221 |
if use apache2 ; then |
222 |
elog " usermod -G nagios apache" |
223 |
elog "or" |
224 |
elog " chown nagios:apache /etc/nagios" |
225 |
elog |
226 |
elog "Also edit /etc/conf.d/apache2 and add \"-D NAGIOS\"" |
227 |
elif use lighttpd ; then |
228 |
elog " usermod -G nagios lighttpd " |
229 |
elog "or" |
230 |
elog " chown nagios:lighttpd /etc/nagios" |
231 |
fi |
232 |
elog |
233 |
elog "That will make nagios's web front end visable via" |
234 |
elog "http://localhost/nagios/" |
235 |
elog |
236 |
else |
237 |
elog "IMPORTANT: Do not forget to add the user your webserver" |
238 |
elog "is running as to the nagios group!" |
239 |
fi |
240 |
|
241 |
else |
242 |
elog "Please note that you have installed Nagios without web interface." |
243 |
elog "Please don't file any bugs about having no web interface when you do this." |
244 |
elog "Thank you!" |
245 |
fi |
246 |
|
247 |
elog |
248 |
elog "If your kernel has /proc protection, nagios" |
249 |
elog "will not be happy as it relies on accessing the proc" |
250 |
elog "filesystem. You can fix this by adding nagios into" |
251 |
elog "the group wheel, but this is not recomended." |
252 |
elog |
253 |
} |
254 |
|
255 |
pkg_postinst() { |
256 |
einfo "Fixing permissions" |
257 |
chown nagios:nagios "${ROOT}"var/nagios |
258 |
} |