blob: e3b90ed159a2d81adc2ef4650838c907d8a1e1d5 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
|
# New ports collection makefile for: drweb_sendmail
# Date created: 14 August 2001
# Whom: Anton Voronin <anton@urc.ac.ru>
#
# $FreeBSD$
#
PORTNAME= drweb_sendmail
PORTVERSION= 4.26
PORTREVISION= 6
CATEGORIES= security mail
MASTER_SITES= http://www.drweb.ru/ftp/web_pub/
DISTNAME= drwebd-${PORTVERSION}-freebsd4
EXTRACT_SUFX= .tgz
MAINTAINER= anton@urc.ac.ru
RUN_DEPENDS= ${LOCALBASE}/drweb/drwebd:${PORTSDIR}/security/drweb
WRKSRC= ${WRKDIR}/${DISTNAME}/clients/drwebdc
.include <bsd.port.pre.mk>
INST_PREFIX= ${PREFIX}/${PORTNAME}
WITH_DRWEBSMF_SENDMAIL_DIR= /usr/src/contrib/sendmail
LIBSMUTIL_DIR= /usr/src/lib/libsmutil
DOC_DIR= ${PREFIX}/share/doc/drweb-sendmail
.if !defined(WITH_DRWEBSMF_HOSTNAME)
.if defined(BATCH)
WITH_DRWEBSMF_HOSTNAME= your.domain.name
.else
WITH_DRWEBSMF_HOSTNAME!=hostname
.endif
.endif
.if exists( ${WITH_DRWEBSMF_SENDMAIL_DIR}/include/libmilter/mfapi.h )
SENDMAIL_VERSION!= ${AWK} '/^sendmail [0-9.]+$$/{print $$2}' ${WITH_DRWEBSMF_SENDMAIL_DIR}/FREEBSD-upgrade
SENDMAIL_MAJOR!= ${ECHO} ${SENDMAIL_VERSION} | ${AWK} 'BEGIN{ FS="." }{ print $$1 }'
SENDMAIL_MINOR!= ${ECHO} ${SENDMAIL_VERSION} | ${AWK} 'BEGIN{ FS="." }{ print $$2 }'
.if ${SENDMAIL_MAJOR} > 8 || ${SENDMAIL_MAJOR} == 8 && ${SENDMAIL_MINOR} >= 12
SENDMAIL8_12= y
.elif ${SENDMAIL_MAJOR} == 8 && ${SENDMAIL_MINOR} >= 10
SENDMAIL8_12= n
.else
IGNORE= "uses Sendmail sources that are expected to have version 8.10.0 or newer. Your system sources are too old - please upgrade them"
.endif
.else
IGNORE= "depends on the Sendmail sources. Please place them somewhere first and point WITH_DRWEBSMF_SENDMAIL_DIR there"
.endif
post-extract:
cd ${WRKDIR}/${DISTNAME} && ${TAR} -xzf ${WRKDIR}/${DISTNAME}/${DISTNAME}.tar.gz clients/drwebdc clients/sendmail
post-configure:
${MKDIR} ${WRKSRC}/libmilter ${WRKSRC}/libsmutil
${CP} ${FILESDIR}/Makefile.libmilter ${WRKSRC}/libmilter/Makefile
${CP} ${FILESDIR}/Makefile.libsmutil ${WRKSRC}/libsmutil/Makefile
.if ${SENDMAIL_VERSION} == "8.11.1"
${CP} ${WITH_DRWEBSMF_SENDMAIL_DIR}/libmilter/listener.c ${WRKSRC}/libmilter
cd ${WRKSRC}/libmilter && ${PATCH} < ${WRKSRC}/../sendmail/listener-8.11.1.patch
.elif ${SENDMAIL_VERSION} == "8.12.0"
${CP} ${WITH_DRWEBSMF_SENDMAIL_DIR}/libmilter/listener.c ${WRKSRC}/libmilter
cd ${WRKSRC}/libmilter && ${PATCH} < ${WRKSRC}/../sendmail/listener-8.12.0.patch
.endif
cd ${WRKSRC}/libmilter && ${MAKE} clean && ${MAKE} SENDMAIL_DIR=${WITH_DRWEBSMF_SENDMAIL_DIR}
cd ${WRKSRC}/libsmutil && ${MAKE} clean && ${MAKE} SENDMAIL_DIR=${WITH_DRWEBSMF_SENDMAIL_DIR}
cd ${WRKSRC} && { \
${ECHO} y; \
${ECHO} n; \
${ECHO} y; \
${ECHO} ${SENDMAIL8_12} ; \
${ECHO} ${WITH_DRWEBSMF_SENDMAIL_DIR} ; \
${ECHO} ${CFLAGS} ; \
${ECHO} y; \
} | ./configure
pre-install:
cd ${WRKSRC}/../sendmail && { \
${ECHO} y; \
${ECHO} "${PREFIX}/sbin"; \
${ECHO} ; \
${ECHO} u; \
${ECHO} /var/run/drweb-smf.sock; \
${ECHO} root; \
${ECHO} "${PREFIX}/drweb/infected.!!!"; \
${ECHO} y; \
${ECHO} /tmp; \
${ECHO} y; \
${ECHO} ; \
${ECHO} postmaster@${WITH_DRWEBSMF_HOSTNAME}; \
${ECHO} y; \
${ECHO} y; \
${ECHO} d; \
${ECHO} t; \
${ECHO} t; \
${ECHO} t; \
${ECHO} a; \
${ECHO} r; \
${ECHO} 160000; \
${ECHO} ${SENDMAIL8_12} ; \
${ECHO} n; \
${ECHO} y; \
${ECHO} ; \
} | ./configure
do-install:
${MKDIR} ${DOC_DIR}
${INSTALL_PROGRAM} ${WRKSRC}/drweb-smf ${PREFIX}/sbin/
${INSTALL_PROGRAM} ${WRKSRC}/drwebdc ${PREFIX}/drweb/
cd ${WRKSRC}/../sendmail; \
${INSTALL_DATA} example* readme.* sendmail.*.addon ${DOC_DIR}
cd ${WRKSRC}/../sendmail; \
${INSTALL_DATA} drweb-sendmail.sh \
${PREFIX}/etc/rc.d/drweb-sendmail.sh-dist
if [ ! -f ${PREFIX}/etc/rc.d/drweb-sendmail.sh ] ; then \
cd ${WRKSRC}/../sendmail; \
${INSTALL_SCRIPT} drweb-sendmail.sh \
${PREFIX}/etc/rc.d/; \
fi
post-install:
@echo
@${CAT} pkg-message
@echo
@echo "Read documentation about additional sendmail tuning needed"
@echo "in ${DOC_DIR}."
.include <bsd.port.post.mk>
|