summaryrefslogtreecommitdiff
path: root/sysutils/epylog
diff options
context:
space:
mode:
authorJean-Yves Lefort <jylefort@FreeBSD.org>2005-07-20 03:54:44 +0000
committerJean-Yves Lefort <jylefort@FreeBSD.org>2005-07-20 03:54:44 +0000
commit406081a6ca10ad1ba6a6976c1ca67f7a2214f719 (patch)
tree86c1765476f12b8d1d0bf3a4da0b980743fff179 /sysutils/epylog
parent- allow 0 retries [1] (diff)
[1]:
- s|/var/log/secure|/var/log/auth.log| - move epylog.cron to configuration directory Moreover: - Preserve user-modified configuration files across updates - Use GNU_CONFIGURE - Depend on lynx and pass the lynx path to the configure script [1]: PR: ports/83136 Submitted by: maintainer
Diffstat (limited to 'sysutils/epylog')
-rw-r--r--sysutils/epylog/Makefile34
-rw-r--r--sysutils/epylog/files/patch-etc_Makefile.in25
-rw-r--r--sysutils/epylog/files/patch-etc_modules_Makefile.in11
-rw-r--r--sysutils/epylog/files/pkg-deinstall.in9
-rw-r--r--sysutils/epylog/files/pkg-install.in9
-rw-r--r--sysutils/epylog/pkg-plist27
6 files changed, 98 insertions, 17 deletions
diff --git a/sysutils/epylog/Makefile b/sysutils/epylog/Makefile
index 554cd7004939..480a41329a39 100644
--- a/sysutils/epylog/Makefile
+++ b/sysutils/epylog/Makefile
@@ -7,6 +7,7 @@
PORTNAME= epylog
PORTVERSION= 1.0.3
+PORTREVISION= 1
CATEGORIES= sysutils
MASTER_SITES= http://linux.duke.edu/projects/epylog/download/
@@ -14,15 +15,42 @@ MAINTAINER= alan@wave2.co.uk
COMMENT= Epylog is a syslog parser which mails you the output
BUILD_DEPENDS= ${PYTHON_SITELIBDIR}/libxml2.py:${PORTSDIR}/textproc/py-libxml2
-RUN_DEPENDS= ${PYTHON_SITELIBDIR}/libxml2.py:${PORTSDIR}/textproc/py-libxml2
+RUN_DEPENDS= ${PYTHON_SITELIBDIR}/libxml2.py:${PORTSDIR}/textproc/py-libxml2 \
+ lynx:${PORTSDIR}/www/lynx
MAN3= epylog.3
MAN5= epylog-modules.5 epylog.conf.5
MAN8= epylog.8
-HAS_CONFIGURE= yes
-CONFIGURE_ARGS= --with-lynx --prefix=${PREFIX}
+USE_REINPLACE= yes
+GNU_CONFIGURE= yes
+CONFIGURE_ARGS= --with-lynx=${LOCALBASE}/bin/lynx
USE_PERL5= yes
USE_PYTHON= yes
+CONF_FILES= epylog.conf \
+ modules.d/logins.conf \
+ modules.d/mail.conf \
+ modules.d/notices.conf \
+ modules.d/packets.conf \
+ modules.d/spamd.conf \
+ modules.d/weeder.conf \
+ notice_local.xml \
+ report_template.html \
+ weed_local.cf
+
+SUB_FILES= pkg-install pkg-deinstall
+SUB_LIST= CONF_FILES="${CONF_FILES}"
+
+post-patch:
+ @${REINPLACE_CMD} -e 's|$$sysconfdir/cron\.daily|$$sysconfdir/epylog|' \
+ ${WRKSRC}/configure
+ @${REINPLACE_CMD} -e 's|/var/log/secure|/var/log/auth.log|' \
+ ${WRKSRC}/etc/modules.d/logins.conf.in \
+ ${WRKSRC}/etc/modules.d/notices.conf.in \
+ ${WRKSRC}/etc/modules.d/weeder.conf.in
+
+post-install:
+ @PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
+
.include <bsd.port.mk>
diff --git a/sysutils/epylog/files/patch-etc_Makefile.in b/sysutils/epylog/files/patch-etc_Makefile.in
new file mode 100644
index 000000000000..bd41bbd4c9f0
--- /dev/null
+++ b/sysutils/epylog/files/patch-etc_Makefile.in
@@ -0,0 +1,25 @@
+--- etc/Makefile.in.orig Wed Jul 20 05:29:47 2005
++++ etc/Makefile.in Wed Jul 20 05:32:37 2005
+@@ -32,8 +32,8 @@
+
+ SUBDIRS = modules.d
+ INSTALLDIRS = $(pkgconfdir)
+-CFGFILES = epylog.conf notice_dist.xml notice_local.xml report_template.html \
+- trojans.list weed_dist.cf weed_local.cf
++CFGFILES = epylog.conf notice_local.xml report_template.html weed_local.cf
++FILES = notice_dist.xml trojans.list weed_dist.cf
+
+ all: all-stamp
+
+@@ -47,7 +47,10 @@
+
+ install: all installdirs
+ for CFGFILE in $(CFGFILES); do \
+- $(INSTALL_DATA) $$CFGFILE $(DESTDIR)$(pkgconfdir)/$$CFGFILE; \
++ $(INSTALL_DATA) $$CFGFILE $(DESTDIR)$(pkgconfdir)/$$CFGFILE.default; \
++ done
++ for FILE in $(FILES); do \
++ $(INSTALL_DATA) $$FILE $(DESTDIR)$(pkgconfdir); \
+ done
+ for subdir in $(SUBDIRS) ; do \
+ $(MAKE) -C $$subdir install ; \
diff --git a/sysutils/epylog/files/patch-etc_modules_Makefile.in b/sysutils/epylog/files/patch-etc_modules_Makefile.in
new file mode 100644
index 000000000000..c7f5f5e76dcd
--- /dev/null
+++ b/sysutils/epylog/files/patch-etc_modules_Makefile.in
@@ -0,0 +1,11 @@
+--- etc/modules.d/Makefile.in.orig Wed Jul 20 05:33:26 2005
++++ etc/modules.d/Makefile.in Wed Jul 20 05:33:26 2005
+@@ -43,7 +43,7 @@
+
+ install: all installdirs
+ for MCONF in $(MCONFS); do \
+- $(INSTALL_DATA) $$MCONF.conf $(DESTDIR)$(pkgconfdir)/modules.d/; \
++ $(INSTALL_DATA) $$MCONF.conf $(DESTDIR)$(pkgconfdir)/modules.d/$$MCONF.conf.default; \
+ done
+
+ uninstall:
diff --git a/sysutils/epylog/files/pkg-deinstall.in b/sysutils/epylog/files/pkg-deinstall.in
new file mode 100644
index 000000000000..3d4a699f4e8e
--- /dev/null
+++ b/sysutils/epylog/files/pkg-deinstall.in
@@ -0,0 +1,9 @@
+#!/bin/sh
+
+[ "$2" != "DEINSTALL" ] && exit 0
+
+for f in %%CONF_FILES%%; do
+ if cmp -s "${PKG_PREFIX}/etc/epylog/$f" "${PKG_PREFIX}/etc/epylog/$f.default"; then
+ rm -f "${PKG_PREFIX}/etc/epylog/$f"
+ fi
+done
diff --git a/sysutils/epylog/files/pkg-install.in b/sysutils/epylog/files/pkg-install.in
new file mode 100644
index 000000000000..e5230d62f16d
--- /dev/null
+++ b/sysutils/epylog/files/pkg-install.in
@@ -0,0 +1,9 @@
+#!/bin/sh
+
+[ "$2" != "POST-INSTALL" ] && exit 0
+
+for f in %%CONF_FILES%%; do
+ if ! [ -f "${PKG_PREFIX}/etc/epylog/$f" ]; then
+ cp -p "${PKG_PREFIX}/etc/epylog/$f.default" "${PKG_PREFIX}/etc/epylog/$f"
+ fi
+done
diff --git a/sysutils/epylog/pkg-plist b/sysutils/epylog/pkg-plist
index 3a964db1363d..cb95229fdc89 100644
--- a/sysutils/epylog/pkg-plist
+++ b/sysutils/epylog/pkg-plist
@@ -1,17 +1,17 @@
-etc/cron.daily/epylog.cron
-etc/epylog/epylog.conf
-etc/epylog/modules.d/logins.conf
-etc/epylog/modules.d/mail.conf
-etc/epylog/modules.d/notices.conf
-etc/epylog/modules.d/packets.conf
-etc/epylog/modules.d/spamd.conf
-etc/epylog/modules.d/weeder.conf
+etc/epylog/epylog.conf.default
+etc/epylog/epylog.cron
+etc/epylog/modules.d/logins.conf.default
+etc/epylog/modules.d/mail.conf.default
+etc/epylog/modules.d/notices.conf.default
+etc/epylog/modules.d/packets.conf.default
+etc/epylog/modules.d/spamd.conf.default
+etc/epylog/modules.d/weeder.conf.default
etc/epylog/notice_dist.xml
-etc/epylog/notice_local.xml
-etc/epylog/report_template.html
+etc/epylog/notice_local.xml.default
+etc/epylog/report_template.html.default
etc/epylog/trojans.list
etc/epylog/weed_dist.cf
-etc/epylog/weed_local.cf
+etc/epylog/weed_local.cf.default
lib/perl5/site_perl/epylog.pm
%%PYTHON_SITELIBDIR%%/epylog/__init__.py
%%PYTHON_SITELIBDIR%%/epylog/__init__.pyc
@@ -62,6 +62,5 @@ share/epylog/modules/weeder_mod.pyc
@dirrm share/doc/epylog-1.0.3/doc
@dirrm share/doc/epylog-1.0.3
@dirrm %%PYTHON_SITELIBDIR%%/epylog
-@dirrm etc/epylog/modules.d
-@dirrm etc/epylog
-@unexec rmdir %D/etc/cron.daily 2>/dev/null || true
+@unexec rmdir %D/etc/epylog/modules.d 2>/dev/null || true
+@unexec rmdir %D/etc/epylog 2>/dev/null || true