Gentoo Archives: gentoo-commits

From: "Gunnar Wrobel (wrobel)" <wrobel@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in net-www/awstats: ChangeLog awstats-6.9.ebuild
Date: Sat, 11 Oct 2008 18:33:54
Message-Id: E1KojHi-0004ck-9X@stork.gentoo.org
1 wrobel 08/10/11 18:33:50
2
3 Modified: ChangeLog
4 Added: awstats-6.9.ebuild
5 Log:
6 Added awstats-6.9 in response to sec issue #235225.
7 (Portage version: 2.1.4.4)
8
9 Revision Changes Path
10 1.62 net-www/awstats/ChangeLog
11
12 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-www/awstats/ChangeLog?rev=1.62&view=markup
13 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-www/awstats/ChangeLog?rev=1.62&content-type=text/plain
14 diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-www/awstats/ChangeLog?r1=1.61&r2=1.62
15
16 Index: ChangeLog
17 ===================================================================
18 RCS file: /var/cvsroot/gentoo-x86/net-www/awstats/ChangeLog,v
19 retrieving revision 1.61
20 retrieving revision 1.62
21 diff -u -r1.61 -r1.62
22 --- ChangeLog 19 Feb 2008 15:40:48 -0000 1.61
23 +++ ChangeLog 11 Oct 2008 18:33:50 -0000 1.62
24 @@ -1,6 +1,11 @@
25 # ChangeLog for net-www/awstats
26 # Copyright 2000-2008 Gentoo Foundation; Distributed under the GPL v2
27 -# $Header: /var/cvsroot/gentoo-x86/net-www/awstats/ChangeLog,v 1.61 2008/02/19 15:40:48 hollow Exp $
28 +# $Header: /var/cvsroot/gentoo-x86/net-www/awstats/ChangeLog,v 1.62 2008/10/11 18:33:50 wrobel Exp $
29 +
30 +*awstats-6.9 (11 Oct 2008)
31 +
32 + 11 Oct 2008; Gunnar Wrobel <wrobel@g.o> +awstats-6.9.ebuild:
33 + Added awstats-6.9 in response to sec issue #235225.
34
35 19 Feb 2008; Benedikt Böhm <hollow@g.o>
36 -files/awstats-6.5-CVE-2006-2237-CVE-2006-1945.diff,
37
38
39
40 1.1 net-www/awstats/awstats-6.9.ebuild
41
42 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-www/awstats/awstats-6.9.ebuild?rev=1.1&view=markup
43 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-www/awstats/awstats-6.9.ebuild?rev=1.1&content-type=text/plain
44
45 Index: awstats-6.9.ebuild
46 ===================================================================
47 # Copyright 1999-2008 Gentoo Foundation
48 # Distributed under the terms of the GNU General Public License v2
49 # $Header: /var/cvsroot/gentoo-x86/net-www/awstats/awstats-6.9.ebuild,v 1.1 2008/10/11 18:33:50 wrobel Exp $
50
51 inherit eutils webapp versionator depend.apache
52
53 DESCRIPTION="AWStats is short for Advanced Web Statistics."
54 HOMEPAGE="http://awstats.sourceforge.net/"
55 SRC_URI="http://awstats.sourceforge.net/files/${P}.tar.gz"
56
57 LICENSE="GPL-2"
58 KEYWORDS="~alpha ~amd64 ~hppa ~ppc ~sparc ~x86 ~x86-fbsd"
59 IUSE="geoip"
60
61 RESTRICT="mirror"
62
63 SLOT="0"
64 WEBAPP_MANUAL_SLOT="yes"
65
66 RDEPEND=">=dev-lang/perl-5.6.1
67 >=media-libs/libpng-1.2
68 virtual/perl-Time-Local
69 dev-perl/URI
70 geoip? ( dev-perl/Geo-IP )"
71
72 want_apache
73
74 src_unpack() {
75 unpack ${A}
76 cd "${S}"
77
78 epatch "${FILESDIR}"/${PN}-6.3-gentoo.diff
79
80 # change default installation directory
81 for file in tools/* wwwroot/cgi-bin/*; do
82 if [[ -f "${file}" ]]; then
83 sed \
84 -e "s#/usr/local/awstats/wwwroot/cgi-bin#${MY_CGIBINDIR}#g" \
85 -e "s#/usr/local/awstats/wwwroot/icon#${MY_HTDOCSDIR}/icon#g" \
86 -e "s#/usr/local/awstats/wwwroot/plugins#${MY_HOSTROOTDIR}/plugins#g" \
87 -e "s#/usr/local/awstats/wwwroot/classes#${MY_HTDOCSDIR}/classes#g" \
88 -e "s#/usr/local/awstats/wwwroot#${MY_HTDOCSDIR}#g" \
89 -i "${file}" || die "sed ${file} failed"
90 fi
91 done
92
93 # set the logpath
94 if use apache2; then
95 logpath="apache2/access_log"
96 else
97 logpath="awstats_log"
98 fi
99
100 # set default values for directories
101 sed \
102 -e "s|^\(LogFile=\).*$|\1\"/var/log/${logpath}\"|" \
103 -e "s|^\(SiteDomain=\).*$|\1\"localhost\"|" \
104 -e "s|^\(DirIcons=\).*$|\1\"/awstats/icon\"|" \
105 -e "s|^\(DirCgi=\).*$|\1\"/cgi-bin\"|" \
106 -i "${S}"/wwwroot/cgi-bin/awstats.model.conf || die "sed failed"
107 }
108
109 src_install() {
110 webapp_src_preinst
111
112 dohtml -r docs/*.html docs/*.xml docs/*.css docs/*.js docs/images
113 dodoc README.TXT docs/COPYING.TXT docs/LICENSE.TXT
114 newdoc wwwroot/cgi-bin/plugins/example/example.pm example_plugin.pm
115 docinto xslt
116 dodoc tools/xslt/*
117
118 webapp_postinst_txt en "${FILESDIR}"/postinst-en-r1.txt
119
120 keepdir /var/lib/awstats
121
122 # Copy the app's main files
123 exeinto "${MY_CGIBINDIR}"
124 doexe "${S}"/wwwroot/cgi-bin/*.pl
125
126 exeinto "${MY_HTDOCSDIR}"/classes
127 doexe "${S}"/wwwroot/classes/*.jar
128
129 # install language files, libraries and plugins
130 mkdir -p "${D}${MY_CGIBINDIR}"
131 for dir in lang lib plugins; do
132 cp -R "${S}/wwwroot/cgi-bin/${dir}" "${D}${MY_CGIBINDIR}"
133 done
134
135 # install the app's www files
136 mkdir -p "${D}${MY_HTDOCSDIR}"
137 for dir in icon css js; do
138 cp -R "${S}/wwwroot/${dir}" "${D}${MY_HTDOCSDIR}"
139 done
140
141 # copy configuration file
142 insinto /etc/awstats
143 doins "${S}"/wwwroot/cgi-bin/awstats.model.conf
144
145 # create the data directory for awstats
146 mkdir -p "${D}/${MY_HOSTROOTDIR}/datadir"
147
148 # install command line tools
149 cd "${S}"/tools
150 dobin awstats_buildstaticpages.pl awstats_exportlib.pl \
151 awstats_updateall.pl logresolvemerge.pl \
152 maillogconvert.pl awstats_configure.pl
153 newbin urlaliasbuilder.pl awstats_urlaliasbuilder.pl
154
155 webapp_src_install
156
157 # fix perms
158 for dir in lang lib plugins; do
159 chmod 0755 "${D}${MY_CGIBINDIR}/${dir}"
160 done
161 for dir in icon css js; do
162 chmod 0755 "${D}${MY_HTDOCSDIR}/${dir}"
163 done
164 }
165
166 pkg_postinst() {
167 elog
168 elog "The AWStats-Manual is available either inside"
169 elog "the /usr/share/doc/${PF} - folder, or at"
170 elog "http://awstats.sourceforge.net/docs/index.html ."
171 elog
172 ewarn "Copy the /etc/awstats/awstats.model.conf to"
173 ewarn "/etc/awstats/awstats.<yourdomain>.conf and edit it."
174
175 if use geoip ; then
176 einfo
177 einfo "Add the following line to /etc/awstats/awstats.<yourdomain>.conf"
178 einfo "to enable GeoIP plugin:"
179 einfo "LoadPlugin=\"geoip GEOIP_STANDARD /usr/share/GeoIP/GeoIP.dat\" "
180 einfo
181 fi
182
183 webapp_pkg_postinst
184 }