View | Details | Raw Unified | Return to bug 68732
Collapse All | Expand All

(-)amavisd-new/Makefile (-8 / +34 lines)
Lines 7-13 Link Here
7
# Based on amavisd ports makefile.
7
# Based on amavisd ports makefile.
8
8
9
PORTNAME=	amavisd-new
9
PORTNAME=	amavisd-new
10
PORTVERSION=	20030616.p9
10
PORTVERSION=	20040701
11
CATEGORIES=	security
11
CATEGORIES=	security
12
MASTER_SITES=	http://www.ijs.si/software/amavisd/ \
12
MASTER_SITES=	http://www.ijs.si/software/amavisd/ \
13
		http://mirrors.catpipe.net/amavisd-new/ \
13
		http://mirrors.catpipe.net/amavisd-new/ \
Lines 26-38 Link Here
26
		${SITE_PERL}/Archive/Zip.pm:${PORTSDIR}/archivers/p5-Archive-Zip \
26
		${SITE_PERL}/Archive/Zip.pm:${PORTSDIR}/archivers/p5-Archive-Zip \
27
		${SITE_PERL}/Net/Server.pm:${PORTSDIR}/net/p5-Net-Server \
27
		${SITE_PERL}/Net/Server.pm:${PORTSDIR}/net/p5-Net-Server \
28
		${SITE_PERL}/Mail/SpamAssassin.pm:${PORTSDIR}/mail/p5-Mail-SpamAssassin \
28
		${SITE_PERL}/Mail/SpamAssassin.pm:${PORTSDIR}/mail/p5-Mail-SpamAssassin \
29
		${SITE_PERL}/${PERL_ARCH}/BerkeleyDB.pm:${PORTSDIR}/databases/p5-BerkeleyDB \
29
		${LOCALBASE}/bin/arc:${PORTSDIR}/archivers/arc \
30
		${LOCALBASE}/bin/arc:${PORTSDIR}/archivers/arc \
30
		${LOCALBASE}/bin/unfreeze:${PORTSDIR}/archivers/freeze \
31
		${LOCALBASE}/bin/unfreeze:${PORTSDIR}/archivers/freeze \
31
		${LOCALBASE}/bin/lha:${PORTSDIR}/archivers/lha \
32
		${LOCALBASE}/bin/lha:${PORTSDIR}/archivers/lha \
32
		${LOCALBASE}/bin/lzop:${PORTSDIR}/archivers/lzop \
33
		${LOCALBASE}/bin/lzop:${PORTSDIR}/archivers/lzop \
33
		${LOCALBASE}/bin/unarj:${PORTSDIR}/archivers/unarj \
34
		${LOCALBASE}/bin/unarj:${PORTSDIR}/archivers/unarj \
34
		${LOCALBASE}/bin/unrar:${PORTSDIR}/archivers/unrar \
35
		${LOCALBASE}/bin/unrar:${PORTSDIR}/archivers/unrar \
35
		${LOCALBASE}/bin/zoo:${PORTSDIR}/archivers/zoo
36
		${LOCALBASE}/bin/zoo:${PORTSDIR}/archivers/zoo \
37
		${LOCALBASE}/bin/cabextract:${PORTSDIR}/archivers/cabextract \
38
		${LOCALBASE}/bin/rpm2cpio.pl:${PORTSDIR}/archivers/rpm2cpio
36
39
37
USE_PERL5_RUN=	yes
40
USE_PERL5_RUN=	yes
38
USE_RC_SUBR=	yes
41
USE_RC_SUBR=	yes
Lines 48-53 Link Here
48
51
49
WRKSRC=		${WRKDIR}/${PORTNAME}-${PORTVERSION:C/\.p.+//}
52
WRKSRC=		${WRKDIR}/${PORTNAME}-${PORTVERSION:C/\.p.+//}
50
53
54
SCRIPTS_ENV=	WRKDIRPREFIX="${WRKDIRPREFIX}" \
55
		MKDIR="${MKDIR}"
56
51
.if !exists(/usr/lib/libmilter.so) && !exists(${PREFIX}/lib/libmilter.so)
57
.if !exists(/usr/lib/libmilter.so) && !exists(${PREFIX}/lib/libmilter.so)
52
AMAVIS_NOMILTER="@comment "
58
AMAVIS_NOMILTER="@comment "
53
.endif
59
.endif
Lines 72-83 Link Here
72
		-e 's,%%PREFIX%%,${PREFIX},g' \
78
		-e 's,%%PREFIX%%,${PREFIX},g' \
73
		-e 's,%%RC_SUBR%%,${RC_SUBR},g'
79
		-e 's,%%RC_SUBR%%,${RC_SUBR},g'
74
80
81
pre-fetch:
82
	@${SETENV} ${SCRIPTS_ENV} ${SH} ${SCRIPTDIR}/configure
83
84
.if exists(${WRKDIRPREFIX}${.CURDIR}/Makefile.inc)
85
.include "${WRKDIRPREFIX}${.CURDIR}/Makefile.inc"
86
.endif
87
88
.include <bsd.port.pre.mk>
89
75
pre-build:
90
pre-build:
91
.if ${PERL_LEVEL} < 500802
92
# add warning to greeting message when running perl older than 5.8.2
93
	${SED} -e 's,%%PERLVERSION%%,${PERL_VERSION},g' < ${FILESDIR}/perlwarning.tmpl > ${WRKDIR}/MESSAGE
94
.endif
95
.if ${PERL_LEVEL} < 500600
96
# remove taint checks when running under perl 5.00503
97
	${SED} -e 's,^\#\!/usr/bin/perl -T,\#\!/usr/bin/perl,' < ${WRKSRC}/amavisd > ${WRKDIR}/amavisd
98
.endif
76
	for f in amavisd.sh amavis-milter.sh INSTALL DEINSTALL MESSAGE; do \
99
	for f in amavisd.sh amavis-milter.sh INSTALL DEINSTALL MESSAGE; do \
77
		${SED} ${SED_SCRIPT} < ${FILESDIR}/$${f}.tmpl > ${WRKDIR}/$${f}; \
100
		${SED} ${SED_SCRIPT} < ${FILESDIR}/$${f}.tmpl >> ${WRKDIR}/$${f}; \
78
	done
101
	done
79
	for f in amavisd.conf amavisd; do \
102
	for f in amavisd.conf amavisd.conf-sample amavisd; do \
80
		${SED} ${SED_SCRIPT} < ${WRKSRC}/$${f} > ${WRKDIR}/$${f}; \
103
		${SED} ${SED_SCRIPT} < ${WRKSRC}/$${f} >> ${WRKDIR}/$${f}; \
81
	done
104
	done
82
105
83
pre-install:
106
pre-install:
Lines 91-100 Link Here
91
.endif
114
.endif
92
	${INSTALL_SCRIPT} ${WRKDIR}/amavisd ${PREFIX}/sbin
115
	${INSTALL_SCRIPT} ${WRKDIR}/amavisd ${PREFIX}/sbin
93
	${INSTALL_SCRIPT} ${WRKDIR}/amavisd.conf ${PREFIX}/etc/amavisd.conf-dist
116
	${INSTALL_SCRIPT} ${WRKDIR}/amavisd.conf ${PREFIX}/etc/amavisd.conf-dist
117
	${INSTALL_SCRIPT} ${WRKDIR}/amavisd.conf-sample ${PREFIX}/etc/amavisd.conf-sample
118
	${INSTALL_SCRIPT} ${WRKSRC}/amavisd.conf-default ${PREFIX}/etc/amavisd.conf-default
94
	${INSTALL_SCRIPT} ${WRKDIR}/amavisd.sh ${PREFIX}/etc/rc.d
119
	${INSTALL_SCRIPT} ${WRKDIR}/amavisd.sh ${PREFIX}/etc/rc.d
95
.if !defined(NOPORTDOCS)
120
.if !defined(NOPORTDOCS)
96
	@${MKDIR} ${DOCSDIR}
121
	@${MKDIR} ${DOCSDIR}
97
.for FILE in AAAREADME.first INSTALL LICENSE RELEASE_NOTES README_FILES/*
122
.for FILE in AAAREADME.first INSTALL LDAP.schema LICENSE RELEASE_NOTES README_FILES/*
98
	${INSTALL_DATA} ${WRKSRC}/${FILE} ${DOCSDIR}
123
	${INSTALL_DATA} ${WRKSRC}/${FILE} ${DOCSDIR}
99
.endfor
124
.endfor
100
125
Lines 102-109 Link Here
102
	@${CAT} ${PKGMESSAGE}
127
	@${CAT} ${PKGMESSAGE}
103
.endif
128
.endif
104
129
105
.include <bsd.port.pre.mk>
106
107
.if ${PERL_LEVEL} < 500800
130
.if ${PERL_LEVEL} < 500800
108
RUN_DEPENDS+=	${SITE_PERL}/${PERL_ARCH}/Digest/MD5.pm:${PORTSDIR}/security/p5-Digest-MD5 \
131
RUN_DEPENDS+=	${SITE_PERL}/${PERL_ARCH}/Digest/MD5.pm:${PORTSDIR}/security/p5-Digest-MD5 \
109
		${SITE_PERL}/${PERL_ARCH}/Time/HiRes.pm:${PORTSDIR}/devel/p5-Time-HiRes
132
		${SITE_PERL}/${PERL_ARCH}/Time/HiRes.pm:${PORTSDIR}/devel/p5-Time-HiRes
Lines 112-116 Link Here
112
.if ${PERL_LEVEL} < 500600
135
.if ${PERL_LEVEL} < 500600
113
RUN_DEPENDS+=	${SITE_PERL}/${PERL_ARCH}/IO/Socket/UNIX.pm:${PORTSDIR}/devel/p5-IO
136
RUN_DEPENDS+=	${SITE_PERL}/${PERL_ARCH}/IO/Socket/UNIX.pm:${PORTSDIR}/devel/p5-IO
114
.endif
137
.endif
138
139
post-clean:
140
	@${RM} -f ${WRKDIRPREFIX}${.CURDIR}/Makefile.inc
115
141
116
.include <bsd.port.post.mk>
142
.include <bsd.port.post.mk>
(-)amavisd-new/distinfo (-2 / +2 lines)
Lines 1-2 Link Here
1
MD5 (amavisd-new-20030616-p9.tar.gz) = 4c96fadc57a5de84cc3bc6b548b46aff
1
MD5 (amavisd-new-20040701.tar.gz) = d5566eeaf1e47b6c856f4e676e93d584
2
SIZE (amavisd-new-20030616-p9.tar.gz) = 363756
2
SIZE (amavisd-new-20040701.tar.gz) = 451622
(-)amavisd-new/files/INSTALL.tmpl (+2 lines)
Lines 41-46 Link Here
41
41
42
    /usr/bin/install -o ${USER} -g ${GROUP} -m 750 -d ${DIR}
42
    /usr/bin/install -o ${USER} -g ${GROUP} -m 750 -d ${DIR}
43
    echo "Created \"${DIR}\" directory."
43
    echo "Created \"${DIR}\" directory."
44
    /usr/bin/install -o ${USER} -g ${GROUP} -m 750 -d ${DIR}/db
45
    echo "Created \"${DIR}/db\" directory."
44
    /usr/bin/install -o ${USER} -g ${GROUP} -m 750 -d ${QUARANTINE}
46
    /usr/bin/install -o ${USER} -g ${GROUP} -m 750 -d ${QUARANTINE}
45
    echo "Created \"${QUARANTINE}\" directory."    
47
    echo "Created \"${QUARANTINE}\" directory."    
46
fi
48
fi
(-)amavisd-new/files/MESSAGE.tmpl (-7 / +11 lines)
Lines 1-9 Link Here
1
1
2
*******************************************************************
2
*******************************************************************
3
 To use amavisd-new, you need to install at least one virus scanner.
3
 To use amavisd-new, you need to install at least one virus scanner.
4
 For example McAfee VirusScan is available as a FreeBSD port
4
 The following virus scanners are available in the FreeBSD ports
5
 in /usr/ports/security/vscan and Clam Antivirus is available
5
 collection:
6
 in /usr/ports/security/clamav.
6
 
7
 /usr/ports/security/vscan	McAfee VirusScan
8
 /usr/ports/security/clamav	Clam Antivirus
9
 /usr/ports/security/f-prot	F-Prot Antivirus
10
 /usr/ports/security/drweb	DrWeb antivirus suite
7
11
8
 Enable amavisd-new in /etc/rc.conf with the following line:
12
 Enable amavisd-new in /etc/rc.conf with the following line:
9
13
Lines 14-22 Link Here
14
18
15
    amavis_milter_enable="YES"
19
    amavis_milter_enable="YES"
16
20
17
 A configuration template is available in %%PREFIX%%/etc
21
 Configuration templates are available in %%PREFIX%%/etc
18
 as amavisd.conf-dist. Copy it to amavisd.conf and edit it to
22
 as amavisd.conf-dist, amavisd.conf-sample and amavisd.conf-default.
19
 suit your needs. Documentation is available in
23
 Copy any of them to amavisd.conf and edit the file to suit your
20
 %%DOCSDIR%%.
24
 needs. Documentation is available in %%DOCSDIR%%.
21
*******************************************************************
25
*******************************************************************
22
26
(-)amavisd-new/files/amavisd.sh.tmpl (-1 / +1 lines)
Lines 21-27 Link Here
21
21
22
command=%%PREFIX%%/sbin/amavisd > /dev/null 2>&1
22
command=%%PREFIX%%/sbin/amavisd > /dev/null 2>&1
23
23
24
amavisd_user=%%AMAVISUSER%%
24
amavisd_flags="-u %%AMAVISUSER%%"
25
25
26
pidfile=%%AMAVISDIR%%/amavisd.pid
26
pidfile=%%AMAVISDIR%%/amavisd.pid
27
required_files=%%PREFIX%%/etc/amavisd.conf
27
required_files=%%PREFIX%%/etc/amavisd.conf
(-)amavisd-new/files/patch-amavisd (-8 / +8 lines)
Lines 1-11 Link Here
1
--- amavisd.orig	Fri Apr  2 21:33:50 2004
1
--- amavisd.orig	Sun Jul  4 03:19:35 2004
2
+++ amavisd	Sat Apr  3 12:29:41 2004
2
+++ amavisd	Sun Jul  4 11:28:36 2004
3
@@ -6461,7 +6461,7 @@
3
@@ -7367,7 +7367,7 @@
4
 my($amavisd_path) = find_program_path($0, [split(/:/, $path, -1)], 0);
4
 $Amavis::Conf::log_recip_templ = $1
5
 $amavisd_path = $1 if $amavisd_path=~m{^([A-Za-z0-9/._=+-]+)$(?!\n)}; # untaint
5
   if $Amavis::Conf::log_recip_templ=~/^(.*?)[\r\n]+\z/s;
6
 
6
 
7
-my($config_file) = '/etc/amavisd.conf';  # default location of config file
7
-my($config_file) = '/etc/amavisd.conf';  # default location of config file
8
+my($config_file) = '%%PREFIX%%/etc/amavisd.conf';  # default location of config file
8
+my($config_file) = '%%PREFIX%%/etc/amavisd.conf';  # default location of config file
9
 if (@ARGV >= 2 && $ARGV[0] eq '-c') {    # override by command line option -c
9
 
10
     shift @ARGV; $config_file = shift @ARGV;
10
 # Consider droping privileges early, before reading config file.
11
     $config_file = $1 if $config_file=~m{^([A-Za-z0-9/._=+-]+)$(?!\n)};# untaint
11
 # This is only possible if running under chroot will not be needed.
(-)amavisd-new/files/patch-amavisd-sample.conf (+40 lines)
Line 0 Link Here
1
--- amavisd.conf-sample.orig	Mon Nov 10 00:07:53 2003
2
+++ amavisd.conf-sample	Tue Nov 11 22:48:05 2003
3
@@ -51,7 +51,7 @@
4
 # $MYHOME serves as a quick default for some other configuration settings.
5
 # More refined control is available with each individual setting further down.
6
 # $MYHOME is not used directly by the program. No trailing slash!
7
-#$MYHOME = '/var/lib/amavis';   # (default is '/var/amavis')
8
+$MYHOME = '%%AMAVISDIR%%';   # (default is '/var/amavis')
9
 
10
 # $mydomain serves as a quick default for some other configuration settings.
11
 # More refined control is available with each individual setting further down.
12
@@ -60,8 +60,8 @@
13
 
14
 # Set the user and group to which the daemon will change if started as root
15
 # (otherwise just keeps the UID unchanged, and these settings have no effect):
16
-$daemon_user  = 'vscan';	# (no default;  customary: vscan or amavis)
17
-$daemon_group = 'sweep';	# (no default;  customary: vscan or amavis)
18
+$daemon_user  = '%%AMAVISUSER%%';	# (no default;  customary: vscan or amavis)
19
+$daemon_group = '%%AMAVISGROUP%%';	# (no default;  customary: vscan or amavis)
20
 
21
 # Runtime working directory (cwd), and a place where
22
 # temporary directories for unpacking mail are created.
23
@@ -274,7 +274,7 @@
24
 # 3: server, client
25
 # 4: decompose parts
26
 # 5: more debug details
27
-$log_level = 2;		  # (defaults to 0)
28
+$log_level = 0;		  # (defaults to 0)
29
 
30
 # Customizable template for the most interesting log file entry (e.g. with
31
 # $log_level=0) (take care to properly quote Perl special characters like '\')
32
@@ -510,7 +510,7 @@
33
 #   or a directory (no trailing slash)
34
 #   (the default value is undef, meaning no quarantine)
35
 #
36
-$QUARANTINEDIR = '/var/virusmails';
37
+$QUARANTINEDIR = '%%AMAVISQUARANTINE%%';
38
 
39
 #$virus_quarantine_method = "local:virus-%i-%n";    # default
40
 #$spam_quarantine_method  = "local:spam-%b-%i-%n";  # default
(-)amavisd-new/files/patch-amavisd.conf (-37 / +28 lines)
Lines 1-40 Link Here
1
--- amavisd.conf.orig	Mon Nov 10 00:07:53 2003
1
--- amavisd.conf.orig	Thu Jul  1 22:04:36 2004
2
+++ amavisd.conf	Tue Nov 11 22:48:05 2003
2
+++ amavisd.conf	Sun Jul  4 11:32:17 2004
3
@@ -51,7 +51,7 @@
3
@@ -9,7 +9,7 @@
4
 # $MYHOME serves as a quick default for some other configuration settings.
4
 # MUST BE SET (no useful default):
5
 # More refined control is available with each individual setting further down.
5
 
6
 # $MYHOME is not used directly by the program. No trailing slash!
6
 $mydomain = 'example.com';
7
-#$MYHOME = '/var/lib/amavis';   # (default is '/var/amavis')
7
-$MYHOME   = '/var/amavis';
8
+$MYHOME = '%%AMAVISDIR%%';   # (default is '/var/amavis')
8
+$MYHOME   = '%%AMAVISDIR%%';
9
 
9
 $TEMPBASE = "$MYHOME/tmp";
10
 # $mydomain serves as a quick default for some other configuration settings.
10
 
11
 # More refined control is available with each individual setting further down.
11
 
12
@@ -60,8 +60,8 @@
12
@@ -19,8 +19,8 @@
13
 
13
 # @bypass_spam_checks_maps  = (1);  # uncomment to DISABLE anti-spam code
14
 # Set the user and group to which the daemon will change if started as root
14
 
15
 # (otherwise just keeps the UID unchanged, and these settings have no effect):
15
 $max_servers = 2;         # number of pre-forked children
16
-$daemon_user  = 'vscan';	# (no default;  customary: vscan or amavis)
16
-$daemon_user  = 'vscan';  # (no default;  customary: vscan or amavis)
17
-$daemon_group = 'sweep';	# (no default;  customary: vscan or amavis)
17
-$daemon_group = 'vscan';  # (no default;  customary: vscan or amavis)
18
+$daemon_user  = '%%AMAVISUSER%%';	# (no default;  customary: vscan or amavis)
18
+$daemon_user  = '%%AMAVISUSER%%';  # (no default;  customary: vscan or amavis)
19
+$daemon_group = '%%AMAVISGROUP%%';	# (no default;  customary: vscan or amavis)
19
+$daemon_group = '%%AMAVISGROUP%%';  # (no default;  customary: vscan or amavis)
20
 
20
 @local_domains_maps = ( [".$mydomain"] );
21
 # Runtime working directory (cwd), and a place where
21
 
22
 # temporary directories for unpacking mail are created.
22
 $log_level = 0;
23
@@ -274,7 +274,7 @@
23
@@ -28,7 +28,7 @@
24
 # 3: server, client
24
 $DO_SYSLOG = 1;
25
 # 4: decompose parts
25
 $SYSLOG_LEVEL = 'mail.info';
26
 # 5: more debug details
26
 $ENV{TMPDIR} = $TEMPBASE;
27
-$log_level = 2;		  # (defaults to 0)
28
+$log_level = 0;		  # (defaults to 0)
29
 
30
 # Customizable template for the most interesting log file entry (e.g. with
31
 # $log_level=0) (take care to properly quote Perl special characters like '\')
32
@@ -510,7 +510,7 @@
33
 #   or a directory (no trailing slash)
34
 #   (the default value is undef, meaning no quarantine)
35
 #
36
-$QUARANTINEDIR = '/var/virusmails';
27
-$QUARANTINEDIR = '/var/virusmails';
37
+$QUARANTINEDIR = '%%AMAVISQUARANTINE%%';
28
+$QUARANTINEDIR = '%%AMAVISQUARANTINE%%';
29
 # $daemon_chroot_dir = $MYHOME;  # (default is undef, meaning: do not chroot)
38
 
30
 
39
 #$virus_quarantine_method = "local:virus-%i-%n";    # default
31
 $inet_socket_port = 10024;   # accept SMTP on this local TCP port(s) (Postfix)
40
 #$spam_quarantine_method  = "local:spam-%b-%i-%n";  # default
(-)amavisd-new/files/perlwarning.tmpl (+10 lines)
Line 0 Link Here
1
2
*******************************************************************
3
 WARNING: You appear to be running perl version %%PERLVERSION%%.
4
5
 amavisd-new has been tested and is guaranteed to run only with
6
 perl 5.8.2 and above. There are numerous problems with amavisd-new
7
 when running under previous perl versions, including perl crashes,
8
 taint bugs and others.  You are strongly advised to upgrade your
9
 perl by using the /usr/ports/lang/perl5.8 port.
10
*******************************************************************
(-)amavisd-new/pkg-plist (+3 lines)
Lines 1-5 Link Here
1
%%PORTDOCS%%%%DOCSDIR%%/AAAREADME.first
1
%%PORTDOCS%%%%DOCSDIR%%/AAAREADME.first
2
%%PORTDOCS%%%%DOCSDIR%%/INSTALL
2
%%PORTDOCS%%%%DOCSDIR%%/INSTALL
3
%%PORTDOCS%%%%DOCSDIR%%/LDAP.schema
3
%%PORTDOCS%%%%DOCSDIR%%/LICENSE
4
%%PORTDOCS%%%%DOCSDIR%%/LICENSE
4
%%PORTDOCS%%%%DOCSDIR%%/README.chroot
5
%%PORTDOCS%%%%DOCSDIR%%/README.chroot
5
%%PORTDOCS%%%%DOCSDIR%%/README.contributed
6
%%PORTDOCS%%%%DOCSDIR%%/README.contributed
Lines 21-27 Link Here
21
%%PORTDOCS%%%%DOCSDIR%%/README.sendmail-dual
22
%%PORTDOCS%%%%DOCSDIR%%/README.sendmail-dual
22
%%PORTDOCS%%%%DOCSDIR%%/RELEASE_NOTES
23
%%PORTDOCS%%%%DOCSDIR%%/RELEASE_NOTES
23
%%PORTDOCS%%@dirrm %%DOCSDIR%%
24
%%PORTDOCS%%@dirrm %%DOCSDIR%%
25
etc/amavisd.conf-default
24
etc/amavisd.conf-dist
26
etc/amavisd.conf-dist
27
etc/amavisd.conf-sample
25
%%AMAVIS_NOMILTER%%etc/rc.d/amavis-milter.sh
28
%%AMAVIS_NOMILTER%%etc/rc.d/amavis-milter.sh
26
etc/rc.d/amavisd.sh
29
etc/rc.d/amavisd.sh
27
%%AMAVIS_NOMILTER%%sbin/amavis
30
%%AMAVIS_NOMILTER%%sbin/amavis
(-)amavisd-new/scripts/configure (+80 lines)
Line 0 Link Here
1
#!/bin/sh
2
# $FreeBSD$
3
4
if [ -f ${WRKDIRPREFIX}${CURDIR}/Makefile.inc ]; then
5
	exit
6
fi
7
8
tempfile=`mktemp -t checklist`
9
10
if [ "${AMAVISD_NEW_OPTIONS}" ]; then
11
	set ${AMAVISD_NEW_OPTIONS}
12
fi
13
14
for i; do
15
	eval status_$i=ON
16
done
17
	
18
if [ -z "${BATCH}" ]; then
19
	/usr/bin/dialog --title "Amavisd-new configuration options" --clear \
20
			--checklist "\n\
21
Please select desired options:" -1 -1 4 \
22
MySQL	"MySQL support" "$status_MySQL" \
23
PgSQL	"PostgreSQL support" "$status_PgSQL" \
24
LDAP	"LDAP support" "$status_LDAP" \
25
2> $tempfile
26
27
	retval=$?
28
29
	if [ -s $tempfile ]; then
30
		set `sed 's/"//g' $tempfile`
31
	fi
32
	rm -f $tempfile
33
34
	case $retval in
35
		0)	if [ -z "$*" ]; then
36
				echo "Nothing selected"
37
			fi
38
			;;
39
		1)	echo "Cancel pressed."
40
			exit 1
41
			;;
42
	esac
43
fi
44
45
${MKDIR} ${WRKDIRPREFIX}${CURDIR}
46
exec > ${WRKDIRPREFIX}${CURDIR}/Makefile.inc
47
48
echo "PREFIX=   ${PREFIX}"
49
50
SUB_MYSQL="@comment "
51
SUB_PGSQL="@comment "
52
SUB_LDAP="@comment "
53
54
while [ "$1" ]; do
55
	case $1 in
56
		MySQL)
57
			echo "USE_MYSQL=	yes"
58
			echo "RUN_DEPENDS+=	\${SITE_PERL}/\${PERL_ARCH}/Mysql.pm:\${PORTSDIR}/databases/p5-DBD-mysql"
59
			SUB_MYSQL=""
60
			;;
61
		PgSQL)
62
			echo "RUN_DEPENDS+=	\${SITE_PERL}/\${PERL_ARCH}/DBD/Pg.pm:\${PORTSDIR}/databases/p5-DBD-Pg"
63
			SUB_PGSQL=""
64
			;;
65
		LDAP)
66
			echo "RUN_DEPENDS+=	\${SITE_PERL}/Net/LDAP.pm:\${PORTSDIR}/net/p5-perl-ldap"
67
			SUB_LDAP=""
68
			;;
69
		*)
70
			echo "Unknown option(s): $*" > /dev/stderr
71
			rm -f ${WRKDIRPREFIX}${CURDIR}/Makefile.inc
72
			exit 1
73
			;;
74
	esac
75
	shift
76
done
77
78
echo "PLIST_SUB+=	SUB_MYSQL=\"${SUB_MYSQL}\""
79
echo "PLIST_SUB+=	SUB_PGSQL=\"${SUB_PGSQL}\""
80
echo "PLIST_SUB+=	SUB_LDAP=\"${SUB_LDAP}\""

Return to bug 68732