aboutsummaryrefslogtreecommitdiffstats
path: root/mail/qmhandle/Makefile
blob: d6d9f8afdfb9ee1b1e05c5e062fb198b786dfc2d (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
# Created by: petef
# $FreeBSD$

PORTNAME=   qmhandle
PORTVERSION=    1.3.2
PORTREVISION=   2
CATEGORIES= mail
MASTER_SITES=   SF/${PORTNAME}/${PORTNAME}-1.3/${PORTNAME}-${PORTVERSION}

MAINTAINER= bdrewery@FreeBSD.org
COMMENT=    Tool to view and manage a qmail queue

LICENSE=    GPLv2

OPTIONS_DEFINE= DOCS

USES=       qmail:run

NO_BUILD=   yes
USE_PERL5=  yes
USE_BZIP2=  yes

PORTDOCS=   HISTORY README

.include <bsd.port.pre.mk>

post-patch:
    @${REINPLACE_CMD} -e 's,^#!/usr/bin/perl,#!${PERL},g' \
              -e 's,%%LOCALBASE%%,${LOCALBASE},g' \
              -e '/^##* *USER *CONFIGURATION *BEGIN *##*$$/,/^##* *USER *CONFIGURATION *END *##*$$/s/^\(#*\)my/\1our/g' \
        ${WRKSRC}/qmHandle
    @${SED} -e 's,%%LOCALBASE%%,${LOCALBASE},g' ${FILESDIR}/qmHandle.conf.in > \
        ${WRKSRC}/qmHandle.conf.sample

do-install:
    ${INSTALL_SCRIPT} ${WRKSRC}/qmHandle ${PREFIX}/bin
    ${INSTALL_DATA} ${WRKSRC}/qmHandle.conf.sample ${PREFIX}/etc
    [ -f ${PREFIX}/etc/qmHandle.conf ] || \
        ${INSTALL_DATA} -m 0644 ${WRKSRC}/qmHandle.conf.sample ${PREFIX}/etc/qmHandle.conf
.if ${PORT_OPTIONS:MDOCS}
    @${MKDIR} ${DOCSDIR}
.for file in ${PORTDOCS}
    ${INSTALL_DATA} ${WRKSRC}/${file} ${DOCSDIR}
.endfor
.endif

.include <bsd.port.post.mk>