diff options
author | Wolfram Schlich <wschlich@gentoo.org> | 2013-08-22 07:45:52 +0200 |
---|---|---|
committer | Wolfram Schlich <wschlich@gentoo.org> | 2013-08-22 07:45:52 +0200 |
commit | 2c8d064b367a44723b9b557fb1edca59387edf49 (patch) | |
tree | 762432f58f66cfa663464bd506f40bd73a8a812d /net-www/awstats | |
parent | initial setup (diff) | |
download | wschlich-2c8d064b367a44723b9b557fb1edca59387edf49.tar.gz wschlich-2c8d064b367a44723b9b557fb1edca59387edf49.tar.bz2 wschlich-2c8d064b367a44723b9b557fb1edca59387edf49.zip |
added all ebuilds from my old svn repository
Diffstat (limited to 'net-www/awstats')
-rw-r--r-- | net-www/awstats/Manifest | 4 | ||||
-rw-r--r-- | net-www/awstats/awstats-6.8.ebuild | 138 | ||||
-rw-r--r-- | net-www/awstats/files/awstats-6.3-gentoo.diff | 32 | ||||
-rw-r--r-- | net-www/awstats/files/postinst-en-r1.txt | 67 |
4 files changed, 241 insertions, 0 deletions
diff --git a/net-www/awstats/Manifest b/net-www/awstats/Manifest new file mode 100644 index 0000000..b1ce745 --- /dev/null +++ b/net-www/awstats/Manifest @@ -0,0 +1,4 @@ +AUX awstats-6.3-gentoo.diff 1219 RMD160 8c6ea2a093c231043674f8f14bc4332cfeeee930 SHA1 8a1971c0e710cec05004a7e94461f83f77b2fd1a SHA256 0de073550f021a93d883c307f999b4b6ead1abf3a587118e2e01578907d15814 +AUX postinst-en-r1.txt 2412 RMD160 6f4b9705b36ab0968d82f94915d8d6526f52fbe8 SHA1 953ec2765fd8322035c4b5dbc92741343814ffee SHA256 ae1c4d318867c444583af0b34b057955cc10f45fc6fa5457f06261d8ba5b3884 +DIST awstats-6.8.tar.gz 1101851 RMD160 b03f382b19bc057598fb231d58afefdfb91c07bb SHA1 cd0ab93ca28e5a194401232931d8f4521af10ae9 SHA256 a888d0fd680016f71950f584b70c607ae3e28f192a0b8a6d758ed2a7928b6a99 +EBUILD awstats-6.8.ebuild 3643 RMD160 1a90a974aa3b0c9b1903d895e48febde433b27e8 SHA1 4ce960d8e97ca79803fe9449137054e30e3bc20c SHA256 f97b4e807f79d4ac210b7eb502eda9701a5145f3cf663031df40e10faa6bb23b diff --git a/net-www/awstats/awstats-6.8.ebuild b/net-www/awstats/awstats-6.8.ebuild new file mode 100644 index 0000000..d3cc267 --- /dev/null +++ b/net-www/awstats/awstats-6.8.ebuild @@ -0,0 +1,138 @@ +# Copyright 1999-2008 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +inherit eutils webapp versionator depend.apache + +DESCRIPTION="AWStats is short for Advanced Web Statistics." +HOMEPAGE="http://awstats.sourceforge.net/" +SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz" + +LICENSE="GPL-2" +KEYWORDS="~alpha ~amd64 ~hppa ~ppc ~sparc ~x86 ~x86-fbsd" +IUSE="geoip" + +RESTRICT="mirror" + +SLOT="0" +WEBAPP_MANUAL_SLOT="yes" + +RDEPEND=">=dev-lang/perl-5.6.1 + >=media-libs/libpng-1.2 + virtual/perl-Time-Local + dev-perl/URI + geoip? ( dev-perl/Geo-IP )" + +want_apache + +src_unpack() { + unpack ${A} + cd "${S}" + + epatch "${FILESDIR}"/${PN}-6.3-gentoo.diff + + # change default installation directory + for file in tools/* wwwroot/cgi-bin/*; do + if [[ -f "${file}" ]]; then + sed \ + -e "s#/usr/local/awstats/wwwroot/cgi-bin#${MY_CGIBINDIR}#g" \ + -e "s#/usr/local/awstats/wwwroot/icon#${MY_HTDOCSDIR}/icon#g" \ + -e "s#/usr/local/awstats/wwwroot/plugins#${MY_HOSTROOTDIR}/plugins#g" \ + -e "s#/usr/local/awstats/wwwroot/classes#${MY_HTDOCSDIR}/classes#g" \ + -e "s#/usr/local/awstats/wwwroot#${MY_HTDOCSDIR}#g" \ + -i "${file}" || die "sed ${file} failed" + fi + done + + # set the logpath + if use apache2; then + logpath="apache2/access_log" + else + logpath="awstats_log" + fi + + # set default values for directories + sed \ + -e "s|^\(LogFile=\).*$|\1\"/var/log/${logpath}\"|" \ + -e "s|^\(SiteDomain=\).*$|\1\"localhost\"|" \ + -e "s|^\(DirIcons=\).*$|\1\"/awstats/icon\"|" \ + -e "s|^\(DirCgi=\).*$|\1\"/cgi-bin\"|" \ + -i "${S}"/wwwroot/cgi-bin/awstats.model.conf || die "sed failed" +} + +src_install() { + webapp_src_preinst + + dohtml -r docs/*.html docs/*.xml docs/*.css docs/*.js docs/images + dodoc README.TXT docs/COPYING.TXT docs/LICENSE.TXT + newdoc wwwroot/cgi-bin/plugins/example/example.pm example_plugin.pm + docinto xslt + dodoc tools/xslt/* + + webapp_postinst_txt en "${FILESDIR}"/postinst-en-r1.txt + + keepdir /var/lib/awstats + + # Copy the app's main files + exeinto "${MY_CGIBINDIR}" + doexe "${S}"/wwwroot/cgi-bin/*.pl + + exeinto "${MY_HTDOCSDIR}"/classes + doexe "${S}"/wwwroot/classes/*.jar + + # install language files, libraries and plugins + mkdir -p "${D}${MY_CGIBINDIR}" + for dir in lang lib plugins; do + cp -R "${S}/wwwroot/cgi-bin/${dir}" "${D}${MY_CGIBINDIR}" + done + + # install the app's www files + mkdir -p "${D}${MY_HTDOCSDIR}" + for dir in icon css js; do + cp -R "${S}/wwwroot/${dir}" "${D}${MY_HTDOCSDIR}" + done + + # copy configuration file + insinto /etc/awstats + doins "${S}"/wwwroot/cgi-bin/awstats.model.conf + + # create the data directory for awstats + mkdir -p "${D}/${MY_HOSTROOTDIR}/datadir" + + # install command line tools + cd "${S}"/tools + dobin awstats_buildstaticpages.pl awstats_exportlib.pl \ + awstats_updateall.pl logresolvemerge.pl \ + maillogconvert.pl awstats_configure.pl + newbin urlaliasbuilder.pl awstats_urlaliasbuilder.pl + + webapp_src_install + + # fix perms + for dir in lang lib plugins; do + chmod 0755 "${D}${MY_CGIBINDIR}/${dir}" + done + for dir in icon css js; do + chmod 0755 "${D}${MY_HTDOCSDIR}/${dir}" + done +} + +pkg_postinst() { + elog + 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 + ewarn "Copy the /etc/awstats/awstats.model.conf to" + ewarn "/etc/awstats/awstats.<yourdomain>.conf and edit it." + + if use geoip ; then + einfo + einfo "Add the following line to /etc/awstats/awstats.<yourdomain>.conf" + einfo "to enable GeoIP plugin:" + einfo "LoadPlugin=\"geoip GEOIP_STANDARD /usr/share/GeoIP/GeoIP.dat\" " + einfo + fi + + webapp_pkg_postinst +} diff --git a/net-www/awstats/files/awstats-6.3-gentoo.diff b/net-www/awstats/files/awstats-6.3-gentoo.diff new file mode 100644 index 0000000..ec3b115 --- /dev/null +++ b/net-www/awstats/files/awstats-6.3-gentoo.diff @@ -0,0 +1,32 @@ +diff -urN awstats-6.3.orig/tools/awstats_configure.pl awstats-6.3/tools/awstats_configure.pl +--- awstats-6.3.orig/tools/awstats_configure.pl 2005-01-24 09:28:43.980923725 -0500 ++++ awstats-6.3/tools/awstats_configure.pl 2005-01-24 09:28:52.034571769 -0500 +@@ -658,13 +658,27 @@ + print "\n-----> Restart Web server with '$command'\n"; + my $ret=`$command`; + print "$ret"; ++ } elsif (-f "/etc/gentoo-release") { ++ my $command; ++ if (-x "/usr/sbin/apache2ctl") { ++ $command="/usr/sbin/apache2ctl graceful"; ++ } elsif (-x "/usr/sbin/apachectl") { ++ $command="/usr/sbin/apachectl graceful"; ++ } else { ++ print "\n-----> Don't forget to restart manually your web server\n"; ++ } ++ if ($command != "") { ++ print "\n-----> Restart Web server with '$command'\n"; ++ my $ret=`$command`; ++ print "$ret"; ++ } + } elsif (-x "/sbin/service") { + # We are not on debian + my $command="/sbin/service httpd restart"; + print "\n-----> Restart Web server with '$command'\n"; + my $ret=`$command`; + print "$ret"; +- } else { ++ } else { + print "\n-----> Don't forget to restart manually your web server\n"; + } + } diff --git a/net-www/awstats/files/postinst-en-r1.txt b/net-www/awstats/files/postinst-en-r1.txt new file mode 100644 index 0000000..94a36aa --- /dev/null +++ b/net-www/awstats/files/postinst-en-r1.txt @@ -0,0 +1,67 @@ +### +# INSTRUCTIONS: +# +# If you would like to require authentication to access AWStats, then use ONE +# of the example configurations below. There are many other modules and +# options for authentication which will not be discussed here. +# +# NOTE: Related AWStats configuration directives are: +# +# AllowAccessFromWebToAuthenticatedUsersOnly=1 +# AllowAccessFromWebToFollowingAuthenticatedUsers="user1 [user2 ...]" +# +# You can use these to set a per-domain user access when needed for virtual +# hosting. That means: only the selected user(s) will have access to stats for +# the particular domain. All other users will not be allowed to see the domain +# stats even though they have authenticated successfully. +### + +### +# SECTION I - Basic Authentication +# +# The following example requires mod_auth (apache 2.0) or mod_auth_basic +# (apache 2.2) to work. Make sure you have installed and enabled it in +# /etc/apache2/httpd.conf +# +# Add your AWStats users to /etc/awstats/.htpasswd file. +# Please see 'man htpasswd2' for more details if you need. +# +# htpasswd2 -c /etc/awstats/.htpasswd username1 htpasswd2 +# /etc/awstats/.htpasswd username2 etc... +### + +#<Location "/cgi-bin/awstats.pl"> +# AuthType Basic +# AuthName "AWStats authenticated zone" +# AuthUserFile /etc/awstats/.htpasswd +# Require valid-user +#</Location> + +### +# SECTION II - Digest Authentication +# +# The following example requires mod_auth_digest to work. Make sure you have +# installed and enabled it in /etc/apache2/httpd.conf +# +# Do not forget to replace www.example.com as appropriate. You can also add as +# many domains as you need to this line. +# +# Add your AWStats users to /etc/awstats/.htdigest file. Please see 'man +# htdigest2' and http://httpd.apache.org/docs-2.0/mod/mod_auth_digest.html for +# more details if you need. +# +# htdigest2 -c /etc/awstats/.htdigest "AWStats authenticated zone" username1 +# htdigest2 /etc/awstats/.htdigest "AWStats authenticated zone" username2 +# etc... +### + +#<Location "/cgi-bin/awstats.pl"> +# AuthType Digest +# AuthName "AWStats authenticated zone" +# AuthDigestFile /etc/awstats/.htdigest +# AuthDigestDomain http://www.example.com https://www.example.com +# require valid-user +# # The following line is REQUIRED to work around a bug in MSIE. +# # See http://httpd.apache.org/docs-2.0/mod/mod_auth_digest.html +# BrowserMatch "MSIE" AuthDigestEnableQueryStringHack=On +#</Directory> |