From b8f76f0a72f24a3e283f18f4cc1c7e0be7f1e5ef Mon Sep 17 00:00:00 2001 From: edwin Date: Wed, 8 Oct 2003 11:22:32 +0000 Subject: 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 --- www/pglogd/Makefile | 33 +++++++++++++++++++++++++++++++++ www/pglogd/distinfo | 1 + www/pglogd/files/020.pglogd.sh | 17 +++++++++++++++++ www/pglogd/files/patch-Makefile | 25 +++++++++++++++++++++++++ www/pglogd/pkg-descr | 8 ++++++++ www/pglogd/pkg-message | 17 +++++++++++++++++ www/pglogd/pkg-plist | 11 +++++++++++ 7 files changed, 112 insertions(+) create mode 100644 www/pglogd/Makefile create mode 100644 www/pglogd/distinfo create mode 100644 www/pglogd/files/020.pglogd.sh create mode 100644 www/pglogd/files/patch-Makefile create mode 100644 www/pglogd/pkg-descr create mode 100644 www/pglogd/pkg-message create mode 100644 www/pglogd/pkg-plist (limited to 'www/pglogd') diff --git a/www/pglogd/Makefile b/www/pglogd/Makefile new file mode 100644 index 000000000000..7b819c648cf9 --- /dev/null +++ b/www/pglogd/Makefile @@ -0,0 +1,33 @@ +# New ports collection makefile for: pglogd +# Date created: 23 April 2003 +# Whom: Allie Micka +# +# $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 diff --git a/www/pglogd/distinfo b/www/pglogd/distinfo new file mode 100644 index 000000000000..5a87cdd94770 --- /dev/null +++ b/www/pglogd/distinfo @@ -0,0 +1 @@ +MD5 (pglogd-2.2beta.tar.gz) = af94fba991e7bf432f8464f787319708 diff --git a/www/pglogd/files/020.pglogd.sh b/www/pglogd/files/020.pglogd.sh new file mode 100644 index 000000000000..7494cb35180e --- /dev/null +++ b/www/pglogd/files/020.pglogd.sh @@ -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 diff --git a/www/pglogd/files/patch-Makefile b/www/pglogd/files/patch-Makefile new file mode 100644 index 000000000000..51e6cd9ccfe7 --- /dev/null +++ b/www/pglogd/files/patch-Makefile @@ -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 diff --git a/www/pglogd/pkg-descr b/www/pglogd/pkg-descr new file mode 100644 index 000000000000..66c547a29907 --- /dev/null +++ b/www/pglogd/pkg-descr @@ -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/ diff --git a/www/pglogd/pkg-message b/www/pglogd/pkg-message new file mode 100644 index 000000000000..9a2e29a522ad --- /dev/null +++ b/www/pglogd/pkg-message @@ -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/ +========================================================= diff --git a/www/pglogd/pkg-plist b/www/pglogd/pkg-plist new file mode 100644 index 000000000000..8767dc370d48 --- /dev/null +++ b/www/pglogd/pkg-plist @@ -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 ) -- cgit