summaryrefslogtreecommitdiff
path: root/www-apps/openwebstats
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /www-apps/openwebstats
reinit the tree, so we can have metadata
Diffstat (limited to 'www-apps/openwebstats')
-rw-r--r--www-apps/openwebstats/Manifest7
-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.xml11
-rw-r--r--www-apps/openwebstats/openwebstats-1.1.ebuild38
5 files changed, 138 insertions, 0 deletions
diff --git a/www-apps/openwebstats/Manifest b/www-apps/openwebstats/Manifest
new file mode 100644
index 000000000000..f22c648655c8
--- /dev/null
+++ b/www-apps/openwebstats/Manifest
@@ -0,0 +1,7 @@
+AUX config.php 2106 SHA256 b71574e683824d9db53070d2037bd4c539e46d83029ae40c1adbabd92f438b4d SHA512 c4db28cffb2dd83bf54f483d57468cd0602680d8b40f471fb063a37a4a4ca3968157ef9aa0209c26d97a86855a1863c0908779bab0e54f6fe3b747cc38a887b2 WHIRLPOOL 73e4e8eb6b111302180cf6bcf86976e1bb38dbca550a93ce759f388280929879bba8cc1662e9b8aab70c60e262325dc1e72353d1bbaa00e23ab359f27c49e2b9
+AUX postinstall-en.txt 1245 SHA256 afe18f8bb893f91a5d523fdfcf359eaec0471521a5cfd077aaa8233a3c693c6e SHA512 b814a821aa70c1dbaa736976a7dc19c9589efa3f50cbb2686ce9059c339304bd224d7849265a64725805ee86463e948a15c24e2c807cef05a6f625bb463bc78a WHIRLPOOL f426687000fef51cd1716e08909ad6c18b05e5a1f17a64ef8512a35c6babf58301ff67516e7775c121a055bc3908a2a96089a4d81875b04e6724967a45b9fdbc
+DIST openwebstats-1.1.tar.gz 163477 SHA256 6378591300c68921fc2d5cd38ec9aaf4b00a4d34f97d3eafad2d22097030d926 SHA512 882a8aa672703e978282550437ea9944bc44c424c3a157acd10f35a42681721de4bd5dde60aa9e57e15d3b986b1b4d1c9f0e4adf0360a0d569aa46720b4e2eec WHIRLPOOL cced50e545688b80fd7a94bb7ce1c71fe9818a6a52d1fb32f789c2dac0a8bbe484809848e53baaa272f6da13af3900dae43d4f52d5650337cbea17f6e3ab8c23
+EBUILD openwebstats-1.1.ebuild 882 SHA256 1bebc6f0360ec3f9bd570f758863a7032c9937dd22a25db551518ff055fa3f80 SHA512 691df3b04ecb9f0748ddf2912fa500664ad9e5116c64e536292b1b71f03f8bf18e72f52b9aad4c41a2e07b57058278691f32eb0cb66b64eebb71b84c860e0a45 WHIRLPOOL 3d3a941ebf8b8c0bce69bf86429bcd251bc45ef76dcaf35d32b029596f2699b7c81b8c05ba5f95359690831aa52726c0e49cd284f9a8c57724b1d4f13a8e8577
+MISC ChangeLog 2484 SHA256 5ca4e5193a1bcda2292de43ccbfa6c98cae2925bed84bdac0e6e1d14e8645e65 SHA512 53b585ecc96543805316afe9b0b2634f806827752f4b19ce3a189e34a182b0745f55c4a86af3fffadd68194b43be413b554165f5505ba3b1b48aae4cb1a9210d WHIRLPOOL 5a0de6f1f0c02105909d37fbcee14de8399f3d96441b2cbe79c8951d9b2f470d50eae55cc7fff458a1b585228fc0cba4de6454825b6ef8fd9aaab07ec6fbf0b9
+MISC ChangeLog-2015 1212 SHA256 6001ff626610aa04dbced8d25d5a990541a715b5aa0ab6e5c3aa00118ffaa2ee SHA512 b36f051fb955ae25bb0865a4508452ef6d86a4e582c3541351d6a4cc58b09c4a83417cd5ddbe1c7a3c67cefdea316b89a350c9a270c848b454cbdf74d1bcedd0 WHIRLPOOL c669a68f901234704c354ed698e62eac464108790f20ed345b49bd417b04ee9d7d953f809f633a9d31ead3f48ec6ec4b3719f876cb51b03507b8406f3db54be5
+MISC metadata.xml 332 SHA256 cc30d6019142d6d4c2b5ea0f7606f94351aa4d251fe7e696418f6b36ed1530e2 SHA512 b3a5cd09143fa07cc7f0ebaed3382a34bd6ddfa0e28f4540a01356be6d4d4b4367dcf2b6ec901179526f1deb5f66ced1503dbe8fcf9e41b7addd400dde6dadaa WHIRLPOOL 12719eba6b31f576c3323f342f620dd6f6f9036636aaf6aaf03c928160b28560b8aff0a19d0353eb64943e629fe8145867568a9bc7e4985ac2599f59f1eab940
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..5551d3efd112
--- /dev/null
+++ b/www-apps/openwebstats/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>web-apps@gentoo.org</email>
+ <name>Gentoo Webapps</name>
+ </maintainer>
+ <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..4aff79996bfd
--- /dev/null
+++ b/www-apps/openwebstats/openwebstats-1.1.ebuild
@@ -0,0 +1,38 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+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
+}