aboutsummaryrefslogtreecommitdiff
path: root/mail/bsfilter/Makefile
blob: 98a8807188ccac51326a2586c76aa4459b25674f (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
PORTNAME=	bsfilter
PORTVERSION=	1.0.19
PORTREVISION=	3
CATEGORIES=	mail ruby
MASTER_SITES=	OSDN/bsfilter

MAINTAINER=	ports@FreeBSD.org
COMMENT=	Bayesian spam filter written in Ruby

LICENSE=	GPLv2

RUN_DEPENDS=	rubygem-gdbm>=2.0.0,2:databases/rubygem-gdbm

NO_BUILD=	yes
USE_RUBY=	yes
USES=		shebangfix tar:tgz
SHEBANG_FILES=	bsfilter/bsfilter

OPTIONS_DEFINE=	EXAMPLES

.include <bsd.port.pre.mk>

.if ${RUBY_VER:M3*} != ""
RUN_DEPENDS+=	rubygem-sdbm>=1.0.0:databases/rubygem-sdbm
.endif

do-install:
	${INSTALL_SCRIPT} ${WRKSRC}/bsfilter/${PORTNAME} ${STAGEDIR}${PREFIX}/bin/${PORTNAME}
	@${MKDIR} ${STAGEDIR}${EXAMPLESDIR}
.for FILE in bsfilter.conf.sample dot-qmail.sample
	${INSTALL_DATA} ${FILESDIR}/${FILE} ${STAGEDIR}${EXAMPLESDIR}
.endfor
.for DIR in mda mua
	cd ${WRKSRC} && ${COPYTREE_SHARE} ${DIR} ${STAGEDIR}${EXAMPLESDIR}
.endfor

.include <bsd.port.post.mk>