diff options
author | Chuck Short <zul@gentoo.org> | 2004-04-30 12:50:08 +0000 |
---|---|---|
committer | Chuck Short <zul@gentoo.org> | 2004-04-30 12:50:08 +0000 |
commit | 1e754e00c27798ae5286beda5f92c13711debcc7 (patch) | |
tree | a8809e9e6dd6d4748e6b0fdc418981bc10fdd234 /net-www/mod_log_sql | |
parent | Added to ~ppc (diff) | |
download | historical-1e754e00c27798ae5286beda5f92c13711debcc7.tar.gz historical-1e754e00c27798ae5286beda5f92c13711debcc7.tar.bz2 historical-1e754e00c27798ae5286beda5f92c13711debcc7.zip |
Initial version, closes #14891.
Diffstat (limited to 'net-www/mod_log_sql')
-rw-r--r-- | net-www/mod_log_sql/ChangeLog | 11 | ||||
-rw-r--r-- | net-www/mod_log_sql/Manifest | 6 | ||||
-rw-r--r-- | net-www/mod_log_sql/files/10_mod_log_sql.conf | 41 | ||||
-rw-r--r-- | net-www/mod_log_sql/files/10_mod_log_sql_apache2.conf | 35 | ||||
-rw-r--r-- | net-www/mod_log_sql/files/digest-mod_log_sql-1.96 | 1 | ||||
-rw-r--r-- | net-www/mod_log_sql/metadata.xml | 8 | ||||
-rw-r--r-- | net-www/mod_log_sql/mod_log_sql-1.96.ebuild | 99 |
7 files changed, 201 insertions, 0 deletions
diff --git a/net-www/mod_log_sql/ChangeLog b/net-www/mod_log_sql/ChangeLog new file mode 100644 index 000000000000..6ecb1ec3981d --- /dev/null +++ b/net-www/mod_log_sql/ChangeLog @@ -0,0 +1,11 @@ +# ChangeLog for net-www/mod_log_sql +# Copyright 2000-2004 Gentoo Technologies, Inc.; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/net-www/mod_log_sql/ChangeLog,v 1.1 2004/04/30 12:50:08 zul Exp $ + +*mod_log_sql-1.96 (30 Apr 2004) + + 30 Apr 2004; Chuck Short <zul@gentoo.org> mod_log_sql-1.96.ebuild, + files/10_mod_log_sql.conf, files/10_mod_log_sql_apache2.conf: + Initial version, ebuild written by Perolo Silantico < per.sil@gmx.it >. + Closes #14891. + diff --git a/net-www/mod_log_sql/Manifest b/net-www/mod_log_sql/Manifest new file mode 100644 index 000000000000..9106b40cfc56 --- /dev/null +++ b/net-www/mod_log_sql/Manifest @@ -0,0 +1,6 @@ +MD5 c0f1ef7713094d36c90ccbaf45779156 mod_log_sql-1.96.ebuild 3002 +MD5 ff897a2bf06493de215614bfffb21ea0 ChangeLog 475 +MD5 5b6dd438f81019e56fa641841c0c13fe metadata.xml 501 +MD5 512a290da7324c6b25d5d474918cd338 files/digest-mod_log_sql-1.96 68 +MD5 32dd778c2b656fd5ef91cb63684203b0 files/10_mod_log_sql.conf 1214 +MD5 25f5f7d682fe530634cedbd495a700ba files/10_mod_log_sql_apache2.conf 1044 diff --git a/net-www/mod_log_sql/files/10_mod_log_sql.conf b/net-www/mod_log_sql/files/10_mod_log_sql.conf new file mode 100644 index 000000000000..b4007e589b16 --- /dev/null +++ b/net-www/mod_log_sql/files/10_mod_log_sql.conf @@ -0,0 +1,41 @@ +<IfDefine LOG_SQL> + + # Load the module first + <IfModule !mod_log_sql.c> + LoadModule log_sql_module extramodules/mod_log_sql.so + <IfModule mod_ssl.c> + LoadModule log_sql_ssl_module extramodules/mod_log_sql_ssl.so + </IfModule> + + AddModule mod_log_sql.c + <IfModule mod_ssl.c> + AddModule mod_log_sql_ssl.c + </IfModule> + </IfModule> + + <IfModule mod_log_sql.c> + # LogSQLMassVirtualHosting automatically sets LogSQLCreateTables to 'on' + LogSQLMassVirtualHosting on + #LogSQLCreateTables on + + LogSQLDBParam user loguser + LogSQLDBParam passwd l0gg3r + LogSQLDBParam host localhost + LogSQLDBParam database apachelogs + LogSQLDBParam socketfile /var/run/mysqld/mysqld.sock + LogSQLCreateTables on + LogSQLMachineID machine_id + + LogSQlPreserveFile /var/log/apache/mod_slog_sql_preserve.sql + +# with cookie add a "c" +# with SSL add "Qqz" +# with mod_usertrack add "I" + LogSQLTransferLogFormat AabfHhMmPpRrSsTtUuv + <IfModule mod_ssl.c> + LogSQLTransferLogFormat AabfHhMmPpRrSsTtUuvQqz + </IfModule> + + + </IfModule> +</IfDefine> diff --git a/net-www/mod_log_sql/files/10_mod_log_sql_apache2.conf b/net-www/mod_log_sql/files/10_mod_log_sql_apache2.conf new file mode 100644 index 000000000000..b4610e5c21fc --- /dev/null +++ b/net-www/mod_log_sql/files/10_mod_log_sql_apache2.conf @@ -0,0 +1,35 @@ +<IfDefine LOG_SQL> + + # Load the module first + <IfModule !mod_log_sql.c> + LoadModule log_sql_module extramodules/mod_log_sql.so + <IfModule mod_ssl.c> + LoadModule log_sql_ssl_module extramodules/mod_log_sql_ssl.so + </IfModule> + </IfModule> + + <IfModule mod_log_sql.c> + # LogSQLMassVirtualHosting automatically sets LogSQLCreateTables to 'on' + LogSQLMassVirtualHosting on + #LogSQLCreateTables on + + LogSQLDBParam user loguser + LogSQLDBParam passwd l0gg3r + LogSQLDBParam host localhost + LogSQLDBParam database apachelogs + LogSQLDBParam socketfile /var/run/mysqld/mysqld.sock + LogSQLMachineID machine_id + + LogSQlPreserveFile /var/log/apache2/mod_slog_sql_preserve.sql + +# with cookie add a "c" +# with SSL add "Qqz" +# with mod_usertrack add "I" + LogSQLTransferLogFormat AabfHhMmPpRrSsTtUuv + <IfModule mod_ssl.c> + LogSQLTransferLogFormat AabfHhMmPpRrSsTtUuv + </IfModule> + + + </IfModule> +</IfDefine> diff --git a/net-www/mod_log_sql/files/digest-mod_log_sql-1.96 b/net-www/mod_log_sql/files/digest-mod_log_sql-1.96 new file mode 100644 index 000000000000..ace23595d0ab --- /dev/null +++ b/net-www/mod_log_sql/files/digest-mod_log_sql-1.96 @@ -0,0 +1 @@ +MD5 3212f333fc29d013d0b6d9f7dd477fa2 mod_log_sql-1.96.tar.gz 149483 diff --git a/net-www/mod_log_sql/metadata.xml b/net-www/mod_log_sql/metadata.xml new file mode 100644 index 000000000000..bcaabdbbd0d3 --- /dev/null +++ b/net-www/mod_log_sql/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>apache</herd> +<longdescription> +The Apache HTTP Server Project is an effort to develop and maintain an open-source HTTP server for modern operating systems including UNIX and Windows NT. The goal of this project is to provide a secure, efficient and extensible server that provides HTTP services in sync with the current HTTP standards. +</longdescription> +</pkgmetadata> diff --git a/net-www/mod_log_sql/mod_log_sql-1.96.ebuild b/net-www/mod_log_sql/mod_log_sql-1.96.ebuild new file mode 100644 index 000000000000..6857a716b8cc --- /dev/null +++ b/net-www/mod_log_sql/mod_log_sql-1.96.ebuild @@ -0,0 +1,99 @@ +# Copyright 1999-2004 Gentoo Technologies, Inc. +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-www/mod_log_sql/mod_log_sql-1.96.ebuild,v 1.1 2004/04/30 12:50:08 zul Exp $ + +DESCRIPTION="An Apache module for logging to an SQL (MySQL) database" +HOMEPAGE="http://www.outoforder.cc/projects/apache/mod_log_sql/" + +S=${WORKDIR}/${P} +SRC_URI="http://www.outoforder.cc/downloads/mod_log_sql/${P}.tar.gz" +DEPEND=">=dev-db/mysql-3.23.15 + apache2? ( =net-www/apache-2* ) : ( >=net-www/apache-1* )" +LICENSE="Apache-1.1" +KEYWORDS="~x86" +IUSE="" +SLOT="0" + + + +detectapache() { + local domsg= + [ -n "$1" ] && domsg=1 + HAVE_APACHE1= + HAVE_APACHE2= + has_version '=net-www/apache-1*' && HAVE_APACHE1=1 + has_version '=net-www/apache-2*' && HAVE_APACHE2=1 + + [ -n "${HAVE_APACHE1}" ] && APACHEVER=1 + [ -n "${HAVE_APACHE2}" ] && APACHEVER=2 + [ -n "${HAVE_APACHE1}" ] && [ -n "${HAVE_APACHE2}" ] && APACHEVER='both' + + case "${APACHEVER}" in + 1) [ -n "${domsg}" ] && einfo 'Apache1 only detected' ;; + 2) [ -n "${domsg}" ] && einfo 'Apache2 only detected' ;; + both) + if [ "`use apache2`" ]; then + [ -n "${domsg}" ] && einfo "Multiple Apache versions detected, using Apache2 (USE=apache2)" + APACHEVER=2 + else + [ -n "${domsg}" ] && einfo 'Multiple Apache versions detected, using Apache1 (USE=-apache2)' + APACHEVER=1 + fi ;; + *) if [ -n "${domsg}" ]; then + MSG="Unknown Apache version!"; eerror $MSG ; die $MSG + else + die $MSG + fi; ;; + esac + + if [ "$APACHEVER" == "2" ]; then + APXS="`which apxs2`" + APACHE_MODULES_DIR=/usr/lib/apache2-extramodules + CONFIG_FILE=${FILESDIR}/10_mod_log_sql_apache2.conf + APACHE_MODULES_CONFIG_DIR=/etc/apache2/conf/modules.d + else + APXS="`which apxs`" + APACHE_MODULES_DIR=/usr/lib/apache-extramodules + CONFIG_FILE=${FILESDIR}/10_mod_log_sql.conf + APACHE_MODULES_CONFIG_DIR=/etc/apache/conf/modules.d + fi +} + + + +src_compile() { + detectapache + myconf="--with-apxs=${APXS}" + + use ssl && myconf="${myconf} --enable-ssl" + ./configure ${myconf} + emake || die +} + +src_install() { + detectapache + exeinto ${APACHE_MODULES_DIR} + doexe .libs/${PN}.so + + use ssl && doexe .libs/mod_log_sql_ssl.so + + cat ${CONFIG_FILE} | sed -e "s#machine_id#`hostname -f`#" > 10_mod_log_sql.conf + insinto ${APACHE_MODULES_CONFIG_DIR} + doins 10_mod_log_sql.conf + + dodoc AUTHORS CHANGELOG INSTALL LICENSE TODO Documentation/README Documentation/manual.html Documentation/manual.xml + docinto contrib + dodoc contrib/create_tables.sql contrib/make_combined_log.pl contrib/mysql_import_combined_log.pl +} + +pkg_postinst() { + detectapache + if [ "$APACHEVER" == "2" ]; then + einfo "Please add '-D LOG_SQL' to your /etc/conf.d/apache2 APACHE2_OPTS setting." + else + einfo "Please add '-D LOG_SQL' to your /etc/conf.d/apache APACHE_OPTS setting" + fi + + einfo "Do not forget to adapt ${APACHE_MODULES_CONFIG_DIR}/10_mod_log_sql.conf to your needs." + einfo "See /usr/share/doc/${PF}/contrib/create_tables.sql.gz on how to create logging tables.\n" +} |