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