1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-27 00:57:50 +00:00

NEW PORT: pglod - inserts web logs into a PostgreSQL database

pgLOGd, simply put, is a program that takes web server log
	entries and sends them to a database. It is called pgLOGd
	because of the database it was designed to function with,
	PostgreSQL.

	It is fast, robust and features fall-back-logging to a text
	file.  It is flexible and typically uses less than 128K of
	memory.

PR:		ports/51647
Submitted by:	Allie Micka <allie@pajunas.com>
This commit is contained in:
Edwin Groothuis 2003-10-08 11:22:32 +00:00
parent ef4a874374
commit fafb2df969
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=90617
8 changed files with 113 additions and 0 deletions

View File

@ -416,6 +416,7 @@
SUBDIR += peacock
SUBDIR += pear-APC
SUBDIR += pgdriver
SUBDIR += pglogd
SUBDIR += photo_gallery
SUBDIR += php-dyn
SUBDIR += php-screw

33
www/pglogd/Makefile Normal file
View File

@ -0,0 +1,33 @@
# New ports collection makefile for: pglogd
# Date created: 23 April 2003
# Whom: Allie Micka <allie@pajunas.com>
#
# $FreeBSD$
#
PORTNAME= pglogd
PORTVERSION= 2.2b
CATEGORIES= www databases
MASTER_SITES= http://www.digitalstratum.com/pglogd/
DISTNAME= pglogd-2.2beta
MAINTAINER= allie@pajunas.com
COMMENT= Sends web server log entries to a PostgreSQL database
LIB_DEPENDS= pq.3:${PORTSDIR}/databases/postgresql7
USE_REINPLACE= yes
post-extract:
@${CP} ${FILESDIR}/020.pglogd.sh ${WRKSRC}/020.pglogd.sh
@${REINPLACE_CMD} -e "s=%%PREFIX%%=${PREFIX}=g" ${WRKSRC}/020.pglogd.sh
post-install:
${INSTALL_DATA} ${WRKSRC}/020.pglogd.sh ${PREFIX}/etc/rc.d/020.pglogd.sh
@if [ ! -f ${PREFIX}/etc/rc.d/020.pglogd.sh ]; then \
${ECHO} "Installing ${PREFIX}/etc/rc.d/020.pglogd.sh startup file."; \
${INSTALL_SCRIPT} ${WRKSRC}/020.pglogd.sh ${PREFIX}/etc/rc.d/020.pglogd.sh; \
fi
@${CAT} ${PKGMESSAGE}
.include <bsd.port.mk>

1
www/pglogd/distinfo Normal file
View File

@ -0,0 +1 @@
MD5 (pglogd-2.2beta.tar.gz) = af94fba991e7bf432f8464f787319708

View File

@ -0,0 +1,17 @@
#!/bin/sh
CONFIG=%%PREFIX%%/pglogd.conf
PID=/var/run/pglogd.pid
case "$1" in
start)
[ -r ${CONFIG} ] && [ -x %%PREFIX%%/bin/pglogd ] && %%PREFIX%%/bin/pglogd -s -c ${CONFIG} > /dev/null && echo -n ' pglogd'
;;
stop)
[ -r ${PID} ] && kill `cat ${PID}` > /dev/null && echo -n ' pglogd'
;;
*)
echo "Usage: `basename $0` {start|stop}" >&2
;;
esac
exit 0

View File

@ -0,0 +1,25 @@
--- Makefile Sat Jan 19 11:05:45 2002
+++ Makefile.new Wed Apr 23 17:28:05 2003
@@ -31,7 +31,7 @@
#
# Change this to your PostgreSQL install directroy.
-PGDIR = /usr/local/pgsql
+PGDIR = ${PREFIX}
### NO NEED TO EDIT BELOW THIS LINE ###
@@ -56,3 +56,13 @@
pglog_dump : ${SRCS_DUMP} ${HDRS_DUMP}
${CC} ${COPTS} -o $@ ${CFLAGS} ${LDFLAGS} ${LIBS} ${SRCS_DUMP}
+
+install :
+ install -m 750 -s -c pglogd ${PREFIX}/bin/
+ install -m 755 -d ${PREFIX}/share/pglogd/
+ install -m 644 -c pglogd_tables.sql ${PREFIX}/share/pglogd/pglogd_tables.sql
+ install -m 644 -c README ${PREFIX}/share/pglogd/README
+ install -m 644 -c CHANGELOG ${PREFIX}/share/pglogd/CHANGELOG
+ install -m 644 -c weblog_daily.sql ${PREFIX}/share/pglogd/weblog_daily.sql
+ install -m 644 -c queries.txt ${PREFIX}/share/pglogd/queries.txt
+ install -m 644 -c pglogd.conf ${PREFIX}/etc/pglogd.conf.sample

8
www/pglogd/pkg-descr Normal file
View File

@ -0,0 +1,8 @@
pgLOGd, simply put, is a program that takes web server log entries and
sends them to a database. It is called pgLOGd because of the database
it was designed to function with, PostgreSQL.
It is fast, robust and features fall-back-logging to a text file. It
is flexible and typically uses less than 128K of memory.
WWW: http://www.digitalstratum.com/pglogd/

17
www/pglogd/pkg-message Normal file
View File

@ -0,0 +1,17 @@
=========================================================
You need to create a PostgreSQL database for your logs:
# su - postgres
$ createdb pglogd
$ psql pglogd < /usr/local/share/pglogd/pglogd_tables.sql
$ exit
and copy /usr/local/etc/pglogd.conf.sample to pglogd.conf
pglogd can then be started with:
# /usr/local/etc/rc.d/020.pglogd.sh start
Read the complete documentation on configuring pglogd
and apache at http://www.digitalstratum.com/pglogd/
=========================================================

11
www/pglogd/pkg-plist Normal file
View File

@ -0,0 +1,11 @@
bin/pglogd
share/pglogd/pglogd_tables.sql
share/pglogd/queries.txt
share/pglogd/weblog_daily.sql
share/pglogd/README
share/pglogd/CHANGELOG
etc/pglogd.conf.sample
etc/rc.d/020.pglogd.sh
@dirrm share/pglogd
@unexec if cmp -s %D/etc/rc.d/020.pglogd.sh %D/etc/rc.d/020.pglogd.sh-dist; then rm -f %D/etc/rc.d/020.pglogd.sh; fi
@exec [ -f %B/020.pglogd.sh ] || ( cp %B/%f %B/020.pglogd.sh; chmod 755 %B/020.pglogd.sh )