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-apps/openwebstats
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-apps/openwebstats')
-rw-r--r--www-apps/openwebstats/Manifest1
-rw-r--r--www-apps/openwebstats/files/config.php46
-rw-r--r--www-apps/openwebstats/files/postinstall-en.txt36
-rw-r--r--www-apps/openwebstats/metadata.xml8
-rw-r--r--www-apps/openwebstats/openwebstats-1.1.ebuild39
5 files changed, 130 insertions, 0 deletions
diff --git a/www-apps/openwebstats/Manifest b/www-apps/openwebstats/Manifest
new file mode 100644
index 000000000000..f8e7910e0d86
--- /dev/null
+++ b/www-apps/openwebstats/Manifest
@@ -0,0 +1 @@
+DIST openwebstats-1.1.tar.gz 163477 SHA256 6378591300c68921fc2d5cd38ec9aaf4b00a4d34f97d3eafad2d22097030d926
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/postinstall-en.txt b/www-apps/openwebstats/files/postinstall-en.txt
new file mode 100644
index 000000000000..ed4c7cd9260e
--- /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..dc9438ea01a5
--- /dev/null
+++ b/www-apps/openwebstats/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>web-apps</herd>
+ <upstream>
+ <remote-id type="sourceforge">openwebstats</remote-id>
+ </upstream>
+</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..fddb98ec4f0d
--- /dev/null
+++ b/www-apps/openwebstats/openwebstats-1.1.ebuild
@@ -0,0 +1,39 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit webapp
+
+DESCRIPTION="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="dev-lang/php"
+
+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
+}