aboutsummaryrefslogtreecommitdiffstats
path: root/net/astfax/Makefile
blob: 700e2bca9c97b04c1806d7425c853941867f7a2e (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
# New ports collection makefile for:   astfax
# Date created:                 13 Aug 2005
# Whom:             Filippo Natali <filippo.natali@gmail.com>
#
# $FreeBSD$
#

PORTNAME=   astfax
PORTVERSION=    1.0
CATEGORIES= net
MASTER_SITES=   http://www.inter7.com/astfax/

MAINTAINER= filippo.natali@gmail.com
COMMENT=    AstFax provides an outgoing email to fax gateway for Asterisk

LIB_DEPENDS=    spandsp.0:${PORTSDIR}/comms/spandsp
BUILD_DEPENDS=  ${LOCALBASE}/lib/libeps.a:${PORTSDIR}/mail/eps
RUN_DEPENDS=    ${LOCALBASE}/sbin/asterisk:${PORTSDIR}/net/asterisk

PORTDOCS=   README testfax.eml testfax.tif

MAKE_ENV+=  DEFS="${CFLAGS}"

post-patch:
    @${REINPLACE_CMD} -e 's|^CC =|CC \?=|' \
              -e 's|^DEFS =|DEFS \?=|' \
              -e 's|\/usr\/include\/eps|${LOCALBASE}\/include|' \
              -e 's|^LIBS=-leps|LIBS=-leps -L${LOCALBASE}\/lib|' \
        ${WRKSRC}/Makefile
    @${REINPLACE_CMD} -e 's|"\/tmp"|"\/var\/tmp"|' \
              -e 's|"\./ast_fax.call"|"${DATADIR}\/ast_fax.call"|' \
        ${WRKSRC}/ast_fax.c

do-install:
    ${INSTALL_PROGRAM} ${WRKSRC}/ast_fax ${PREFIX}/bin
    ${MKDIR} ${DATADIR}
    ${INSTALL_DATA} ${WRKSRC}/ast_fax.call ${DATADIR}

.if !defined(NOPORTDOCS)
    @${MKDIR} ${DOCSDIR}
    for f in ${PORTDOCS}; do \
        ${INSTALL_DATA} ${WRKSRC}/$${f} ${DOCSDIR}; \
    done
.endif

.include <bsd.port.mk>