summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2015-08-08 13:49:04 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2015-08-08 17:38:18 -0700
commit56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch)
tree3f91093cdb475e565ae857f1c5a7fd339e2d781e /www-misc/awstats/awstats-7.3.ebuild
downloadgentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip
proj/gentoo: Initial commit
This commit represents a new era for Gentoo: Storing the gentoo-x86 tree in Git, as converted from CVS. This commit is the start of the NEW history. Any historical data is intended to be grafted onto this point. Creation process: 1. Take final CVS checkout snapshot 2. Remove ALL ChangeLog* files 3. Transform all Manifests to thin 4. Remove empty Manifests 5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$ 5.1. Do not touch files with -kb/-ko keyword flags. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'www-misc/awstats/awstats-7.3.ebuild')
-rw-r--r--www-misc/awstats/awstats-7.3.ebuild111
1 files changed, 111 insertions, 0 deletions
diff --git a/www-misc/awstats/awstats-7.3.ebuild b/www-misc/awstats/awstats-7.3.ebuild
new file mode 100644
index 000000000000..c619d063b85e
--- /dev/null
+++ b/www-misc/awstats/awstats-7.3.ebuild
@@ -0,0 +1,111 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit eutils
+
+MY_P=${PN}-${PV%_p*}
+
+DESCRIPTION="AWStats is short for Advanced Web Statistics"
+HOMEPAGE="http://www.awstats.org/"
+
+if [ ${MY_P} != ${P} ]; then
+ SRC_URI="http://dev.gentoo.org/~flameeyes/awstats/${P}.tar.gz"
+ # The following SRC_URI is useful only when fetching for the first time
+ # after bump; upstream does not bump the version when they change it, so
+ # we rename it to include the date and upload to our mirrors instead.
+ #SRC_URI="http://www.awstats.org/files/${MY_P}.tar.gz -> ${P}.tar.gz"
+else
+ SRC_URI="http://www.awstats.org/files/${P}.tar.gz"
+fi
+
+S=${WORKDIR}/${MY_P}
+
+LICENSE="GPL-3"
+KEYWORDS="~alpha ~amd64 ~hppa ~ppc ~sparc ~x86 ~x86-fbsd"
+IUSE="geoip ipv6"
+
+SLOT="0"
+
+RDEPEND=">=dev-lang/perl-5.6.1
+ virtual/perl-Time-Local
+ dev-perl/URI
+ geoip? ( dev-perl/Geo-IP )
+ ipv6? ( dev-perl/Net-IP dev-perl/Net-DNS )"
+DEPEND=""
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-7.1-gentoo.diff
+
+ # 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
+}
+
+src_install() {
+ dohtml -r docs/*
+ dodoc README.TXT
+ 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 || die
+}
+
+pkg_postinst() {
+ elog "The AWStats-Manual is available either inside"
+ elog "the /usr/share/doc/${PF} - folder, or at"
+ elog "http://awstats.sourceforge.net/docs/index.html ."
+ elog
+ elog "Copy the /etc/awstats/awstats.model.conf to"
+ elog "/etc/awstats/awstats.<yourdomain>.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"
+}