diff options
author | Renat Lumpau <rl03@gentoo.org> | 2005-08-09 12:33:40 +0000 |
---|---|---|
committer | Renat Lumpau <rl03@gentoo.org> | 2005-08-09 12:33:40 +0000 |
commit | 0d0a429aedeb570adf328f61d68c9b195be38b2e (patch) | |
tree | 0eb95cbb68320ab1355f72e815fcf8251aa874e1 /www-apps/openwebstats | |
parent | Add ~sparc keyword (X modular testing and xorg-x11 release status check). (diff) | |
download | gentoo-2-0d0a429aedeb570adf328f61d68c9b195be38b2e.tar.gz gentoo-2-0d0a429aedeb570adf328f61d68c9b195be38b2e.tar.bz2 gentoo-2-0d0a429aedeb570adf328f61d68c9b195be38b2e.zip |
Initial ebuild wrt bug #101022. Thanks to wrobel.
(Portage version: 2.0.51.22-r2)
Diffstat (limited to 'www-apps/openwebstats')
-rw-r--r-- | www-apps/openwebstats/ChangeLog | 10 | ||||
-rw-r--r-- | www-apps/openwebstats/Manifest | 6 | ||||
-rw-r--r-- | www-apps/openwebstats/files/config.php | 46 | ||||
-rw-r--r-- | www-apps/openwebstats/files/digest-openwebstats-1.1 | 1 | ||||
-rw-r--r-- | www-apps/openwebstats/files/postinstall-en.txt | 36 | ||||
-rw-r--r-- | www-apps/openwebstats/metadata.xml | 5 | ||||
-rw-r--r-- | www-apps/openwebstats/openwebstats-1.1.ebuild | 40 |
7 files changed, 144 insertions, 0 deletions
diff --git a/www-apps/openwebstats/ChangeLog b/www-apps/openwebstats/ChangeLog new file mode 100644 index 000000000000..5685ef503948 --- /dev/null +++ b/www-apps/openwebstats/ChangeLog @@ -0,0 +1,10 @@ +# ChangeLog for www-apps/openwebstats +# Copyright 1999-2005 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/www-apps/openwebstats/ChangeLog,v 1.1 2005/08/09 12:33:40 rl03 Exp $ + +*openwebstats-1.1 (09 Aug 2005) + + 09 Aug 2005; Renat Lumpau <rl03@gentoo.org> +files/config.php, + +files/postinstall-en.txt, +metadata.xml, +openwebstats-1.1.ebuild: + Initial ebuild wrt bug #101022. Thanks to wrobel. + diff --git a/www-apps/openwebstats/Manifest b/www-apps/openwebstats/Manifest new file mode 100644 index 000000000000..65c8eaa31e42 --- /dev/null +++ b/www-apps/openwebstats/Manifest @@ -0,0 +1,6 @@ +MD5 740b5ba083a02502668ad0d9a30380d3 openwebstats-1.1.ebuild 921 +MD5 97b4b139f8a2fcb05863b89b1304de95 ChangeLog 343 +MD5 f61bfa064e3acdfcd826e4a38b121196 metadata.xml 161 +MD5 5b6e5f719c8ac89d80563e3a2fdbf90b files/postinstall-en.txt 1244 +MD5 9cd494690c72b7e0eadedda10bc3e148 files/config.php 2106 +MD5 d550fb469b3eeb7f034cd04d8134465d files/digest-openwebstats-1.1 68 diff --git a/www-apps/openwebstats/files/config.php b/www-apps/openwebstats/files/config.php new file mode 100644 index 000000000000..5523397582b4 --- /dev/null +++ b/www-apps/openwebstats/files/config.php @@ -0,0 +1,46 @@ +<?php +################################################################################ +## OpenWebStats Version 1.0 ## +## ## +## (c)2005 mathews_dm - <Davidmathews@open-creations.com> ## +## ## +################################################################################ +## Please read the README! ## +################################################################################ + +########################################## +## Define Globals for OpenWebStats ## +########################################## +global $openstats_web_dir, $databasename; + +if (!defined("logformat_combined")) +{ + define("logformat_combined", "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"", TRUE); + define("logformat_combined_vhost", "%v %h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"", TRUE); + define("logformat_common" , "%h %l %u %t \"%r\" %>s %b", TRUE); + define("logformat_referer" , "%{Referer}i -> %U", TRUE); + define("logformat_agent" , "%{User-agent}i", TRUE); +} + +########################################## +## Database information below here ## +########################################## +$databaselocation = 'localhost'; +$databaseport = '3306'; +$databasename = 'ows'; +$databaseuser = 'ows'; +$databasepass = 'pass'; +$db_connect = mysql_connect($databaselocation, $databaseuser, $databasepass); +mysql_select_db($databasename, $db_connect); + +########################################## +## Logfile and Logformat are for the db ## +## import in the class_apache file. ## +## $openstatsdir is the install dir on ## +## your system. ## +########################################## +$openstats_web_dir = '/openwebstats'; // Remember to include the stats dir +$logfile = "/var/log/apache2/access_log"; +$logformat = logformat_combined; //example: $logformat = logformat_combined_vhost; + +?> diff --git a/www-apps/openwebstats/files/digest-openwebstats-1.1 b/www-apps/openwebstats/files/digest-openwebstats-1.1 new file mode 100644 index 000000000000..8c2d68bd6412 --- /dev/null +++ b/www-apps/openwebstats/files/digest-openwebstats-1.1 @@ -0,0 +1 @@ +MD5 f312bfb3606b96db2372ab41b14806c5 openwebstats-1.1.tar.gz 163477 diff --git a/www-apps/openwebstats/files/postinstall-en.txt b/www-apps/openwebstats/files/postinstall-en.txt new file mode 100644 index 000000000000..70b46ce6b391 --- /dev/null +++ b/www-apps/openwebstats/files/postinstall-en.txt @@ -0,0 +1,36 @@ +------------------------------------------------------------------------ +INSTALLATION + +The ebuild installs most parts of openwebstats automatically, but +you will have to create a database for the apache log records. + +You can do this using the following commands as the mysql root user: + +> mysql -u root -p -e "CREATE DATABASE ows; + GRANT CREATE, SELECT, INSERT, UPDATE, DELETE ON ows.* TO 'ows'@'localhost' + IDENTIFIED BY 'pass'; + FLUSH PRIVILEGES;" + +Please do not forget to choose a password that is more sensible than +'pass' ;) + +Now as user "ows": + +> mysql -u ows -ppass ows < ${MY_SQLSCRIPTSDIR}/mysql/${PV}_create.sql + +You also need to set the MySQL passwords for the ows user in +the ${MY_INSTALLDIR}/config.php file +so that openwebstats can access the database. + +If you use a special logfile format for your web server you should +also modify the log format in the config.php file. + +Make sure your access_log is readable if you want to use the update +function of the web frontend. + +> chmod 644 /var/log/apache2/access_log + +Now you can go to http://${VHOST_HOSTNAME}${VHOST_APPDIR} and use the +application. + +------------------------------------------------------------------------ diff --git a/www-apps/openwebstats/metadata.xml b/www-apps/openwebstats/metadata.xml new file mode 100644 index 000000000000..95c06f0095bb --- /dev/null +++ b/www-apps/openwebstats/metadata.xml @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<herd>web-apps</herd> +</pkgmetadata> diff --git a/www-apps/openwebstats/openwebstats-1.1.ebuild b/www-apps/openwebstats/openwebstats-1.1.ebuild new file mode 100644 index 000000000000..5b3d88915a0b --- /dev/null +++ b/www-apps/openwebstats/openwebstats-1.1.ebuild @@ -0,0 +1,40 @@ +# Copyright 1999-2005 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/www-apps/openwebstats/openwebstats-1.1.ebuild,v 1.1 2005/08/09 12:33:40 rl03 Exp $ + +inherit eutils webapp + +DESCRIPTION="OpenWebStats is a PHP stats application that reads Apache log files and imports the data to a MySQL database." +HOMEPAGE="http://openwebstats.sourceforge.net/" +SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz" + +LICENSE="GPL-2" +KEYWORDS="~x86" +IUSE="" + +DEPEND="virtual/php + dev-db/mysql" + +S=${WORKDIR}/${PN} + +src_install() { + webapp_src_preinst + + dodoc README + + ## Main application + cp -r . ${D}${MY_HTDOCSDIR} + cp ${FILESDIR}/config.php ${D}${MY_HTDOCSDIR}/ + + ## Docs installed, remove unnecessary files + rm -f ${D}${MY_HTDOCSDIR}/README + rm -f ${D}${MY_HTDOCSDIR}/CHANGELOG + + # Database creation + webapp_sqlscript mysql ${D}${MY_HTDOCSDIR}/openwebstats.sql + + # Postinstall instructions + webapp_postinst_txt en ${FILESDIR}/postinstall-en.txt + + webapp_src_install +} |