aboutsummaryrefslogtreecommitdiffstats
path: root/misc/dahdi-kmod/Makefile
blob: 336e405c553291437e26ae86d6dd2c50aa90af0a (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
58
59
60
61
62
# Ports collection makefile for:    dahdi
# Date created:             3 Mar 2010
# Whom:                 Maxim Khon <fjoe@FreeBSD.org>
#
# $FreeBSD$
#

PORTNAME=   dahdi
PORTVERSION=    ${DAHDI_VERSION:S/-//g}
PORTREVISION=   4
CATEGORIES= misc kld
MASTER_SITES=   ${MASTER_SITE_LOCAL}
MASTER_SITE_SUBDIR= fjoe
DISTNAME=   ${PORTNAME}-freebsd-complete-${DAHDI_VERSION}+${DAHDI_TOOLS_VERSION}

MAINTAINER= fjoe@FreeBSD.org
COMMENT=    Digium/Asterisk Hardware Device Interface

BUILD_DEPENDS=  gmake:${PORTSDIR}/devel/gmake
LIB_DEPENDS=    newt.52:${PORTSDIR}/devel/newt

DAHDI_VERSION=      2.2.1-rc2
DAHDI_TOOLS_VERSION=    2.2.1.1-rc1

NO_PACKAGE= Should be in sync with the kernel to work correctly
GNU_CONFIGURE=  yes
CONFIGURE_ARGS= --with-dahdi=../freebsd --sysconfdir=${PREFIX}/etc --with-newt=${LOCALBASE}
CONFIGURE_ENV=  WGET=/usr/bin/fetch
USE_LDCONFIG=   yes
USE_RC_SUBR=    dahdi

ONLY_FOR_ARCHS= i386 amd64
CONFLICTS=  zaptel-[0-9]*

MAN8=   dahdi_cfg.8\
    dahdi_monitor.8\
    dahdi_scan.8\
    dahdi_test.8\
    dahdi_tool.8\
    fxotune.8

.include <bsd.port.pre.mk>

pre-everything::
    @if [ ! -f /usr/src/sys/Makefile ]; then \
        ${ECHO_MSG} ">> The dahdi port needs FreeBSD kernel source code to compile."; \
        ${ECHO_MSG} ">> Please install FreeBSD kernel source code in /usr/src/sys."; \
        ${FALSE}; \
    fi

post-patch:
    @${REINPLACE_CMD} -e 's,/etc,${PREFIX}/etc,g'\
        ${WRKSRC}/tools/dahdi_cfg.c ${WRKSRC}/tools/fxotune.c\
        ${WRKSRC}/tools/doc/dahdi_cfg.8 ${WRKSRC}/tools/doc/fxotune.8

pre-su-install:
    @${MKDIR} ${PREFIX}/lib/dahdi

post-install:
    @${TOUCH} ${PREFIX}/lib/dahdi/linker.hints

.include <bsd.port.post.mk>