summaryrefslogtreecommitdiffstats
path: root/news
diff options
context:
space:
mode:
Diffstat (limited to 'news')
-rw-r--r--news/cleanfeed/Makefile7
-rw-r--r--news/cleanfeed/pkg-install17
2 files changed, 22 insertions, 2 deletions
diff --git a/news/cleanfeed/Makefile b/news/cleanfeed/Makefile
index 7520d02..a04d88c 100644
--- a/news/cleanfeed/Makefile
+++ b/news/cleanfeed/Makefile
@@ -11,7 +11,7 @@ CATEGORIES= news
MASTER_SITES= http://www.bofh.it/~md/cleanfeed/
EXTRACT_SUFX= .tgz
-MAINTAINER= leeym@FreeBSD.org
+MAINTAINER= ports@FreeBSD.org
COMMENT= Spam filter for Usenet news servers
RUN_DEPENDS= ${LOCALBASE}/news/bin/innd:${PORTSDIR}/news/inn
@@ -23,6 +23,7 @@ SHAREOWN= news
SHAREGRP= news
USE_REINPLACE= yes
INSTALL+= -b
+PKGDEINSTALL= ${PKGINSTALL}
.include <bsd.port.pre.mk>
@@ -37,6 +38,8 @@ do-install:
.for f in bad_adult_paths bad_cancel_paths bad_hosts bad_paths cleanfeed cleanfeed.local.sample
@${INSTALL_DATA} ${WRKSRC}/${f} ${LOCALBASE}/news/bin/filter
.endfor
- @cd ${LOCALBASE}/news/bin/filter; ${LN} -f cleanfeed filter_innd.pl
+
+post-install:
+ ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
.include <bsd.port.post.mk>
diff --git a/news/cleanfeed/pkg-install b/news/cleanfeed/pkg-install
new file mode 100644
index 0000000..c46663b
--- /dev/null
+++ b/news/cleanfeed/pkg-install
@@ -0,0 +1,17 @@
+#!/bin/sh
+
+PKGNAME=$1
+[ ! -n "${PKG_PREFIX}" ] && exit 1
+
+case $2 in
+ POST-INSTALL)
+ cd ${PKG_PREFIX}/news/bin/filter \
+ && mv filter_innd.pl filter_innd.pl.orig \
+ && ln -s cleanfeed filter_innd.pl
+ ;;
+ POST-DEINSTALL)
+ cd ${PKG_PREFIX}/news/bin/filter \
+ && mv filter_innd.pl.orig filter_innd.pl
+ ;;
+esac
+exit 0
OpenPOWER on IntegriCloud