From 0014fac83a53d6437a3db94b0a277d1b8a6cb478 Mon Sep 17 00:00:00 2001 From: naddy Date: Mon, 26 May 2003 15:19:32 +0000 Subject: [PATCH] Import mod_log_sql 1.18. Submitted by Xavier Santolaria . mod_log_sql offers Apache administrators the ability to log accesses to an SQL database. Note: This port requires a system built with revision 1.40 or higher of src/usr.sbin/httpd/Makefile.bsd-wrapper. --- www/mod_log_sql/Makefile | 54 ++++++++++++++++++++++++ www/mod_log_sql/distinfo | 3 ++ www/mod_log_sql/files/mod_log_sql-enable | 18 ++++++++ www/mod_log_sql/pkg/DEINSTALL | 26 ++++++++++++ www/mod_log_sql/pkg/DESCR | 9 ++++ www/mod_log_sql/pkg/MESSAGE | 10 +++++ www/mod_log_sql/pkg/PLIST | 26 ++++++++++++ 7 files changed, 146 insertions(+) create mode 100644 www/mod_log_sql/Makefile create mode 100644 www/mod_log_sql/distinfo create mode 100644 www/mod_log_sql/files/mod_log_sql-enable create mode 100644 www/mod_log_sql/pkg/DEINSTALL create mode 100644 www/mod_log_sql/pkg/DESCR create mode 100644 www/mod_log_sql/pkg/MESSAGE create mode 100644 www/mod_log_sql/pkg/PLIST diff --git a/www/mod_log_sql/Makefile b/www/mod_log_sql/Makefile new file mode 100644 index 00000000000..d2b9c90df3d --- /dev/null +++ b/www/mod_log_sql/Makefile @@ -0,0 +1,54 @@ +# $OpenBSD: Makefile,v 1.1.1.1 2003/05/26 15:19:32 naddy Exp $ + +COMMENT= "Apache module for logging to an SQL database" + +# This port currently only works with archs supporting dynamic loading +# and has Apache that supports DSO's. +NOT_FOR_ARCHS= ${NO_SHARED_ARCHS} + +DISTNAME= mod_log_sql-1.18 +CATEGORIES= www + +HOMEPAGE= http://www.grubbybaby.com/mod_log_sql/ +MASTER_SITES= ${HOMEPAGE} +EXTRACT_SUFX= .tar.bz2 + +MAINTAINER= Xavier Santolaria + +# Artistic +PERMIT_PACKAGE_CDROM= Yes +PERMIT_PACKAGE_FTP= Yes +PERMIT_DISTFILES_CDROM= Yes +PERMIT_DISTFILES_FTP= Yes + +LIB_DEPENDS= lib/mysql/mysqlclient.10:mysql-client-3.23.*:databases/mysql + +NO_REGRESS= Yes + +WRKSRC= ${WRKDIR}/mod_log_sql +EXAMPLES= create_tables.sql make_combined_log.pl + +APXS= /usr/sbin/apxs +FLAGS= -I${LOCALBASE}/include/mysql -L${LOCALBASE}/lib \ + -DWANT_SSL_LOGGING -lmysqlclient -lz + +do-build: + cd ${WRKBUILD} && \ + ${APXS} -c -o mod_log_sql.so ${FLAGS} mod_log_sql.c + @sed 's,!!PREFIX!!,${PREFIX},' \ + < ${FILESDIR}/mod_log_sql-enable \ + > ${WRKBUILD}/mod_log_sql-enable + +do-install: + ${INSTALL_DATA} ${WRKBUILD}/mod_log_sql.so ${PREFIX}/lib + ${INSTALL_SCRIPT} ${WRKBUILD}/mod_log_sql-enable ${PREFIX}/sbin + ${INSTALL_DATA_DIR} ${PREFIX}/share/examples/mod_log_sql + for p in ${EXAMPLES}; do \ + ${INSTALL_DATA} ${WRKSRC}/$$p \ + ${PREFIX}/share/examples/mod_log_sql; \ + done + ${INSTALL_DATA_DIR} ${PREFIX}/share/doc/mod_log_sql + ${INSTALL_DATA} ${WRKSRC}/Documentation/HTML/* \ + ${PREFIX}/share/doc/mod_log_sql + +.include diff --git a/www/mod_log_sql/distinfo b/www/mod_log_sql/distinfo new file mode 100644 index 00000000000..58d15b8d7c7 --- /dev/null +++ b/www/mod_log_sql/distinfo @@ -0,0 +1,3 @@ +MD5 (mod_log_sql-1.18.tar.bz2) = 27a83f0555a53353ab1a7adf8c4b25ad +RMD160 (mod_log_sql-1.18.tar.bz2) = f11bf3946d3c658f8e6544da07cacfc427c19c0f +SHA1 (mod_log_sql-1.18.tar.bz2) = d70e76c26a0792d0cf5201c7424c2ae115901b1e diff --git a/www/mod_log_sql/files/mod_log_sql-enable b/www/mod_log_sql/files/mod_log_sql-enable new file mode 100644 index 00000000000..77a203e15f0 --- /dev/null +++ b/www/mod_log_sql/files/mod_log_sql-enable @@ -0,0 +1,18 @@ +#!/bin/sh +# +# $OpenBSD: mod_log_sql-enable,v 1.1.1.1 2003/05/26 15:19:32 naddy Exp $ + +MODULE=!!PREFIX!!/lib/mod_log_sql.so + +if [ `id -u` -ne 0 ]; then + echo "You must be root to run this script." + exit +fi + +if [ ! -f ${MODULE} ]; then + echo "Cannot find mod_log_sql module (${MODULE})" + exit 1 +else + echo "Enabling Log SQL module..." + /usr/sbin/apxs -i -a -n sql_log ${MODULE} +fi diff --git a/www/mod_log_sql/pkg/DEINSTALL b/www/mod_log_sql/pkg/DEINSTALL new file mode 100644 index 00000000000..4bd4ab1638f --- /dev/null +++ b/www/mod_log_sql/pkg/DEINSTALL @@ -0,0 +1,26 @@ +#!/bin/sh +# +# $OpenBSD: DEINSTALL,v 1.1.1.1 2003/05/26 15:19:32 naddy Exp $ + +set -e +PATH=/bin:/usr/bin:/sbin:/usr/sbin +PREFIX=${PKG_PREFIX:-/usr/local} +CONF=`apxs -q SYSCONFDIR`/httpd.conf +MODULE=/usr/lib/apache/modules/mod_log_sql.so + +rm -f ${MODULE} + +echo +echo "+---------------" +echo "| To completely deinstall the $1 package you" +echo "| need to perform these steps as root:" +echo "|" +echo "| edit ${CONF}" +echo "| remove the line: LoadModule log_sql_module" +echo "|" +echo "| Do not do this if you plan on re-installing $1" +echo "| package at some future time." +echo "+---------------" +echo + +exit 0 diff --git a/www/mod_log_sql/pkg/DESCR b/www/mod_log_sql/pkg/DESCR new file mode 100644 index 00000000000..783727a7937 --- /dev/null +++ b/www/mod_log_sql/pkg/DESCR @@ -0,0 +1,9 @@ +mod_log_sql offers Apache administrators the ability to log +accesses to an SQL database. This capability can replace or +coexist with Apache's regular text-file logging mechanisms. +mod_log_sql is production-ready and is known to work with high +volume webservers and webserver clusters supporting over six +million hits per day (about 70 hits per second) -- and has +been benchmarked at over 300 hits per second. + +WWW: ${HOMEPAGE} diff --git a/www/mod_log_sql/pkg/MESSAGE b/www/mod_log_sql/pkg/MESSAGE new file mode 100644 index 00000000000..18eff36cb62 --- /dev/null +++ b/www/mod_log_sql/pkg/MESSAGE @@ -0,0 +1,10 @@ ++--------------- +| To finish the install of mod_log_sql, you need +| to enable the module using the following command +| +| ${PREFIX}/sbin/mod_log_sql-enable +| +| If you already have Apache running on your machine, +| you should not use "apachectl restart" - instead, +| you should fully stop and then restart the server. ++--------------- diff --git a/www/mod_log_sql/pkg/PLIST b/www/mod_log_sql/pkg/PLIST new file mode 100644 index 00000000000..120a7924344 --- /dev/null +++ b/www/mod_log_sql/pkg/PLIST @@ -0,0 +1,26 @@ +@comment $OpenBSD: PLIST,v 1.1.1.1 2003/05/26 15:19:32 naddy Exp $ +lib/mod_log_sql.so +sbin/mod_log_sql-enable +share/doc/mod_log_sql/contents.png +share/doc/mod_log_sql/documentation.css +share/doc/mod_log_sql/documentation.html +share/doc/mod_log_sql/img1.png +share/doc/mod_log_sql/img2.png +share/doc/mod_log_sql/img3.png +share/doc/mod_log_sql/img4.png +share/doc/mod_log_sql/next.png +share/doc/mod_log_sql/next_g.png +share/doc/mod_log_sql/node1.html +share/doc/mod_log_sql/node2.html +share/doc/mod_log_sql/node3.html +share/doc/mod_log_sql/node4.html +share/doc/mod_log_sql/node5.html +share/doc/mod_log_sql/node6.html +share/doc/mod_log_sql/prev.png +share/doc/mod_log_sql/prev_g.png +share/doc/mod_log_sql/up.png +share/doc/mod_log_sql/up_g.png +share/examples/mod_log_sql/create_tables.sql +share/examples/mod_log_sql/make_combined_log.pl +@dirrm share/examples/mod_log_sql +@dirrm share/doc/mod_log_sql