From owner-svn-ports-head@FreeBSD.ORG Wed Jun 11 16:46:32 2014 Return-Path: Delivered-To: svn-ports-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DC4D369E; Wed, 11 Jun 2014 16:46:32 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BDADF2B84; Wed, 11 Jun 2014 16:46:32 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5BGkWKU076352; Wed, 11 Jun 2014 16:46:32 GMT (envelope-from vanilla@svn.freebsd.org) Received: (from vanilla@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5BGkVdk076347; Wed, 11 Jun 2014 16:46:31 GMT (envelope-from vanilla@svn.freebsd.org) Message-Id: <201406111646.s5BGkVdk076347@svn.freebsd.org> From: "Vanilla I. Shu" Date: Wed, 11 Jun 2014 16:46:31 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r357509 - in head/www/pglogd: . files X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Jun 2014 16:46:33 -0000 Author: vanilla Date: Wed Jun 11 16:46:31 2014 New Revision: 357509 URL: http://svnweb.freebsd.org/changeset/ports/357509 QAT: https://qat.redports.org/buildarchive/r357509/ Log: 1: Stagify. 2: switch to USE_RC_SUBR. 3: add pkg-message to SUB_FILES. Added: head/www/pglogd/files/020.pglogd.sh.in (contents, props changed) head/www/pglogd/files/pkg-message.in (contents, props changed) Deleted: head/www/pglogd/files/020.pglogd.sh head/www/pglogd/pkg-message Modified: head/www/pglogd/Makefile head/www/pglogd/files/patch-Makefile head/www/pglogd/pkg-plist Modified: head/www/pglogd/Makefile ============================================================================== --- head/www/pglogd/Makefile Wed Jun 11 16:43:17 2014 (r357508) +++ head/www/pglogd/Makefile Wed Jun 11 16:46:31 2014 (r357509) @@ -11,18 +11,7 @@ MAINTAINER= ports@FreeBSD.org COMMENT= Sends web server log entries to a PostgreSQL database USE_PGSQL= yes - -NO_STAGE= 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} +USE_RC_SUBR= 020.pglogd.sh +SUB_FILES= pkg-message .include Added: head/www/pglogd/files/020.pglogd.sh.in ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/www/pglogd/files/020.pglogd.sh.in Wed Jun 11 16:46:31 2014 (r357509) @@ -0,0 +1,17 @@ +#!/bin/sh +CONFIG=%%PREFIX%%/etc/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 Modified: head/www/pglogd/files/patch-Makefile ============================================================================== --- head/www/pglogd/files/patch-Makefile Wed Jun 11 16:43:17 2014 (r357508) +++ head/www/pglogd/files/patch-Makefile Wed Jun 11 16:46:31 2014 (r357509) @@ -1,5 +1,5 @@ ---- Makefile.orig Wed Nov 5 18:41:01 2003 -+++ Makefile Sun Feb 22 21:15:50 2004 +--- Makefile.orig 2003-11-06 02:41:01.000000000 +0800 ++++ Makefile 2014-06-12 00:33:45.474374245 +0800 @@ -31,16 +31,15 @@ # @@ -10,8 +10,9 @@ ### NO NEED TO EDIT BELOW THIS LINE ### - CC = gcc +-CC = gcc -COPTS = -O -Wall ++#CC = gcc LIBS = -lpq -CFLAGS = -I${PGDIR}/include -LDFLAGS = -L${PGDIR}/lib @@ -20,7 +21,7 @@ SRCS_LOG = pglogd.c -@@ -51,7 +50,19 @@ +@@ -51,7 +50,19 @@ SRCS_LOGCTL = pglogctl.c all : pglogd pglogctl pglogd : ${SRCS_LOG} ${HDRS_LOG} @@ -33,12 +34,12 @@ + +PGLOGD_SHARE= ${PREFIX}/share/pglogd +install : -+ install -m 750 -s -c pglogd ${PREFIX}/bin -+ install -m 750 -s -c pglogctl ${PREFIX}/bin -+ install -m 755 -d ${PREFIX}/share/pglogd -+ install -m 644 -c pglogd_tables.sql ${PGLOGD_SHARE} -+ install -m 644 -c README ${PGLOGD_SHARE} -+ install -m 644 -c CHANGELOG ${PGLOGD_SHARE} -+ install -m 644 -c weblog_daily.sql ${PGLOGD_SHARE} -+ install -m 644 -c queries.txt ${PGLOGD_SHARE} -+ install -m 644 -c pglogd.conf ${PGLOGD_SHARE} ++ install -m 750 -s -c pglogd $(DESTDIR)${PREFIX}/bin ++ install -m 750 -s -c pglogctl $(DESTDIR)${PREFIX}/bin ++ install -m 755 -d $(DESTDIR)${PREFIX}/share/pglogd ++ install -m 644 -c pglogd_tables.sql $(DESTDIR)${PGLOGD_SHARE} ++ install -m 644 -c README $(DESTDIR)${PGLOGD_SHARE} ++ install -m 644 -c CHANGELOG $(DESTDIR)${PGLOGD_SHARE} ++ install -m 644 -c weblog_daily.sql $(DESTDIR)${PGLOGD_SHARE} ++ install -m 644 -c queries.txt $(DESTDIR)${PGLOGD_SHARE} ++ install -m 644 -c pglogd.conf $(DESTDIR)${PGLOGD_SHARE} Added: head/www/pglogd/files/pkg-message.in ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/www/pglogd/files/pkg-message.in Wed Jun 11 16:46:31 2014 (r357509) @@ -0,0 +1,18 @@ +========================================================= +You need to create a PostgreSQL database for your logs: + + # su - postgres + $ createdb pglogd + $ psql pglogd < %%PREFIX%%/share/pglogd/pglogd_tables.sql + $ exit + +and copy %%PREFIX%%/share/pglogd/pglogd.conf +to %%PREFIX%%/etc/pglogd.conf + +pglogd can then be started with: + + # %%PREFIX%%/etc/rc.d/020.pglogd.sh start + +Read the complete documentation on configuring pglogd +and apache at http://www.digitalstratum.com/pglogd/ +========================================================= Modified: head/www/pglogd/pkg-plist ============================================================================== --- head/www/pglogd/pkg-plist Wed Jun 11 16:43:17 2014 (r357508) +++ head/www/pglogd/pkg-plist Wed Jun 11 16:46:31 2014 (r357509) @@ -6,7 +6,4 @@ share/pglogd/queries.txt share/pglogd/weblog_daily.sql share/pglogd/README share/pglogd/CHANGELOG -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 )