From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id E7AC61382C5 for ; Wed, 13 May 2020 09:47:49 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 2BE7DE0964; Wed, 13 May 2020 09:47:49 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id F240DE0964 for ; Wed, 13 May 2020 09:47:48 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id C25C635053A for ; Wed, 13 May 2020 09:47:47 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 0EBC91D6 for ; Wed, 13 May 2020 09:47:46 +0000 (UTC) From: "Jorge Manuel B. S. Vicetto" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Jorge Manuel B. S. Vicetto" Message-ID: <1589363255.4d4f49ad2dc855a31f482ba521c05f15a1753d61.jmbsvicetto@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: www-misc/awstats/files/, www-misc/awstats/ X-VCS-Repository: repo/gentoo X-VCS-Files: www-misc/awstats/awstats-7.8-r1.ebuild www-misc/awstats/files/awstats-7.8-mime.patch X-VCS-Directories: www-misc/awstats/ www-misc/awstats/files/ X-VCS-Committer: jmbsvicetto X-VCS-Committer-Name: Jorge Manuel B. S. Vicetto X-VCS-Revision: 4d4f49ad2dc855a31f482ba521c05f15a1753d61 X-VCS-Branch: master Date: Wed, 13 May 2020 09:47:46 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 83452157-fba8-4332-bb90-fcd65d61f826 X-Archives-Hash: 9c2ff26dffd0d035bfa37314a8d4f3d8 commit: 4d4f49ad2dc855a31f482ba521c05f15a1753d61 Author: Jorge Manuel B. S. Vicetto (jmbsvicetto) gentoo org> AuthorDate: Wed May 13 09:47:35 2020 +0000 Commit: Jorge Manuel B. S. Vicetto gentoo org> CommitDate: Wed May 13 09:47:35 2020 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4d4f49ad www-misc/awstats: Fix mime.pm - thanks to Tobias Sager. Bug: https://bugs.gentoo.org/646786 Package-Manager: Portage-2.3.96, Repoman-2.3.22 Signed-off-by: Jorge Manuel B. S. Vicetto (jmbsvicetto) gentoo.org> www-misc/awstats/awstats-7.8-r1.ebuild | 112 ++++++++++++++++++++++++++ www-misc/awstats/files/awstats-7.8-mime.patch | 12 +++ 2 files changed, 124 insertions(+) diff --git a/www-misc/awstats/awstats-7.8-r1.ebuild b/www-misc/awstats/awstats-7.8-r1.ebuild new file mode 100644 index 00000000000..66748aa8bf7 --- /dev/null +++ b/www-misc/awstats/awstats-7.8-r1.ebuild @@ -0,0 +1,112 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit eutils + +MY_P=${PN}-${PV%_p*} + +DESCRIPTION="AWStats is short for Advanced Web Statistics" +HOMEPAGE="https://www.awstats.org/" +SRC_URI="https://www.awstats.org/files/${P}.tar.gz" +S=${WORKDIR}/${MY_P} +LICENSE="GPL-3" +KEYWORDS="~alpha ~amd64 ~hppa ~ppc ~sparc ~x86" +IUSE="geoip ipv6" + +SLOT="0" + +RDEPEND=" + >=dev-lang/perl-5.6.1 + dev-perl/URI + virtual/perl-Time-Local + geoip? ( + dev-perl/Geo-IP + ) + ipv6? ( + dev-perl/Net-DNS + dev-perl/Net-IP + ) +" +DEPEND="" + +src_prepare() { + eapply "${FILESDIR}"/${PN}-7.1-gentoo.diff + eapply "${FILESDIR}"/${P}-mime.patch + + # change default installation directory + find . -type f -exec sed \ + -e "s#/usr/local/awstats/wwwroot#/usr/share/awstats/wwwroot#g" \ + -e '/PossibleLibDir/s:(.*):("/usr/share/awstats/wwwroot/cgi-bin/lib"):' \ + -i {} + || die "find/sed failed" + + # set default values for directories; use apache log as an example + sed \ + -e "s|^\(LogFile=\).*$|\1\"/var/log/apache2/access_log\"|" \ + -e "s|^\(SiteDomain=\).*$|\1\"localhost\"|" \ + -e "s|^\(DirIcons=\).*$|\1\"/awstats/icon\"|" \ + -i "${S}"/wwwroot/cgi-bin/awstats.model.conf || die "sed failed" + + # enable plugins + + if use ipv6; then + sed -e "s|^#\(LoadPlugin=\"ipv6\"\)$|\1|" \ + -i "${S}"/wwwroot/cgi-bin/awstats.model.conf || die "sed failed" + fi + + if use geoip; then + sed -e '/LoadPlugin="geoip /aLoadPlugin="geoip GEOIP_STANDARD /usr/share/GeoIP/GeoIP.dat"' \ + -i "${S}"/wwwroot/cgi-bin/awstats.model.conf || die "sed failed" + fi + + find "${S}" '(' -type f -not -name '*.pl' ')' -exec chmod -x {} + || die + + eapply_user +} + +HTML_DOCS="docs/" +DOCS="README.md" + +src_install() { + einstalldocs + + newdoc wwwroot/cgi-bin/plugins/example/example.pm example_plugin.pm + dodoc -r tools/xslt + + keepdir /var/lib/awstats + + insinto /etc/awstats + doins "${S}"/wwwroot/cgi-bin/awstats.model.conf + + # remove extra content that we don't want to install + rm -r "${S}"/wwwroot/cgi-bin/awstats.model.conf \ + "${S}"/wwwroot/classes/src || die + + insinto /usr/share/awstats + doins -r wwwroot + chmod +x "${D}"/usr/share/awstats/wwwroot/cgi-bin/*.pl + + cd "${S}"/tools + dobin awstats_buildstaticpages.pl awstats_exportlib.pl \ + awstats_updateall.pl + newbin logresolvemerge.pl awstats_logresolvemerge.pl + newbin maillogconvert.pl awstats_maillogconvert.pl + newbin urlaliasbuilder.pl awstats_urlaliasbuilder.pl + + dosym ../share/awstats/wwwroot/cgi-bin/awstats.pl /usr/bin/awstats.pl +} + +pkg_postinst() { + elog "The AWStats-Manual is available either inside" + elog "the /usr/share/doc/${PF} - folder, or at" + elog "https://awstats.sourceforge.net/docs/index.html ." + elog + elog "Copy the /etc/awstats/awstats.model.conf to" + elog "/etc/awstats/awstats..conf and edit it." + elog "" + ewarn "This ebuild does no longer use webapp-config to install" + ewarn "instead you should point your configuration to the stable" + ewarn "directory tree in the following path:" + ewarn " /usr/share/awstats" +} diff --git a/www-misc/awstats/files/awstats-7.8-mime.patch b/www-misc/awstats/files/awstats-7.8-mime.patch new file mode 100644 index 00000000000..a8d7f6d122a --- /dev/null +++ b/www-misc/awstats/files/awstats-7.8-mime.patch @@ -0,0 +1,12 @@ +diff -ur awstats-7.8-old/wwwroot/cgi-bin/lib/mime.pm awstats-7.8/wwwroot/cgi-bin/lib/mime.pm +--- awstats-7.8-old/wwwroot/cgi-bin/lib/mime.pm 2020-04-16 09:18:35.000000000 +0000 ++++ awstats-7.8/wwwroot/cgi-bin/lib/mime.pm 2020-05-13 09:38:30.654537576 +0000 +@@ -56,7 +56,7 @@ + 'diskimage', 'Disc and media file extensions', + 'vm', 'Virtual Machine image', + 'torrent', 'BitTorrent File', +-'gis', 'GIS File' ++'gis', 'GIS File', + 'ebook', 'Ebook File' + ); +