aboutsummaryrefslogtreecommitdiffstats
path: root/www/trac-email2trac/Makefile
blob: 03260b1f125698e9286853c12d7204b99a975c3a (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
54
55
56
57
# Created by: Gerrit Beine <gerrit.beine@gmx.de>
# $FreeBSD$

PORTNAME=   email2trac
PORTVERSION=    2.4.5
PORTREVISION=   1
CATEGORIES= www devel python
MASTER_SITES=   ftp://ftp.sara.nl/pub/outgoing/
PKGNAMEPREFIX=  trac-

MAINTAINER= brooks@FreeBSD.org
COMMENT=    Convert email to trac tickets

LICENSE=    GPLv2 GPLv3
LICENSE_COMB=   dual

RUN_DEPENDS+=   tracd:${PORTSDIR}/www/trac

OPTIONS_DEFINE= POSTFIX
POSTFIX_DESC=   Configure suid script for postfix

TRACUSER?=  ${WWWOWN}

WRKSRC=     ${WRKDIR}/${PORTNAME}-${PORTVERSION}
GNU_CONFIGURE=  yes
CONFIGURE_ARGS= --with-trac-user=${TRACUSER} --with-mta-user=${MTAUSER}
USE_PYTHON= -2.7

PORTDOCS=   AUTHORS COPYING ChangeLog INSTALL README

.include <bsd.port.options.mk>

.if ${PORT_OPTIONS:MPOSTFIX}
MTAUSER?=   nobody
.else
MTAUSER?=   mailnull
.endif

do-install:
    @${INSTALL_SCRIPT} ${WRKSRC}/delete_spam.py ${PREFIX}/bin/delete_spam
    @${INSTALL_SCRIPT} ${WRKSRC}/email2trac.py ${PREFIX}/bin/email2trac
    @${INSTALL} ${COPY} ${STRIP} ${_BINOWNGRP} -m 4111 \
        ${WRKSRC}/run_email2trac ${PREFIX}/bin
    @${INSTALL_DATA} ${WRKSRC}/email2trac.conf \
        ${PREFIX}/etc/email2trac.conf.sample
    @if [ ! -e ${PREFIX}/etc/email2trac.conf ]; then \
        ${CP} -p ${PREFIX}/etc/email2trac.conf.sample \
            ${PREFIX}/etc/email2trac.conf ; \
    fi
.if ${PORT_OPTIONS:MDOCS}
    @${MKDIR} ${DOCSDIR}
.for file in ${PORTDOCS}
    @${INSTALL_DATA} ${WRKSRC}/${file} ${DOCSDIR}
.endfor
.endif

.include <bsd.port.mk>