[Asterisk-bsd] Makefile for 1.4 (FreeBSD ports)
Paul Belanger
pabelanger at gmail.com
Tue Jan 2 11:45:36 MST 2007
Here is a Makefile I hack together today to get Asterisk 1.4 to
compile and install on FreeBSD.
It is based on the current 1.2 version in the ports system. I have
removed some lib dependancies, added option menu, conflicts for
zaptel-1.*.
I don't plan to release to the port maintainer anytime soon, but if
people want to play with this and submit feedback, fine by me.
I guess the purpose of the post is to get the ball rolling for porting
1.4 into the ports.
PB
---
PORTNAME= asterisk
PORTVERSION= 1.4.0
PORTREVISION= 0
CATEGORIES= net
MASTER_SITES= http://ftp.digium.com/pub/asterisk/ \
http://ftp.digium.com/pub/asterisk/old-releases/
MAINTAINER= sobomax at FreeBSD.org
COMMENT= An Open Source PBX and telephony toolkit
BUILD_DEPENDS= mpg123:${PORTSDIR}/audio/mpg123
#LIB_DEPENDS= speex.3:${PORTSDIR}/audio/speex \
RUN_DEPENDS= mpg123:${PORTSDIR}/audio/mpg123
ONLY_FOR_ARCHS= i386 sparc64 amd64
GNU_CONFIGURE= yes
USE_GMAKE= yes
USE_BISON= yes
USE_RC_SUBR= asterisk.sh
MAKE_ENV= PTHREAD_CFLAGS="${PTHREAD_CFLAGS}" \
PTHREAD_LIBS="${PTHREAD_LIBS}" \
MKDIR="${MKDIR}" \
PWLIBDIR=${LOCALBASE}/share/pwlib \
OPENH323DIR=${LOCALBASE}/share/openh323 \
OSVERSION=${OSVERSION} \
CXX="${CXX}"
PLIST_SUB= BRISTUFF="@comment "
MAN8= asterisk.8 astgenkey.8 autosupport.8 safe_asterisk.8
MAN8PREFIX= ${PREFIX}/share
OPTIONS= H323 "Enable H323 support" on \
ZAPTEL "Enable Zaptel support" on \
ODBC "Enable ODBC support" on \
FAX "Enable Fax support" on \
SAMPLES "Install sample configuration" off
CONFLICTS= zaptel1.*
.include <bsd.port.pre.mk>
.if ${ARCH} != "i386"
WITHOUT_H323= 1
WITHOUT_ZAPTEL= 1
.endif
.if defined(WITHOUT_H323)
PLIST_SUB+= WITH_H323="@comment "
CONFIGURE_ARGS+= --without-h323
.else
LIB_DEPENDS+= pt_r.1:${PORTSDIR}/devel/pwlib\
h323_r.1:${PORTSDIR}/net/openh323
PLIST_SUB+= WITH_H323=""
MAKE_ENV+= WITH_H323=1
.endif
.if defined(WITHOUT_ZAPTEL)
PLIST_SUB+= WITH_ZAPTEL="@comment "
MAKE_ENV+= WITHOUT_ZAPTEL=1
CONFIGURE_ARGS+= --without-zaptel
.else
BUILD_DEPENDS+= libpri>=1.2.0:${PORTSDIR}/misc/libpri \
${LOCALBASE}/include/zaptel.h:${PORTSDIR}/misc/zaptel
LIB_DEPENDS+= pri.1:${PORTSDIR}/misc/libpri
RUN_DEPENDS+= ${LOCALBASE}/include/zaptel.h:${PORTSDIR}/misc/zaptel
PLIST_SUB+= WITH_ZAPTEL=""
MAKE_ENV+= WITH_ZAPTEL=1
.endif
#
# WITH_FREETDS, WITH_PGSQL and WITH_SQLITE can also be added to MAKE_ENV
# similarly
.if defined(WITHOUT_ODBC)
PLIST_SUB+= WITH_ODBC="@comment "
.else
LIB_DEPENDS+= odbc.1:${PORTSDIR}/databases/unixODBC
PLIST_SUB+= WITH_ODBC=""
MAKE_ENV+= WITH_ODBC=1
.endif
.if defined(WITHOUT_FAX)
PLIST_SUB+= WITH_FAX="@comment "
.else
MAKE_ENV+= WITH_FAX=1
LIB_DEPENDS+= spandsp.0:${PORTSDIR}/comms/spandsp
PLIST_SUB+= WITH_FAX=""
.endif
.if ${OSVERSION} >= 500036
PLIST_SUB+= NEWGCC=""
.else
PLIST_SUB+= NEWGCC="@comment "
.endif
post-patch:
.if defined(WITH_SAMPLES)
${REINPLACE_CMD} -e 's|install: datafiles bininstall|install:
datafiles bininstall samples|g' ${WRKSRC}/Makefile
.endif
.include <bsd.port.post.mk>
More information about the Asterisk-BSD
mailing list