1 |
commit: 5e03b3a0040557a0560814ea03d996a11f64ce3f |
2 |
Author: Jorge Manuel B. S. Vicetto (jmbsvicetto) <jmbsvicetto <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Sep 20 15:22:22 2015 +0000 |
4 |
Commit: Jorge Manuel B. S. Vicetto <jmbsvicetto <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Sep 20 15:23:23 2015 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5e03b3a0 |
7 |
|
8 |
Bump awstats to 7.4 release and add patch to fix the unescaped left brace warnings with perl-5.22. |
9 |
|
10 |
Signed-off-by: Jorge Manuel B. S. Vicetto (jmbsvicetto) <jmbsvicetto <AT> gentoo.org> |
11 |
|
12 |
www-misc/awstats/Manifest | 1 + |
13 |
www-misc/awstats/awstats-7.4.ebuild | 112 +++++++++++++++++++++++++ |
14 |
www-misc/awstats/files/awstats-perl-5.22.patch | 45 ++++++++++ |
15 |
3 files changed, 158 insertions(+) |
16 |
|
17 |
diff --git a/www-misc/awstats/Manifest b/www-misc/awstats/Manifest |
18 |
index 269c6ec..e8640be 100644 |
19 |
--- a/www-misc/awstats/Manifest |
20 |
+++ b/www-misc/awstats/Manifest |
21 |
@@ -1,3 +1,4 @@ |
22 |
DIST awstats-7.1.1.tar.gz 1261038 SHA256 b0051595a38b8b7776f553f20e431760d306bbad1a9e83cf2aca52ef0205f2c0 SHA512 c2bc1604bd15629a057ee7fbbbe4bb0e54992cbd0ed4cd38e4cb9fcbadaa28cd5defd6691352ee8a3f84e98f17b19f9ad953705de4ab36fe4ece95b99b9b685d WHIRLPOOL 37e81b0eb991115b6438f1bf91561c545ae729571de31fd3b46386006027038f2cbed3564f3e9c0dfae6b8fb38f29f05adefe38019ef7deab831c019502da4ca |
23 |
DIST awstats-7.1_p20121017.tar.gz 1258135 SHA256 262364b77d825096fee088b207f9f6c3d986dddd89645fca53fe09aa8c1fd850 SHA512 171ff3118955c8b73c968a23983885d967632d2c6e95a45f71e5f6fea74afe34d869c9cc901e2e739419068babc96385d7d7df1e8ca10074be7388fbe5c51f53 WHIRLPOOL 678bd6e36634ae2bdee46f42df6d2239a260a188fb1ae07199ef9043a0ad3b54baca7152032873848fabd42f94ef6a92da623e1eb9439d2dbcff15411679f207 |
24 |
DIST awstats-7.3.tar.gz 2921079 SHA256 39b5b1a4406c30874f020b9635b5d6439ac3acbd7612be1abdcfec65e011c100 SHA512 9dfbab607cef02d8e31fd1738a27effb38ad04b22f2f876674879cc95d8fc56d4b0cd280b4e659ac6c20e65393b9365447fe0b851d00e91601d9e4f618530fbd WHIRLPOOL 193759d0e684099a51af65dcff8e056f52951dcec31361e67acc454bf7cd3227e3f64bfaef59a55d7bae81df73ef4c87c3ce203c18d3709e630bd7bbc2d38daa |
25 |
+DIST awstats-7.4.tar.gz 2936102 SHA256 43abfe7341c2be64f55bb89557347475640ca7ba4473ff30412a3d44358dab55 SHA512 5bce97c71aabeab35e4ff5e5168531e4955d7c1474322c7b4a47d1d06e06ebd0e74d1def73826498e6253f24aeca99309777617b7a914685c927bb6e1c020e1a WHIRLPOOL 8e6872672ec31c73492764414bfbc17ad4b3e295753f301d199d72ccac6df93fcf8969aa792a2de188f20d89a9e4e368f429aa6c9ed38f31ca3415c8fe7899a9 |
26 |
|
27 |
diff --git a/www-misc/awstats/awstats-7.4.ebuild b/www-misc/awstats/awstats-7.4.ebuild |
28 |
new file mode 100644 |
29 |
index 0000000..6ea9bca |
30 |
--- /dev/null |
31 |
+++ b/www-misc/awstats/awstats-7.4.ebuild |
32 |
@@ -0,0 +1,112 @@ |
33 |
+# Copyright 1999-2014 Gentoo Foundation |
34 |
+# Distributed under the terms of the GNU General Public License v2 |
35 |
+# $Id$ |
36 |
+ |
37 |
+EAPI=4 |
38 |
+ |
39 |
+inherit eutils |
40 |
+ |
41 |
+MY_P=${PN}-${PV%_p*} |
42 |
+ |
43 |
+DESCRIPTION="AWStats is short for Advanced Web Statistics" |
44 |
+HOMEPAGE="http://www.awstats.org/" |
45 |
+ |
46 |
+if [ ${MY_P} != ${P} ]; then |
47 |
+ SRC_URI="https://dev.gentoo.org/~flameeyes/awstats/${P}.tar.gz" |
48 |
+ # The following SRC_URI is useful only when fetching for the first time |
49 |
+ # after bump; upstream does not bump the version when they change it, so |
50 |
+ # we rename it to include the date and upload to our mirrors instead. |
51 |
+ #SRC_URI="http://www.awstats.org/files/${MY_P}.tar.gz -> ${P}.tar.gz" |
52 |
+else |
53 |
+ SRC_URI="http://www.awstats.org/files/${P}.tar.gz" |
54 |
+fi |
55 |
+ |
56 |
+S=${WORKDIR}/${MY_P} |
57 |
+ |
58 |
+LICENSE="GPL-3" |
59 |
+KEYWORDS="~alpha ~amd64 ~hppa ~ppc ~sparc ~x86 ~x86-fbsd" |
60 |
+IUSE="geoip ipv6" |
61 |
+ |
62 |
+SLOT="0" |
63 |
+ |
64 |
+RDEPEND=">=dev-lang/perl-5.6.1 |
65 |
+ virtual/perl-Time-Local |
66 |
+ dev-perl/URI |
67 |
+ geoip? ( dev-perl/Geo-IP ) |
68 |
+ ipv6? ( dev-perl/Net-IP dev-perl/Net-DNS )" |
69 |
+DEPEND="" |
70 |
+ |
71 |
+src_prepare() { |
72 |
+ epatch "${FILESDIR}"/${PN}-7.1-gentoo.diff |
73 |
+ epatch "${FILESDIR}"/${PN}-perl-5.22.patch |
74 |
+ |
75 |
+ # change default installation directory |
76 |
+ find . -type f -exec sed \ |
77 |
+ -e "s#/usr/local/awstats/wwwroot#/usr/share/awstats/wwwroot#g" \ |
78 |
+ -e '/PossibleLibDir/s:(.*):("/usr/share/awstats/wwwroot/cgi-bin/lib"):' \ |
79 |
+ -i {} + || die "find/sed failed" |
80 |
+ |
81 |
+ # set default values for directories; use apache log as an example |
82 |
+ sed \ |
83 |
+ -e "s|^\(LogFile=\).*$|\1\"/var/log/apache2/access_log\"|" \ |
84 |
+ -e "s|^\(SiteDomain=\).*$|\1\"localhost\"|" \ |
85 |
+ -e "s|^\(DirIcons=\).*$|\1\"/awstats/icon\"|" \ |
86 |
+ -i "${S}"/wwwroot/cgi-bin/awstats.model.conf || die "sed failed" |
87 |
+ |
88 |
+ # enable plugins |
89 |
+ |
90 |
+ if use ipv6; then |
91 |
+ sed -e "s|^#\(LoadPlugin=\"ipv6\"\)$|\1|" \ |
92 |
+ -i "${S}"/wwwroot/cgi-bin/awstats.model.conf || die "sed failed" |
93 |
+ fi |
94 |
+ |
95 |
+ if use geoip; then |
96 |
+ sed -e '/LoadPlugin="geoip /aLoadPlugin="geoip GEOIP_STANDARD /usr/share/GeoIP/GeoIP.dat"' \ |
97 |
+ -i "${S}"/wwwroot/cgi-bin/awstats.model.conf || die "sed failed" |
98 |
+ fi |
99 |
+ |
100 |
+ find "${S}" '(' -type f -not -name '*.pl' ')' -exec chmod -x {} + || die |
101 |
+} |
102 |
+ |
103 |
+src_install() { |
104 |
+ dohtml -r docs/* |
105 |
+ dodoc README.md |
106 |
+ newdoc wwwroot/cgi-bin/plugins/example/example.pm example_plugin.pm |
107 |
+ dodoc -r tools/xslt |
108 |
+ |
109 |
+ keepdir /var/lib/awstats |
110 |
+ |
111 |
+ insinto /etc/awstats |
112 |
+ doins "${S}"/wwwroot/cgi-bin/awstats.model.conf |
113 |
+ |
114 |
+ # remove extra content that we don't want to install |
115 |
+ rm -r "${S}"/wwwroot/cgi-bin/awstats.model.conf \ |
116 |
+ "${S}"/wwwroot/classes/src || die |
117 |
+ |
118 |
+ insinto /usr/share/awstats |
119 |
+ doins -r wwwroot |
120 |
+ chmod +x "${D}"/usr/share/awstats/wwwroot/cgi-bin/*.pl |
121 |
+ |
122 |
+ cd "${S}"/tools |
123 |
+ dobin awstats_buildstaticpages.pl awstats_exportlib.pl \ |
124 |
+ awstats_updateall.pl |
125 |
+ newbin logresolvemerge.pl awstats_logresolvemerge.pl |
126 |
+ newbin maillogconvert.pl awstats_maillogconvert.pl |
127 |
+ newbin urlaliasbuilder.pl awstats_urlaliasbuilder.pl |
128 |
+ |
129 |
+ dosym ../share/awstats/wwwroot/cgi-bin/awstats.pl /usr/bin/awstats.pl || die |
130 |
+} |
131 |
+ |
132 |
+pkg_postinst() { |
133 |
+ elog "The AWStats-Manual is available either inside" |
134 |
+ elog "the /usr/share/doc/${PF} - folder, or at" |
135 |
+ elog "http://awstats.sourceforge.net/docs/index.html ." |
136 |
+ elog |
137 |
+ elog "Copy the /etc/awstats/awstats.model.conf to" |
138 |
+ elog "/etc/awstats/awstats.<yourdomain>.conf and edit it." |
139 |
+ elog "" |
140 |
+ ewarn "This ebuild does no longer use webapp-config to install" |
141 |
+ ewarn "instead you should point your configuration to the stable" |
142 |
+ ewarn "directory tree in the following path:" |
143 |
+ ewarn " /usr/share/awstats" |
144 |
+} |
145 |
|
146 |
diff --git a/www-misc/awstats/files/awstats-perl-5.22.patch b/www-misc/awstats/files/awstats-perl-5.22.patch |
147 |
new file mode 100644 |
148 |
index 0000000..8f4e1ca |
149 |
--- /dev/null |
150 |
+++ b/www-misc/awstats/files/awstats-perl-5.22.patch |
151 |
@@ -0,0 +1,45 @@ |
152 |
+From 6ca56baf8e5819787c128e5ccd741701cb84bfdd Mon Sep 17 00:00:00 2001 |
153 |
+From: Laurent Destailleur <eldy@×××××××××××.fr> |
154 |
+Date: Tue, 18 Aug 2015 20:41:20 +0200 |
155 |
+Subject: [PATCH] Compatibility with Perl 5.22 |
156 |
+ |
157 |
+--- |
158 |
+ docs/awstats_changelog.txt | 1 + |
159 |
+ wwwroot/cgi-bin/awstats.pl | 12 ++++++------ |
160 |
+ 2 files changed, 7 insertions(+), 6 deletions(-) |
161 |
+ |
162 |
+diff --git a/docs/awstats_changelog.txt b/docs/awstats_changelog.txt |
163 |
+index 1fcca7f..1b5e342 100644 |
164 |
+--- a/docs/awstats_changelog.txt |
165 |
++++ b/docs/awstats_changelog.txt |
166 |
+@@ -8,6 +8,7 @@ New features: |
167 |
+ option nboflastupdatelookuptosave on command line. |
168 |
+ - #199 Added geoip6 plugin with support for IPv4 AND IPv6. |
169 |
+ - Work with Amazon AWS log files (using %time5 tag). |
170 |
++- Compatibility with Perl 5.22 |
171 |
+ |
172 |
+ Fixes: |
173 |
+ - Fixes permission on some .pl scripts. |
174 |
+diff --git a/wwwroot/cgi-bin/awstats.pl b/wwwroot/cgi-bin/awstats.pl |
175 |
+index c9dcee9..eb14fc0 100755 |
176 |
+--- a/wwwroot/cgi-bin/awstats.pl |
177 |
++++ b/wwwroot/cgi-bin/awstats.pl |
178 |
+@@ -9040,12 +9040,12 @@ sub DefinePerlParsingFormat { |
179 |
+ $LogFormatString =~ s/%>s/%code/g; |
180 |
+ $LogFormatString =~ s/%b(\s)/%bytesd$1/g; |
181 |
+ $LogFormatString =~ s/%b$/%bytesd/g; |
182 |
+- $LogFormatString =~ s/\"%{Referer}i\"/%refererquot/g; |
183 |
+- $LogFormatString =~ s/\"%{User-Agent}i\"/%uaquot/g; |
184 |
+- $LogFormatString =~ s/%{mod_gzip_input_size}n/%gzipin/g; |
185 |
+- $LogFormatString =~ s/%{mod_gzip_output_size}n/%gzipout/g; |
186 |
+- $LogFormatString =~ s/%{mod_gzip_compression_ratio}n/%gzipratio/g; |
187 |
+- $LogFormatString =~ s/\(%{ratio}n\)/%deflateratio/g; |
188 |
++ $LogFormatString =~ s/\"%\{Referer}i\"/%refererquot/g; |
189 |
++ $LogFormatString =~ s/\"%\{User-Agent}i\"/%uaquot/g; |
190 |
++ $LogFormatString =~ s/%\{mod_gzip_input_size}n/%gzipin/g; |
191 |
++ $LogFormatString =~ s/%\{mod_gzip_output_size}n/%gzipout/g; |
192 |
++ $LogFormatString =~ s/%\{mod_gzip_compression_ratio}n/%gzipratio/g; |
193 |
++ $LogFormatString =~ s/\(%\{ratio}n\)/%deflateratio/g; |
194 |
+ |
195 |
+ # Replacement for a IIS and ISA format string |
196 |
+ $LogFormatString =~ s/cs-uri-query/%query/g; # Must be before cs-uri |