summaryrefslogtreecommitdiff
path: root/comms/asterisk/Makefile
blob: 62211df1252ee3e2cd07f4fc225069e193c17759 (plain)
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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
# $NetBSD: Makefile,v 1.2 2005/04/13 19:22:17 riz Exp $
#

DISTNAME=		asterisk-1.0.7
PKGREVISION=		1
CATEGORIES=		comms net audio
MASTER_SITES=		ftp://ftp.asterisk.org/pub/asterisk/ \
			ftp://ftp.asterisk.org/pub/asterisk/old-releases/

MAINTAINER=		riz@NetBSD.org
HOMEPAGE=		http://www.asterisk.org/
COMMENT=		The Asterisk Software PBX

USE_GNU_TOOLS+= 	make yacc

MANCOMPRESSED= 		yes

INSTALL_TARGET= 	install samples

# Running as non-root will come later
#ASTERISK_USER?= 	asterisk
#ASTERISK_GROUP?= 	asterisk
#PKG_GROUPS= 		${ASTERISK_GROUP}
#PKG_USERS= 		${ASTERISK_USER}:${ASTERISK_GROUP}::Asterisk\\ user

# Various path settings for Asterisk
PKG_SYSCONFSUBDIR?=	asterisk
ASTLIBDIR?=${PREFIX}/lib/asterisk
ASTVARLIBDIR?=${PREFIX}/libdata/asterisk
ASTETCDIR?=${PKG_SYSCONFDIR}
ASTSPOOLDIR?=${VARBASE}/spool/asterisk
ASTLOGDIR?=${VARBASE}/log/asterisk
ASTHEADERDIR?=${PREFIX}/include/asterisk
ASTCONFPATH?=${ASTETCDIR}/asterisk.conf
ASTBINDIR?=${PREFIX}/bin
ASTSBINDIR?=${PREFIX}/sbin
ASTVARRUNDIR?=${VARBASE}/run
ASTMANDIR?=${PREFIX}/man
ASTEXAMPLEDIR?=${PREFIX}/share/examples/asterisk

# Override default paths in Makefile
SUBST_CLASSES+= 	asterisk
SUBST_STAGE.asterisk= 	pre-configure
SUBST_FILES.asterisk=	Makefile
SUBST_SED.asterisk= 	\
	-e "s|^\(ASTLIBDIR\)=.*|\1 = ${ASTLIBDIR}|"		\
	-e "s|^\(ASTVARLIBDIR\)=.*|\1 = ${ASTVARLIBDIR}|"	\
	-e "s|^\(ASTETCDIR\)=.*|\1 = ${ASTETCDIR}|"		\
	-e "s|^\(ASTSPOOLDIR\)=.*|\1 = ${ASTSPOOLDIR}|"		\
	-e "s|^\(ASTLOGDIR\)=.*|\1 = ${ASTLOGDIR}|"		\
	-e "s|^\(ASTHEADERDIR\)=.*|\1 = ${ASTHEADERDIR}|"	\
	-e "s|^\(ASTCONFPATH\)=.*|\1 = ${ASTCONFPATH}|"		\
	-e "s|^\(ASTBINDIR\)=.*|\1 = ${ASTBINDIR}|"		\
	-e "s|^\(ASTSBINDIR\)=.*|\1 = ${ASTSBINDIR}|"		\
	-e "s|^\(ASTVARRUNDIR\)=.*|\1 = ${ASTVARRUNDIR}|"	\
	-e "s|^\(ASTMANDIR\)=.*|\1 = ${ASTMANDIR}|"		\
	-e "s|^\(ASTEXAMPLEDIR\)=.*|\1 = ${ASTEXAMPLEDIR}|"

.include "options.mk"

USE_PKGINSTALL= 	yes
RCD_SCRIPTS= 		asterisk
OWN_DIRS+= 		${ASTSPOOLDIR} ${ASTLOGDIR} ${ASTVARRUNDIR}
OWN_DIRS+=		${ASTLOGDIR}/cdr-csv

CONF_FILES=		# empty
.for _file_ in asterisk.conf extensions.conf
CONF_FILES+=	${ASTEXAMPLEDIR}/${_file_} ${ASTETCDIR}/${_file_}
.endfor

# if we put all the files in $CONF_FILES, the message is _way_ too long.
.for _file_ in adsi.conf adtranvofr.conf agents.conf alarmreceiver.conf \
	alsa.conf cdr_manager.conf cdr_odbc.conf 			\
	cdr_pgsql.conf cdr_tds.conf enum.conf extconfig.conf 		\
	features.conf festival.conf iax.conf 				\
	iaxprov.conf indications.conf logger.conf manager.conf 		\
	meetme.conf mgcp.conf modem.conf modules.conf musiconhold.conf 	\
	osp.conf oss.conf phone.conf privacy.conf queues.conf		\
	res_config_odbc.conf res_odbc.conf rpt.conf rtp.conf sip.conf 	\
	skinny.conf voicemail.conf vpb.conf zapata.conf asterisk.adsi 	\
	telcordia-1.adsi
SUPPORT_FILES+= 	${ASTEXAMPLEDIR}/${_file_} ${ASTETCDIR}/${_file_}
.endfor
.undef _file_

PTHREAD_OPTS+=	require native

.include "../../devel/ncurses/buildlink3.mk"
.include "../../mk/pthread.buildlink3.mk"
.include "../../mk/bsd.pkg.mk"