- add PKGINSTALL / PKGDEINSTALL to backup and restore file(s).

This commit is contained in:
Yen-Ming Lee 2004-12-19 00:45:06 +00:00
parent db54709987
commit a72e57e994
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=124443
2 changed files with 22 additions and 2 deletions

View File

@ -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>

View File

@ -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