1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-28 05:29:48 +00:00

Update to latest version & rename

This commit is contained in:
Lev A. Serebryakov 2003-07-12 18:55:43 +00:00
parent 07ee2750b7
commit 1dd86c2190
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=84781
4 changed files with 61 additions and 167 deletions

View File

@ -1,14 +1,13 @@
# New ports collection makefile for: apache mod_log_mysql
# New ports collection makefile for: apache mod_log_sql
# Date created: 2001/11/22
# Whom: lev@serebryakov.spb.ru
#
# $FreeBSD$
PORTNAME= mod_log_mysql
PORTVERSION= 1.16
PORTNAME= mod_log_sql
PORTVERSION= 1.18
CATEGORIES= www databases
MASTER_SITES= http://www.grubbybaby.com/mod_log_sql/
DISTFILES= mod_log_sql-${PORTVERSION}
MAINTAINER= lev@FreeBSD.org
COMMENT= Allows Apache to log to a MySQL database
@ -19,34 +18,38 @@ RUN_DEPENDS= ${LOCALBASE}/sbin/httpd:${PORTSDIR}/${AP_PORT}
WRKSRC= ${WRKDIR}/${PORTNAME}
USE_BZIP2= yes
USE_REINPLACE= yes
USE_GMAKE= yes
AP_PORT?= www/apache13
APXS?= ${LOCALBASE}/sbin/apxs
# Here is no mod_ssl by default
HAVE_MOD_SSL=
ALL_TARGET= dso
INSTALL_TARGET= dsoinstall
MOD_SSL_HEADER= ${LOCALBASE}/include/apache/mod_ssl.h
.if exists(${MOD_SSL_HEADER})
do-configure:
@${ECHO_MSG} "Make with mod_ssl support"
.else
do-configure:
@${ECHO_MSG} "Make without mod_ssl support"
@${PERL} -pi -e 's/#define WANT_SSL_LOGGING/#undef WANT_SSL_LOGGING/' ${WRKSRC}/mod_log_mysql.c
.endif
@${REINPLACE_CMD} "s|^APACHEINSTALLED = .*\$$|APACHEINSTALLED = ${LOCALBASE}|" ${WRKSRC}/Makefile
@${REINPLACE_CMD} "s|^APACHEHEADERS = .*\$$|APACHEHEADERS = ${LOCALBASE}/include/apache|" ${WRKSRC}/Makefile
@${REINPLACE_CMD} "s|^APXS = .*\$$|APXS = ${APXS}|" ${WRKSRC}/Makefile
@${REINPLACE_CMD} "s|^MYSQLLIBRARIES = .*\$$|MYSQLLIBRARIES = ${LOCALBASE}/lib/mysql|" ${WRKSRC}/Makefile
@${REINPLACE_CMD} "s|^MYSQLHEADERS = .*\$$|MYSQLHEADERS = ${LOCALBASE}/include/mysql|" ${WRKSRC}/Makefile
@${REINPLACE_CMD} "s|sql_log_module|log_sql_module|g" ${WRKSRC}/${PORTNAME}.c
do-build:
@cd ${WRKSRC} && ${APXS} -c -o ${PORTNAME}.so -I${LOCALBASE}/include \
-L${LOCALBASE}/lib/mysql -lmysqlclient ${PORTNAME}.c
do-install:
cd ${WRKSRC} && ${APXS} -i -n${PORTNAME:S/^mod_//} -A ${PORTNAME}.so
post-install:
${APXS} -e -a -n log_sql ${LOCALBASE}/libexec/apache/${PORTNAME}.so
@${MKDIR} ${LOCALBASE}/share/${PORTNAME}
@${INSTALL_DATA} ${WRKSRC}/LICENSE ${LOCALBASE}/share/${PORTNAME}
@${INSTALL_DATA} ${WRKSRC}/CHANGELOG ${LOCALBASE}/share/${PORTNAME}
@${INSTALL_DATA} ${WRKSRC}/create_tables.sql ${LOCALBASE}/share/${PORTNAME}
@${INSTALL_SCRIPT} ${WRKSRC}/make_combined_log.pl ${LOCALBASE}/share/${PORTNAME}
.if !defined(NOPORTDOCS)
@${MKDIR} ${DOCSDIR}
.for file in CONFIGURATION INSTALL README access_log.sql make_combined_log.pl
${INSTALL_DATA} ${WRKSRC}/${file} ${DOCSDIR}
.endfor
@${MKDIR} ${LOCALBASE}/share/doc/${PORTNAME}/HTML
@${INSTALL_DATA} ${WRKSRC}/Documentation/documentation.ps ${LOCALBASE}/share/doc/${PORTNAME}
@${INSTALL_DATA} ${WRKSRC}/Documentation/documentation.txt ${LOCALBASE}/share/doc/${PORTNAME}
@${INSTALL_DATA} ${WRKSRC}/Documentation/README ${LOCALBASE}/share/doc/${PORTNAME}/
@${INSTALL_DATA} ${WRKSRC}/Documentation/HTML/* ${LOCALBASE}/share/doc/${PORTNAME}/HTML/
.endif
.include <bsd.port.mk>

View File

@ -1 +1 @@
MD5 (mod_log_sql-1.16) = 1a6e44e98ed631a20390727b993840c4
MD5 (mod_log_sql-1.18.tar.bz2) = 27a83f0555a53353ab1a7adf8c4b25ad

View File

@ -1,132 +0,0 @@
--- mod_log_mysql.c.orig Mon Jun 10 21:57:51 2002
+++ mod_log_mysql.c Mon Jun 10 21:58:12 2002
@@ -41,7 +41,7 @@
* -------------*/
/* Declare ourselves so the configuration routines can find and know us. */
-module mysql_log_module;
+module log_mysql_module;
/* The contents of these are known 'Apache wide' and are not variable
* on a per-virtual-server basis. Every virtual server 'knows' the
@@ -320,7 +320,7 @@
char *isvalid;
char *cookiebuf;
- log_mysql_state *cls = get_module_config(r->server->module_config, &mysql_log_module);
+ log_mysql_state *cls = get_module_config(r->server->module_config, &log_mysql_module);
#ifdef DEBUG
ap_log_error(APLOG_MARK,DEBUGLEVEL,r->server,"watching for cookie '%s'", cls->cookie_name);
@@ -509,7 +509,7 @@
void preserve_entry(request_rec *r, const char *query)
{
FILE *fp;
- log_mysql_state *cls = get_module_config(r->server->module_config, &mysql_log_module);
+ log_mysql_state *cls = get_module_config(r->server->module_config, &log_mysql_module);
fp = pfopen(r->pool, cls->preserve_file, "a");
if (fp == NULL)
@@ -548,7 +548,7 @@
* at any time, hence the check. */
if ( retval != 0 )
{
- log_mysql_state *cls = get_module_config(r->server->module_config, &mysql_log_module);
+ log_mysql_state *cls = get_module_config(r->server->module_config, &log_mysql_module);
/* Something went wrong, so start by trying to restart the db link. */
ap_log_error(APLOG_MARK,ERRLEVEL,r->server,"attempting reconnect because API said: %s", mysql_error(mysql_log));
@@ -621,7 +621,7 @@
const char *set_log_mysql_cookie(cmd_parms *parms, void *dummy, char *arg)
{
- log_mysql_state *cls = get_module_config(parms->server->module_config, &mysql_log_module);
+ log_mysql_state *cls = get_module_config(parms->server->module_config, &log_mysql_module);
cls->cookie_name = arg;
return NULL;
@@ -630,7 +630,7 @@
const char *set_log_mysql_preserve_file(cmd_parms *parms, void *dummy, char *arg)
{
char *pfile;
- log_mysql_state *cls = get_module_config(parms->server->module_config, &mysql_log_module);
+ log_mysql_state *cls = get_module_config(parms->server->module_config, &log_mysql_module);
pfile = ap_pstrcat(parms->pool, "/tmp/", arg, NULL);
cls->preserve_file = pfile;
@@ -653,7 +653,7 @@
const char *set_transfer_log_mysql_table(cmd_parms *parms, void *dummy, char *arg)
{
- log_mysql_state *cls = get_module_config(parms->server->module_config, &mysql_log_module);
+ log_mysql_state *cls = get_module_config(parms->server->module_config, &log_mysql_module);
if (massvirtual != 0)
ap_log_error(APLOG_MARK,WARNINGLEVEL,parms->server,"do not set MySQLTransferLogTable when MySQLMassVirtualHosting is On. Ignoring.");
@@ -664,7 +664,7 @@
const char *set_mysql_transfer_log_format(cmd_parms *parms, void *dummy, char *arg)
{
- log_mysql_state *cls = get_module_config(parms->server->module_config, &mysql_log_module);
+ log_mysql_state *cls = get_module_config(parms->server->module_config, &log_mysql_module);
cls->transfer_log_format = arg;
return NULL;
@@ -680,7 +680,7 @@
const char *add_referer_mysql_ignore(cmd_parms *parms, void *dummy, char *arg)
{
char **addme;
- log_mysql_state *cls = get_module_config(parms->server->module_config, &mysql_log_module);
+ log_mysql_state *cls = get_module_config(parms->server->module_config, &log_mysql_module);
addme = push_array(cls->referer_ignore_list);
*addme = pstrdup(cls->referer_ignore_list->pool, arg);
@@ -690,7 +690,7 @@
const char *add_transfer_mysql_ignore(cmd_parms *parms, void *dummy, char *arg)
{
char **addme;
- log_mysql_state *cls = get_module_config(parms->server->module_config, &mysql_log_module);
+ log_mysql_state *cls = get_module_config(parms->server->module_config, &log_mysql_module);
addme = push_array(cls->transfer_ignore_list);
*addme = pstrdup(cls->transfer_ignore_list->pool, arg);
@@ -700,7 +700,7 @@
const char *add_remhost_mysql_ignore(cmd_parms *parms, void *dummy, char *arg)
{
char **addme;
- log_mysql_state *cls = get_module_config(parms->server->module_config, &mysql_log_module);
+ log_mysql_state *cls = get_module_config(parms->server->module_config, &log_mysql_module);
addme = push_array(cls->remhost_ignore_list);
*addme = pstrdup(cls->remhost_ignore_list->pool, arg);
@@ -755,10 +755,10 @@
{
server_rec *s;
- log_mysql_state main_conf = ap_get_module_config(main_server->module_config, &mysql_log_module);
+ log_mysql_state main_conf = ap_get_module_config(main_server->module_config, &log_mysql_module);
for (server_rec *s = main_server; s; s = s->next) {
- conf = ap_get_module_config(s->module_config, &mysql_log_module);
+ conf = ap_get_module_config(s->module_config, &log_mysql_module);
if (conf->transfer_log_format == NULL && s != main_server) {
*conf = *main_conf;
}
@@ -847,7 +847,7 @@
int log_mysql_transaction(request_rec *orig)
{
char **ptrptr, **ptrptr2;
- log_mysql_state *cls = get_module_config(orig->server->module_config, &mysql_log_module);
+ log_mysql_state *cls = get_module_config(orig->server->module_config, &log_mysql_module);
const char *str;
request_rec *r;
@@ -1042,7 +1042,7 @@
/* The configuration array that sets up the hooks into the module. */
-module mysql_log_module = {
+module log_mysql_module = {
STANDARD_MODULE_STUFF,
NULL, /* module initializer */
NULL, /* create per-dir config */

View File

@ -1,9 +1,32 @@
@exec %D/sbin/apxs -e -A -n log_mysql -A mod_log_mysql.so
libexec/apache/mod_log_mysql.so
@unexec %D/sbin/apxs -e -A -n log_mysql %f
%%PORTDOCS%%share/doc/mod_log_mysql/CONFIGURATION
%%PORTDOCS%%share/doc/mod_log_mysql/INSTALL
%%PORTDOCS%%share/doc/mod_log_mysql/README
%%PORTDOCS%%share/doc/mod_log_mysql/access_log.sql
%%PORTDOCS%%share/doc/mod_log_mysql/make_combined_log.pl
%%PORTDOCS%%@dirrm share/doc/mod_log_mysql
@unexec %D/sbin/apxs -e -A -n log_sql %D/libexec/apache/mod_log_sql.so
libexec/apache/mod_log_sql.so
@exec %D/sbin/apxs -e -a -n log_sql %D/libexec/apache/mod_log_sql.so
share/mod_log_sql/LICENSE
share/mod_log_sql/CHANGELOG
share/mod_log_sql/create_tables.sql
share/mod_log_sql/make_combined_log.pl
%%PORTDOCS%%share/doc/mod_log_sql/documentation.ps
%%PORTDOCS%%share/doc/mod_log_sql/documentation.txt
%%PORTDOCS%%share/doc/mod_log_sql/HTML/contents.png
%%PORTDOCS%%share/doc/mod_log_sql/HTML/documentation.css
%%PORTDOCS%%share/doc/mod_log_sql/HTML/documentation.html
%%PORTDOCS%%share/doc/mod_log_sql/HTML/img1.png
%%PORTDOCS%%share/doc/mod_log_sql/HTML/img2.png
%%PORTDOCS%%share/doc/mod_log_sql/HTML/img3.png
%%PORTDOCS%%share/doc/mod_log_sql/HTML/img4.png
%%PORTDOCS%%share/doc/mod_log_sql/HTML/next.png
%%PORTDOCS%%share/doc/mod_log_sql/HTML/next_g.png
%%PORTDOCS%%share/doc/mod_log_sql/HTML/node1.html
%%PORTDOCS%%share/doc/mod_log_sql/HTML/node2.html
%%PORTDOCS%%share/doc/mod_log_sql/HTML/node3.html
%%PORTDOCS%%share/doc/mod_log_sql/HTML/node4.html
%%PORTDOCS%%share/doc/mod_log_sql/HTML/node5.html
%%PORTDOCS%%share/doc/mod_log_sql/HTML/node6.html
%%PORTDOCS%%share/doc/mod_log_sql/HTML/prev.png
%%PORTDOCS%%share/doc/mod_log_sql/HTML/prev_g.png
%%PORTDOCS%%share/doc/mod_log_sql/HTML/up.png
%%PORTDOCS%%share/doc/mod_log_sql/HTML/up_g.png
%%PORTDOCS%%share/doc/mod_log_sql/README
%%PORTDOCS%%@dirrm share/doc/mod_log_sql/HTML
%%PORTDOCS%%@dirrm share/doc/mod_log_sql
@dirrm share/mod_log_sql