Gentoo Archives: gentoo-commits

From: "Tobias Scherbaum (dertobi123)" <dertobi123@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in net-analyzer/nagios-core: ChangeLog nagios-core-2.10-r1.ebuild nagios-core-2.10.ebuild
Date: Tue, 01 Jan 2008 09:41:30
Message-Id: E1J9dci-0002yn-QE@stork.gentoo.org
1 dertobi123 08/01/01 09:41:24
2
3 Modified: ChangeLog
4 Added: nagios-core-2.10-r1.ebuild
5 Removed: nagios-core-2.10.ebuild
6 Log:
7 Add vim-syntax USE, bug #202969
8 (Portage version: 2.1.4_rc13)
9
10 Revision Changes Path
11 1.106 net-analyzer/nagios-core/ChangeLog
12
13 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-analyzer/nagios-core/ChangeLog?rev=1.106&view=markup
14 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-analyzer/nagios-core/ChangeLog?rev=1.106&content-type=text/plain
15 diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-analyzer/nagios-core/ChangeLog?r1=1.105&r2=1.106
16
17 Index: ChangeLog
18 ===================================================================
19 RCS file: /var/cvsroot/gentoo-x86/net-analyzer/nagios-core/ChangeLog,v
20 retrieving revision 1.105
21 retrieving revision 1.106
22 diff -u -r1.105 -r1.106
23 --- ChangeLog 25 Nov 2007 13:53:20 -0000 1.105
24 +++ ChangeLog 1 Jan 2008 09:41:24 -0000 1.106
25 @@ -1,6 +1,12 @@
26 # ChangeLog for net-analyzer/nagios-core
27 -# Copyright 2002-2007 Gentoo Foundation; Distributed under the GPL v2
28 -# $Header: /var/cvsroot/gentoo-x86/net-analyzer/nagios-core/ChangeLog,v 1.105 2007/11/25 13:53:20 hollow Exp $
29 +# Copyright 2002-2008 Gentoo Foundation; Distributed under the GPL v2
30 +# $Header: /var/cvsroot/gentoo-x86/net-analyzer/nagios-core/ChangeLog,v 1.106 2008/01/01 09:41:24 dertobi123 Exp $
31 +
32 +*nagios-core-2.10-r1 (01 Jan 2008)
33 +
34 + 01 Jan 2008; Tobias Scherbaum <dertobi123@g.o>
35 + -nagios-core-2.10.ebuild, +nagios-core-2.10-r1.ebuild:
36 + Add vim-syntax USE, bug #202969
37
38 25 Nov 2007; Benedikt Böhm <hollow@g.o> nagios-core-1.4.1.ebuild,
39 nagios-core-1.4.1-r1.ebuild, nagios-core-2.10.ebuild:
40
41
42
43 1.1 net-analyzer/nagios-core/nagios-core-2.10-r1.ebuild
44
45 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-analyzer/nagios-core/nagios-core-2.10-r1.ebuild?rev=1.1&view=markup
46 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-analyzer/nagios-core/nagios-core-2.10-r1.ebuild?rev=1.1&content-type=text/plain
47
48 Index: nagios-core-2.10-r1.ebuild
49 ===================================================================
50 # Copyright 1999-2008 Gentoo Foundation
51 # Distributed under the terms of the GNU General Public License v2
52 # $Header: /var/cvsroot/gentoo-x86/net-analyzer/nagios-core/nagios-core-2.10-r1.ebuild,v 1.1 2008/01/01 09:41:24 dertobi123 Exp $
53
54 inherit eutils apache-module 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 mirror://gentoo/nagios-2.0b.cfg-sample.gz"
61
62 LICENSE="GPL-2"
63 SLOT="0"
64 KEYWORDS="~alpha ~amd64 ~ppc ~ppc64 ~sparc ~x86"
65 IUSE="noweb perl debug vim-syntax"
66 DEPEND="virtual/mailx
67 !noweb? (
68 >=media-libs/jpeg-6b-r3
69 >=media-libs/libpng-1.2.5-r4
70 >=media-libs/gd-1.8.3-r5
71 ${APACHE2_DEPEND}
72 perl? ( net-analyzer/traceroute )
73 )
74 perl? ( >=dev-lang/perl-5.6.1-r7 )"
75 RDEPEND="${DEPEND}
76 vim-syntax? ( app-vim/nagios-syntax )"
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 noweb; 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 epatch "${FILESDIR}"/2.x-series-nsca.patch
100
101 local strip="$(echo '$(MAKE) strip-post-install')"
102 sed -i -e "s:${strip}::" {cgi,base}/Makefile.in || die "sed failed in Makefile.in"
103 }
104
105 src_compile() {
106 local myconf
107
108 if use perl
109 then
110 myconf="${myconf} --enable-embedded-perl --with-perlcache"
111 fi
112
113 if use debug; then
114 myconf="${myconf} --enable-DEBUG0"
115 myconf="${myconf} --enable-DEBUG1"
116 myconf="${myconf} --enable-DEBUG2"
117 myconf="${myconf} --enable-DEBUG3"
118 myconf="${myconf} --enable-DEBUG4"
119 myconf="${myconf} --enable-DEBUG5"
120 fi
121
122 if use noweb; then
123 myconf="${myconf} --with-command-grp=nagios"
124 else
125 myconf="${myconf} --with-command-grp=apache"
126 fi
127
128 econf ${myconf} \
129 --prefix=/usr/nagios \
130 --localstatedir=/var/nagios \
131 --sysconfdir=/etc/nagios \
132 --datadir=/usr/nagios/share \
133 || die "./configure failed"
134
135 emake CC=$(tc-getCC) nagios || die "make failed"
136
137 if use !noweb ; then
138 # Only compile the CGI's if "noweb" useflag is not set.
139 make CC=$(tc-getCC) DESTDIR="${D}" cgis || die
140 fi
141
142 emake -C contrib all || "contrib make filed"
143
144 }
145
146 src_install() {
147 dodoc Changelog INSTALLING LEGAL README UPGRADING
148 docinto contrib
149 dodoc contrib/README
150
151 if use noweb; then
152 sed -i -e 's/cd $(SRC_CGI) && $(MAKE) $@/# line removed due to noweb use flag/' \
153 -e 's/cd $(SRC_HTM) && $(MAKE) $@/# line removed due to noweb use flag/' \
154 Makefile
155 fi
156
157 sed -i -e 's/^contactgroups$//g' Makefile
158
159 make DESTDIR="${D}" install
160 make DESTDIR="${D}" install-config
161 make DESTDIR="${D}" install-commandmode
162
163 docinto sample-configs
164 dodoc "${D}"/etc/nagios/*
165 rm "${D}"/etc/nagios/*
166
167 newdoc "${WORKDIR}"/nagios-2.0b.cfg-sample nagios.cfg-sample
168
169 #contribs are not configured by the configure script, we'll configure them overselves...
170 find "${S}"/contrib/ -type f | xargs sed -e 's:/usr/local/nagios/var/rw:/var/nagios/rw:;
171 s:/usr/local/nagios/libexec:/usr/nagios/libexec:;
172 s:/usr/local/nagios/etc:/etc/nagios:;
173 s:/usr/local/nagios/sbin:/usr/nagios/sbin:;' -i
174
175 insinto /usr/share/doc/${PF}/contrib
176 doins -r contrib/eventhandlers
177
178 doinitd "${FILESDIR}"/nagios
179 newconfd "${FILESDIR}"/conf.d nagios
180
181 chmod 644 "${S}"/contrib/*.cgi
182 into /usr/nagios
183 for bin in `find contrib/ -type f -perm 0755 -maxdepth 1` ; do
184 dobin "$bin"
185 done
186
187 # Apache Module
188 if use !noweb; then
189 insinto "${APACHE2_MODULES_CONFDIR}"
190 doins "${FILESDIR}"/99_nagios.conf
191
192 if use perl; then
193 into /usr/nagios ; dosbin contrib/traceroute.cgi
194 fi
195 fi
196
197 for dir in etc/nagios var/nagios ; do
198 chown -R nagios:nagios "${D}/${dir}" || die "Failed chown of ${D}/${dir}"
199 done
200
201 chown -R root:root "${D}"/usr/nagios
202 find "${D}"/usr/nagios -type d -print0 | xargs -0 chmod 755
203 find "${D}"/usr/nagios/*bin -type f -print0 | xargs -0 chmod 755
204 find "${D}"/usr/nagios/share -type f -print0 | xargs -0 chmod 644
205
206 keepdir /etc/nagios
207 keepdir /var/nagios
208 keepdir /var/nagios/archives
209 keepdir /usr/nagios/share/ssi
210 keepdir /var/nagios/rw
211
212 if use noweb; then
213 chown -R nagios:nagios "${D}"/var/nagios/rw || die "Failed Chown of ${D}/var/nagios/rw"
214 else
215 chown -R nagios:apache "${D}"/var/nagios/rw || die "Failed Chown of ${D}/var/nagios/rw"
216 fi
217
218 chmod ug+s "${D}"/var/nagios/rw || die "Failed Chmod of ${D}/var/nagios/rw"
219 chmod 0750 "${D}"/etc/nagios || die "Failed chmod of ${D}/etc/nagios"
220
221 cat << EOF > "${T}"/55-nagios-core-revdep
222 SEARCH_DIRS="/usr/nagios/bin /usr/nagios/libexec"
223 EOF
224
225 insinto /etc/revdep-rebuild
226 doins "${T}"/55-nagios-core-revdep
227 }
228
229 pkg_postinst() {
230 einfo
231 einfo "The example config files are located at /usr/share/doc/${PF}/sample-configs/."
232 einfo
233 einfo "Also, if you want nagios to start at boot time"
234 einfo "remember to execute:"
235 einfo " rc-update add nagios default"
236 einfo
237
238 if use !noweb; then
239 einfo "This does not include cgis that are perl-dependent"
240 einfo "Currently traceroute.cgi is perl-dependent"
241 einfo "To have ministatus.cgi requires copying of ministatus.c"
242 einfo "to cgi directory for compiling."
243
244 einfo " Edit /etc/conf.d/apache2 and add \"-D NAGIOS\""
245
246 einfo
247 einfo "That will make nagios's web front end visable via"
248 einfo "http://localhost/nagios/"
249 einfo
250 einfo "Note that the user your webserver is running at needs"
251 einfo "read-access to /etc/nagios. There are several possible"
252 einfo "solutions to accomplish this, choose the one you are"
253 einfo "most comfortable with:"
254 einfo " usermod -G nagios apache"
255 einfo "or"
256 einfo " chown nagios:apache /etc/nagios"
257
258 else
259 einfo "Please note that you have installed Nagios without web interface."
260 einfo "Please don't file any bugs about having no web interface when you do this."
261 einfo "Thank you!"
262 fi
263
264 einfo
265 einfo "If your kernel has /proc protection, nagios"
266 einfo "will not be happy as it relies on accessing the proc"
267 einfo "filesystem. You can fix this by adding nagios into"
268 einfo "the group wheel, but this is not recomended."
269 einfo
270
271 einfo
272 ewarn "Use /usr/nagios/bin/convertcfg for configuration file conversion"
273 }
274
275 pkg_prerm() {
276 /etc/init.d/nagios stop
277 }
278
279
280
281 --
282 gentoo-commits@g.o mailing list