# Ports collection makefile for: freeswitch scripts # Date created: september , 2009 # Whom: Richard Neese # # $FreeBSD$ # PORTNAME= freeswitch-scripts PORTVERSION= 1.0.7.1 PORTREVISION= 1 PORTEPOCH= 1 CATEGORIES= misc MASTER_SITES= http://dl.dropbox.com/u/152504/ DISTNAME= ${BASE_PORTNAME}-${PORTVERSION} DIST_SUBDIR= ${BASE_PORTNAME} MAINTAINER= r.neese@gmail.com COMMENT= FreeSwitch Scripts RUN_DEPENDS= ${LOCALBASE}/bin/freeswitch:${PORTSDIR}/net/freeswitch-core CONFLICTS= freeswitch-scripts-devel-[0-9]* NO_BUILD= yes BASE_PORTNAME= freeswitch SUB_FILES= pkg-install FREESWITCH_USER= freeswitch FREESWITCH_GROUP= ${FREESWITCH_USER} WRKSRC= ${WRKDIR}/${BASE_PORTNAME}-${PORTVERSION}/scripts/ OPTIONS= JAVASCRIPT "Install FreeSWITCH JAVASCRIPTS" off \ PERL "Install FreeSWITCH Perl Scripts" off \ PYTHON "Install FreeSWITCH Python Scripts" off \ PHP "Install FreeSWITCH PHP Scripts" off \ RSS "Install FreeSWITCH RSS Scripts" off \ LUA "Install FreeSWITCH LUA Scripts" off .include .for i in JAVASCRIPT PERL PYTHON PHP RSS LUA C .if !defined(WITH_${i}) PLIST_SUB+= WITH_${i}="@comment " .else PLIST_SUB+= WITH_${i}="" .endif .endfor pre-install: @${SH} ${PKGINSTALL} ${BASE_PORTNAME} PRE-INSTALL .if ! exists(${PREFIX}/etc/${BASE_PORTNAME}/scripts) ${MKDIR} ${PREFIX}/etc/${BASE_PORTNAME}/scripts ${CHOWN} ${FREESWITCH_USER}:${FREESWITCH_GROUP} ${PREFIX}/etc/${BASE_PORTNAME}/scripts .endif ${TOUCH} ${PREFIX}/etc/${BASE_PORTNAME}/scripts/.freeswitch-scripts ${CHOWN} ${FREESWITCH_USER}:${FREESWITCH_GROUP} ${PREFIX}/etc/${BASE_PORTNAME}/scripts/.freeswitch-scripts do-install: .if defined(WITH_JAVASCRIPT) @${RM} ${WRKSRC}/javascript/ps_pizza.js @${RM} ${WRKSRC}/javascript/pizza.js @${RM} -rf ${WRKSRC}/javascript/js_modules @cd ${WRKSRC}; ${FIND} javascript \ | ${CPIO} -pdm -R ${FREESWITCH_USER}:${FREESWITCH_GROUP} ${PREFIX}/etc/${BASE_PORTNAME}/scripts .endif .if defined(WITH_PERL) @cd ${WRKSRC}; ${FIND} perl \ | ${CPIO} -pdm -R ${FREESWITCH_USER}:${FREESWITCH_GROUP} ${PREFIX}/etc/${BASE_PORTNAME}/scripts .endif .if defined(WITH_PYTHON) @cd ${WRKSRC}; ${FIND} python \ | ${CPIO} -pdm -R ${FREESWITCH_USER}:${FREESWITCH_GROUP} ${PREFIX}/etc/${BASE_PORTNAME}/scripts .endif .if defined(WITH_PHP) @cd ${WRKSRC}; ${FIND} php \ | ${CPIO} -pdm -R ${FREESWITCH_USER}:${FREESWITCH_GROUP} ${PREFIX}/etc/${BASE_PORTNAME}/scripts .endif .if defined(WITH_RSS) @cd ${WRKSRC}; ${FIND} rss \ | ${CPIO} -pdm -R ${FREESWITCH_USER}:${FREESWITCH_GROUP} ${PREFIX}/etc/${BASE_PORTNAME}/scripts .endif .if defined(WITH_LUA) @cd ${WRKSRC}; ${FIND} lua \ | ${CPIO} -pdm -R ${FREESWITCH_USER}:${FREESWITCH_GROUP} ${PREFIX}/etc/${BASE_PORTNAME}/scripts .endif .include