aboutsummaryrefslogtreecommitdiffstats
path: root/japanese/p5-Mail-SpamAssassin/pkg-install
diff options
context:
space:
mode:
authorrafan <rafan@FreeBSD.org>2008-02-07 12:42:43 +0800
committerrafan <rafan@FreeBSD.org>2008-02-07 12:42:43 +0800
commit6da799b84f3e7bb061cd271862b44858bc9bf4e2 (patch)
tree91e453142b4c070a7773c18ca1a70c1f2359fdec /japanese/p5-Mail-SpamAssassin/pkg-install
parent994d50960bf3c3de32b31926b64d7fb706d9f9a4 (diff)
downloadfreebsd-ports-gnome-6da799b84f3e7bb061cd271862b44858bc9bf4e2.tar.gz
freebsd-ports-gnome-6da799b84f3e7bb061cd271862b44858bc9bf4e2.tar.zst
freebsd-ports-gnome-6da799b84f3e7bb061cd271862b44858bc9bf4e2.zip
- Update to 3.2.4
- Sync pkg-install and pkg-deinstall with mail/p5-Mail-Spamassassin PR: ports/120201 Submitted by: TAOKA Fumiyoshi <fmysh at iijmio-mail.jp> (maintainer)
Diffstat (limited to 'japanese/p5-Mail-SpamAssassin/pkg-install')
-rw-r--r--japanese/p5-Mail-SpamAssassin/pkg-install41
1 files changed, 41 insertions, 0 deletions
diff --git a/japanese/p5-Mail-SpamAssassin/pkg-install b/japanese/p5-Mail-SpamAssassin/pkg-install
index fdb1fde81aef..54822a65ee96 100644
--- a/japanese/p5-Mail-SpamAssassin/pkg-install
+++ b/japanese/p5-Mail-SpamAssassin/pkg-install
@@ -1,4 +1,45 @@
#!/bin/sh
+PKG_PREFIX=${PKG_PREFIX:-/usr/local}
+
+ask() {
+ local question default answer
+
+ question=$1
+ default=$2
+ if [ -z "${PACKAGE_BUILDING}" -a -z "${BATCH}" ]; then
+ read -t120 -p "${question} [${default}]? " answer
+ fi
+ echo ${answer:-${default}}
+}
+
+yesno() {
+ local question default answer
+
+ question=$1
+ default=$2
+ while :; do
+ answer=$(ask "${question}" "${default}")
+ case "${answer}" in
+ [Yy]*) return 0;;
+ [Nn]*) return 1;;
+ esac
+ echo "Please answer yes or no."
+ done
+}
+
+if [ "$2" = "POST-INSTALL" ];then
+
+ if yesno "Do you wish to run sa-update to fetch new rules" "N";then
+ ${PKG_PREFIX}/bin/sa-update
+ fi
+ grep '^load.*Rule2XSBody' ${PKG_PREFIX}/etc/mail/spamassassin/v320.pre > /dev/null
+ if [ $? -eq 0 ];then
+ if yesno "Do you with to compile rules with re2c (will take a long time)" "N";then
+ ${PKG_PREFIX}/bin/sa-compile
+ fi
+ fi
+ exit 0
+fi # post-install
if [ "$2" != "PRE-INSTALL" ]; then
exit 0