DESCRIPTION = "A flexible VOIP soft switch/PBX." DESCRIPTION_${PN}-ogi = "CallWeaver Gateway Inerface for scripted PBX call processing" DESCRIPTION_${PN}-fax = "Fax send/receive file and T.38 support for CallWeaver" DESCRIPTION_${PN}-ldap = "LDAP Directory services interface for CallWeaver" DESCRIPTION_${PN}-sounds = "Standard set of audio prompts for CallWeaver" HOMEPAGE = "http://www.callweaver.org" #RDEPENDS = "ssmtp" SECTION = "voip" LICENSE = "GPL" DEPENDS = "openssl zlib tiff libcap spandsp speex readline js sqlite3 \ sox-native findutils-native" DEPENDS_${PN}-ldap = "openldap" RRECOMMENDS = "logrotate" RRECOMMENDS_${PN}-ogi = "perl perl-module-strict ${PN}-perl" RREPLACES = "openpbx.org" RREPLACES_${PN}-ogi = "openpbx.org-ogi" RREPLACES_${PN}-fax = "openpbx.org-fax" RREPLACES_${PN}-ldap = "openpbx.org-ldap" RREPLACES_${PN}-sounds = "openpbx.org-sounds" S = "${WORKDIR}/1.2" PV = "1.2.0_rc4" #PV = "RC-1.1.99.20070909" PR = "r0" # file://bootstrap.sh.patch;patch=1 \ # file://openssl.m4.patch;patch=1 \ #SRC_URI = "http://devs.callweaver.org/release/${P}.tgz \ #SRC_URI = "http://devs.callweaver.org/1.2_snapshots/${P}.tar.gz \ SRC_URI = "svn://svn.callweaver.org/callweaver/branches/rel;module=1.2;proto=https \ svn://svn.callweaver.org/callweaver-sounds/trunk/sounds/en_US;module=MelanieTaylor;proto=https \ file://logrotate \ file://volatiles \ file://init" PARALLEL_MAKE = "" INITSCRIPT_NAME = ${PN} INITSCRIPT_PARAMS = "defaults 60" inherit autotools update-rc.d EXTRA_OECONF = " --with-ssl=${STAGING_DIR}/${HOST_SYS} --enable-low_memory \ --disable-zaptel --with-directory-layout=lsb --enable-t38 \ --with-codec-speex=${STAGING_DIR}/${HOST_SYS} --with-app_ldap \ --with-perl-shebang='#!${bindir}/perl' --with-jabber --with-res_jabber \ --disable-builtin-sqlite3 --with-sqlite3 \ --with-sqlite3-incdir=${staging_incdir} \ --with-sqlite3-libdir=${staging_libdir} \ --with-javascript --with-res_js \ --bindir=${bindir} --datadir=${datadir} --sysconfdir=${sysconfdir} \ --includedir=${includedir} --infodir=${infodir} --mandir=${mandir} \ --localstatedir=${localstatedir} --libdir=${libdir}" do_configure_prepend () { ${S}/bootstrap.sh # Fix some stupidness with the VoiceMail app naming. Case Matters! sed -i 's:Voicemail:VoiceMail:' ${S}/configs/extensions.conf.sample sed -i 's:/var:${localstatedir}:' ${WORKDIR}/volatiles sed -i 's:/var:${localstatedir}:' ${WORKDIR}/logrotate sed -i 's:/etc/init.d:${sysconfdir}/init.d:' ${WORKDIR}/logrotate } do_install_append() { install -c -D -m 755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/${PN} install -c -D -m 644 ${WORKDIR}/logrotate ${D}${sysconfdir}/logrotate.d/${PN} install -c -D -m 644 ${WORKDIR}/volatiles ${D}${sysconfdir}/default/volatiles/${PN} # And now for sounds... for file in `find ${WORKDIR}/MelanieTaylor -name \*.wav`; do echo $file sox -V $file -t raw -s -r 8000 -c 1 -w `echo $file|sed -e s/\.wav$/.sln/` resample -ql; sox -V $file -t raw -U -r 8000 -c 1 -b `echo $file|sed -e s/\.wav$/.ulaw/` resample -ql; sox -V $file -t raw -A -r 8000 -c 1 -b `echo $file|sed -e s/\.wav$/.alaw/` resample -ql; sox -V $file -t gsm -r 8000 -c 1 -b `echo $file|sed -e s/\.wav$/.gsm/` resample -ql; relfile=`echo $file|sed -e s:^${WORKDIR}/MelanieTaylor/::` relfile2=`echo $relfile|sed -e s:\.wav$::` install -c -D -m 644 ${WORKDIR}/MelanieTaylor/$relfile2.sln ${D}${datadir}/${PN}/sounds/$relfile2.sln install -c -D -m 644 ${WORKDIR}/MelanieTaylor/$relfile2.ulaw ${D}${datadir}/${PN}/sounds/$relfile2.ulaw install -c -D -m 644 ${WORKDIR}/MelanieTaylor/$relfile2.alaw ${D}${datadir}/${PN}/sounds/$relfile2.alaw install -c -D -m 644 ${WORKDIR}/MelanieTaylor/$relfile2.gsm ${D}${datadir}/${PN}/sounds/$relfile2.gsm done } PACKAGES = "${PN}-sounds ${PN}-fax ${PN}-ogi ${PN}-ldap ${PN}-doc ${PN}-dev ${PN}" FILES_${PN}-sounds = "${datadir}/${PN}/sounds/*" FILES_${PN}-dev = "${libdir}/${PN}/modules/*.la \ ${libdir}/${PN}/*.la \ ${includedir}/${PN}/*" FILES_${PN}-fax = "${libdir}/${PN}/modules/app_backgrounddetect.so \ ${libdir}/${PN}/modules/app_faxdetect.so \ ${libdir}/${PN}/modules/app_rxfax.so \ ${libdir}/${PN}/modules/app_txfax.so" FILES_${PN}-ogi = "${libdir}/${PN}/modules/res_ogi.so \ ${datadir}/${PN}/ogi/*" FILES_${PN}-ldap = "${libdir}/${PN}/modules/app_ldap.*" pkg_postinst_prepend() { grep -q callweaver ${sysconfdir}/group || addgroup --system callweaver grep -q callweaver ${sysconfdir}/passwd || adduser --system --home ${localstatedir}/run/${PN} --no-create-home --disabled-password --ingroup callweaver -s ${base_bindir}/false callweaver chown -R callweaver:callweaver ${libdir}/${PN} ${localstatedir}/lib/${PN} ${localstatedir}/spool/${PN} ${localstatedir}/log/${PN} ${localstatedir}/run/${PN} ${sysconfdir}/${PN} ${datadir}/${PN} # Deal with those users who soft link conf files elsewhere chown -R callweaver:callweaver ${sysconfdir}/${PN}/* /etc/init.d/populate-volatile.sh update } pkg_postinst_${PN}-fax () { chown -R callweaver:callweaver ${libdir}/${PN} } pkg_postinst_${PN}-ldap () { chown -R callweaver:callweaver ${libdir}/${PN} } pkg_postinst_${PN}-sounds () { chown -R callweaver:callweaver ${datadir}/${PN} } CONFFILES_${PN} += "${sysconfdir}/${PN}/musiconhold.conf" CONFFILES_${PN} += "${sysconfdir}/${PN}/adsi.conf" CONFFILES_${PN} += "${sysconfdir}/${PN}/adtranvofr.conf" CONFFILES_${PN} += "${sysconfdir}/${PN}/agents.conf" CONFFILES_${PN} += "${sysconfdir}/${PN}/cdr.conf" CONFFILES_${PN} += "${sysconfdir}/${PN}/cdr_custom.conf" CONFFILES_${PN} += "${sysconfdir}/${PN}/cdr_manager.conf" CONFFILES_${PN} += "${sysconfdir}/${PN}/cdr_tds.conf" CONFFILES_${PN} += "${sysconfdir}/${PN}/codecs.conf" CONFFILES_${PN} += "${sysconfdir}/${PN}/dnsmgr.conf" CONFFILES_${PN} += "${sysconfdir}/${PN}/dundi.conf" CONFFILES_${PN} += "${sysconfdir}/${PN}/enum.conf" CONFFILES_${PN} += "${sysconfdir}/${PN}/extconfig.conf" CONFFILES_${PN} += "${sysconfdir}/${PN}/extensions.conf" CONFFILES_${PN} += "${sysconfdir}/${PN}/extensions.ael" CONFFILES_${PN} += "${sysconfdir}/${PN}/features.conf" CONFFILES_${PN} += "${sysconfdir}/${PN}/iax.conf" CONFFILES_${PN} += "${sysconfdir}/${PN}/indications.conf" CONFFILES_${PN} += "${sysconfdir}/${PN}/logger.conf" CONFFILES_${PN} += "${sysconfdir}/${PN}/manager.conf" CONFFILES_${PN} += "${sysconfdir}/${PN}/meetme.conf" CONFFILES_${PN} += "${sysconfdir}/${PN}/mgcp.conf" CONFFILES_${PN} += "${sysconfdir}/${PN}/modem.conf" CONFFILES_${PN} += "${sysconfdir}/${PN}/modules.conf" CONFFILES_${PN} += "${sysconfdir}/${PN}/muted.conf" CONFFILES_${PN} += "${sysconfdir}/${PN}/callweaver.adsi" CONFFILES_${PN} += "${sysconfdir}/${PN}/callweaver.conf" CONFFILES_${PN} += "${sysconfdir}/${PN}/osp.conf" CONFFILES_${PN} += "${sysconfdir}/${PN}/privacy.conf" CONFFILES_${PN} += "${sysconfdir}/${PN}/queues.conf" CONFFILES_${PN} += "${sysconfdir}/${PN}/rpt.conf" CONFFILES_${PN} += "${sysconfdir}/${PN}/rtp.conf" CONFFILES_${PN} += "${sysconfdir}/${PN}/sip.conf" CONFFILES_${PN} += "${sysconfdir}/${PN}/sip_notify.conf" CONFFILES_${PN} += "${sysconfdir}/${PN}/udptl.conf" CONFFILES_${PN} += "${sysconfdir}/${PN}/voicemail.conf" CONFFILES_${PN} += "${sysconfdir}/${PN}/woomera.conf"