1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-01 05:45:45 +00:00
freebsd-ports/mail/p5-FuzzyOcr/Makefile
Philip M. Gollucci b59621d3ae - Revert ports/165605 as requested by portmgr@
Note: devel/p5-B-Size and devel/p5-Devel-Arena
where intentionally not restored.

PR:             ports/165605
Approved by:    portmgr (bapt)
Feature safe:   yes (I sure hope so)
2012-03-13 16:15:36 +00:00

86 lines
2.7 KiB
Makefile

# New ports collection makefile for: FuzzyOcr
# Date Created: 2006-11-03
# Whom: Shaun Amott <shaun@FreeBSD.org>
#
# $FreeBSD$
#
PORTNAME= FuzzyOcr
DISTVERSION= 2.3b
PORTREVISION= 8
PORTEPOCH= 1
CATEGORIES= mail perl5
MASTER_SITES= http://users.own-hero.net/~decoder/${PORTNAME:L}/
PKGNAMEPREFIX= p5-
DISTNAME= ${PORTNAME:L}-${DISTVERSION}
MAINTAINER= ports@FreeBSD.org
COMMENT= Plugin for SpamAssassin which scans image attachments for spam
RUN_DEPENDS= giftopnm:${PORTSDIR}/graphics/netpbm \
import:${PORTSDIR}/graphics/ImageMagick \
gocr:${PORTSDIR}/graphics/gocr \
gif2ps:${PORTSDIR}/graphics/giflib \
spamassassin:${PORTSDIR}/mail/p5-Mail-SpamAssassin \
${SITE_PERL}/${PERL_ARCH}/String/Approx.pm:${PORTSDIR}/devel/p5-String-Approx
CONFLICTS= p5-FuzzyOcr-devel-[0-9]*
USE_PERL5= yes
NO_BUILD= yes
WRKSRC= ${WRKDIR}/${PORTNAME}-${DISTVERSION}
PORTDOCS= FAQ samples
PORTDOCS_F= FAQ samples/README samples/animated-gif.eml \
samples/corrupted-gif.eml samples/jpeg.eml samples/png.eml
SUB_FILES= pkg-message
#-----------------------------------------------------------------------
# The plugin is installed twice: once where it should go, and once where
# it actually works from. This will hopefully be fixed at some point.
#-----------------------------------------------------------------------
SA_PLUGINDIR?= Mail/SpamAssassin/Plugin
SA_CONFIGDIR?= etc/mail/spamassassin
PLIST_FILES= ${SA_CONFIGDIR}/FuzzyOcr.pm \
%%SITE_PERL%%/${SA_PLUGINDIR}/FuzzyOcr.pm \
%%EXAMPLESDIR%%/FuzzyOcr.cf %%EXAMPLESDIR%%/FuzzyOcr.words
PLIST_DIRS= %%EXAMPLESDIR%%
.include <bsd.port.pre.mk>
.if ${PERL_LEVEL} < 500703
RUN_DEPENDS+= p5-Digest-MD5>=2.16:${PORTSDIR}/security/p5-Digest-MD5
.endif
post-patch:
@${REINPLACE_CMD} -e 's,/usr/bin,${LOCALBASE}/bin,g' \
-e 's,/bin/grep,/usr/bin/grep,g' \
-e 's,/etc/mail,${LOCALBASE}/etc/mail,g' \
${WRKSRC}/FuzzyOcr.??
@${REINPLACE_CMD} -e 's,package FuzzyOcr;,package Mail::SpamAssassin::Plugin::FuzzyOcr;,' \
${WRKSRC}/FuzzyOcr.pm
@${REINPLACE_CMD} -e 's,loadplugin FuzzyOcr FuzzyOcr\.pm,loadplugin Mail::SpamAssassin::Plugin::FuzzyOcr,' \
${WRKSRC}/FuzzyOcr.cf
do-install:
@${MKDIR} ${EXAMPLESDIR}
${INSTALL_DATA} ${WRKSRC}/FuzzyOcr.pm ${SITE_PERL}/${SA_PLUGINDIR}
${INSTALL_DATA} ${WRKSRC}/FuzzyOcr.pm ${PREFIX}/${SA_CONFIGDIR}
${INSTALL_DATA} ${WRKSRC}/FuzzyOcr.cf ${EXAMPLESDIR}
${INSTALL_DATA} ${WRKSRC}/FuzzyOcr.words.sample ${EXAMPLESDIR}/FuzzyOcr.words
post-install:
.if !defined(NOPORTDOCS)
@${MKDIR} ${DOCSDIR}/samples
. for f in ${PORTDOCS_F}
${INSTALL_DATA} ${WRKSRC}/${f} ${DOCSDIR}/${f}
. endfor
.endif
@${CAT} ${PKGMESSAGE}
.include <bsd.port.post.mk>