summaryrefslogtreecommitdiff
path: root/mail/anomy-sanitizer/Makefile
blob: 4a644195b5e3e794cd6ab74837f4bbf8c84abc5a (plain)
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
# $NetBSD: Makefile,v 1.38 2020/01/07 13:47:41 kim Exp $
#

DISTNAME=	anomy-sanitizer-1.76
PKGREVISION=	10
CATEGORIES=	mail
MASTER_SITES=	http://mailtools.anomy.net/dist/

MAINTAINER=	pkgsrc-users@NetBSD.org
HOMEPAGE=	http://mailtools.anomy.net/
COMMENT=	Mail message filter and sanitizer

#DEPENDS+=	{perl>=5.7.3,p5-MIME-Base64-[0-9]*}:../../converters/p5-MIME-Base64
#DEPENDS+=	{perl>=5.7.3,p5-Digest-MD5-[0-9]*}:../../security/p5-Digest-MD5

.include "../../mk/bsd.prefs.mk"

WRKSRC=		${WRKDIR}/anomy
USE_TOOLS+=	perl:run pax

REPLACE_PERL+=			bin/*.pl
CHECK_INTERPRETER_SKIP+=	*.pm

ANOMYLIB=	${PREFIX}/lib/anomy-sanitizer
ANOMYDOC=	${PREFIX}/share/doc/anomy-sanitizer

INSTALLATION_DIRS=	sbin

post-extract:
	chmod -R u+w,go-w,a+r ${WRKSRC}
	cd ${WRKSRC}/bin/Anomy && chmod a-x *.pm */*.pm

do-build:
	set -e; \
	cd ${WRKSRC}; \
	    for i in mailblogger sanitizer simplify; do \
		( \
		    ${ECHO} '#!${SH}'; \
		    ${ECHO} 'ANOMY=${ANOMYLIB}'; \
		    ${ECHO} 'export ANOMY'; \
		    ${ECHO} 'exec $${ANOMY}/bin/'"$$i"'.pl "$$@"'; \
		) > "$$i"; \
	    done; \
	    [ -d contrib/.tmp ] && rmdir contrib/.tmp

do-install:
	${INSTALL_SCRIPT} ${WRKSRC}/sanitizer ${DESTDIR}${PREFIX}/sbin
	${INSTALL_SCRIPT} ${WRKSRC}/simplify ${DESTDIR}${PREFIX}/sbin
	${INSTALL_DATA_DIR} ${DESTDIR}${ANOMYDOC}
	cd ${WRKSRC} && pax -rw -s',.*\.orig$$,,' -s',^\..*$$,,' \
	    CHANGELOG.sanitizer \
	    CREDITS \
	    README.sanitizer \
	    UNICODE.TXT \
	    contrib \
	    sanitizer.html \
	    ${DESTDIR}${ANOMYDOC}
	${INSTALL_DATA_DIR} ${DESTDIR}${ANOMYLIB}
	${INSTALL_DATA_DIR} ${DESTDIR}${ANOMYLIB}/bin
	${INSTALL_SCRIPT} ${WRKSRC}/bin/mailblogger.pl ${DESTDIR}${ANOMYLIB}/bin
	${INSTALL_SCRIPT} ${WRKSRC}/bin/sanitizer.pl ${DESTDIR}${ANOMYLIB}/bin
	${INSTALL_SCRIPT} ${WRKSRC}/bin/simplify.pl ${DESTDIR}${ANOMYLIB}/bin
	cd ${WRKSRC}/bin && pax -rw -s',.*\.orig$$,,' Anomy \
	    ${DESTDIR}${ANOMYLIB}/bin

.include "../../mk/bsd.pkg.mk"