aboutsummaryrefslogtreecommitdiffstats
path: root/mail/amavis-logwatch/Makefile
blob: bc01bc25bf9f96a40a135e888f0b6dc45498f151 (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
# New ports collection makefile for:    amavis-logwatch
# Date created:             2011-11-01
# Whom:                 Masaki TAGAWA <masaki@club.kyutech.ac.jp>
#
# $FreeBSD$
#

PORTNAME=   amavis-logwatch
PORTVERSION=    1.51.02
CATEGORIES= mail
MASTER_SITES=   SF/logreporters/${PORTNAME}/release/${PORTVERSION}
EXTRACT_SUFX=   .tgz

MAINTAINER= masaki@club.kyutech.ac.jp
COMMENT=    Amavisd-new log parser

LICENSE=    MIT
LICENSE_FILE=   ${WRKSRC}/LICENSE

PORTDOCS=   Bugs Changes README
PORTEXAMPLES=   ${PORTNAME}.conf

MAN1=       ${PORTNAME}.1

USE_PERL5_RUN=  yes
NO_BUILD=   yes

post-patch:
    @cd ${WRKSRC} && ${REINPLACE_CMD} -e '\
        s!/usr/local/etc!${ETCDIR}! \
        ' ${PORTNAME} ${PORTNAME}.1 README

do-install:
    ${INSTALL_SCRIPT} ${WRKSRC}/${PORTNAME} ${PREFIX}/bin
    ${INSTALL_MAN} ${WRKSRC}/${PORTNAME}.1 ${MAN1PREFIX}/man/man1
    @${CP} ${WRKSRC}/${PORTNAME}.conf ${WRKSRC}/${PORTNAME}.conf.sample
    @${MKDIR} ${ETCDIR}
    ${INSTALL_DATA} ${WRKSRC}/${PORTNAME}.conf.sample ${ETCDIR}

post-install:
    @if [ ! -f ${ETCDIR}/${PORTNAME}.conf ]; then \
        ${CP} -p ${ETCDIR}/${PORTNAME}.conf.sample ${ETCDIR}/${PORTNAME}.conf; \
    fi
.if !defined(NOPORTDOCS)
    @${MKDIR} ${DOCSDIR}
    cd ${WRKSRC} && ${INSTALL_MAN} ${PORTDOCS} ${DOCSDIR}
.endif
.if !defined(NOPORTEXAMPLES)
    @${MKDIR} ${EXAMPLESDIR}
    cd ${WRKSRC} && ${INSTALL_DATA} ${PORTEXAMPLES} ${EXAMPLESDIR}
.endif

.include <bsd.port.mk>