summaryrefslogtreecommitdiff
path: root/mail/qmhandle/Makefile
blob: d2bfb860ac206c81ccdb10c3b9983b2085ade9c0 (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
# New ports collection makefile for:	qmHandle
# Date created:				17 August 2001
# Whom:					petef
#
# $FreeBSD$
#

PORTNAME=	qmHandle
PORTVERSION=	1.2.0
PORTREVISION=	1
CATEGORIES=	mail
MASTER_SITES=	${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR=	qmhandle
DISTNAME=	qmhandle-${PORTVERSION}

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

RUN_DEPENDS=	${QMAIL_DIR}/bin/qmail-qstat:${PORTSDIR}/mail/qmail

NO_WRKSUBDIR=	yes
NO_BUILD=	yes
USE_PERL5=	yes

.if exists(${LOCALBASE}/qmail/bin/qmail-qstat)
QMAIL_DIR?=	${LOCALBASE}/qmail
.else
QMAIL_DIR?=	/var/qmail
.endif

.include <bsd.port.pre.mk>

.if ${PERL_LEVEL} < 500601
IGNORE=         Port requires perl 5.6.1 or later. Install lang/perl5 then try again
.endif

post-patch:
	@${PERL} -pi -e 's,^#!/usr/bin/perl,#!${PERL},; \
		s,%%LOCALBASE%%,${LOCALBASE},g' ${WRKSRC}/qmHandle

do-install:
	${INSTALL_SCRIPT} ${WRKSRC}/qmHandle ${PREFIX}/bin
.if !defined(NOPORTDOCS)
	@${MKDIR} ${DOCSDIR}
.for file in HISTORY README
	${INSTALL_DATA} ${WRKSRC}/${file} ${DOCSDIR}
.endfor
.endif

.include <bsd.port.post.mk>