[oe-commits] org.oe.dev openpbx.org: Update to use sox-native to create the sounds when building

nail commit openembedded-commits at lists.openembedded.org
Wed Mar 21 13:43:20 UTC 2007


openpbx.org: Update to use sox-native to create the sounds when building

Author: nail at nslu2-linux.org
Branch: org.openembedded.dev
Revision: a05d88f82335926af4e85137ddea5c01f4d4fb07
ViewMTN: http://monotone.openembedded.org/revision.psp?id=a05d88f82335926af4e85137ddea5c01f4d4fb07
Files:
1
packages/openpbx/openpbx.org-1.2-rc3
packages/openpbx/openpbx.org-1.2_rc3
packages/openpbx/openpbx.org-perl.bb
packages/openpbx/openpbx.org_1.2_rc3.bb
Diffs:

#
# mt diff -r96c89697a31faf6f30771ae8ae482326a4daf0c7 -ra05d88f82335926af4e85137ddea5c01f4d4fb07
#
# 
# 
# rename "packages/openpbx/openpbx.org-1.2-rc3"
#     to "packages/openpbx/openpbx.org-1.2_rc3"
# 
# add_file "packages/openpbx/openpbx.org-perl.bb"
#  content [fc9d6bb9b361043d8bc9be5c55c87fc3e9b77645]
# 
# patch "packages/openpbx/openpbx.org_1.2_rc3.bb"
#  from [49a30ccb91b4a3db1f750c2efa7e2295dcdf7cca]
#    to [6479fb49390c52f1cab5317ed4dcb63e683786a3]
# 
============================================================
--- packages/openpbx/openpbx.org-perl.bb	fc9d6bb9b361043d8bc9be5c55c87fc3e9b77645
+++ packages/openpbx/openpbx.org-perl.bb	fc9d6bb9b361043d8bc9be5c55c87fc3e9b77645
@@ -0,0 +1,24 @@
+DESCRIPTION = "Openpbx::OGI Perl Gateway Interface Module"
+HOMEPAGE = "http://www.openpbx.org"
+SECTION = "libs"
+LICENSE = "GPL"
+DEPENDS = "install-native"
+RDEPENDS = "perl openpbx.org-ogi"
+PR = "r0"
+
+OPBXV = "openpbx.org-1.2_rc3"
+
+SRC_URI = "http://www.openpbx.org/releases/${OPBXV}.tar.gz"
+
+S = "${WORKDIR}/${OPBXV}/contrib/ogi-perl/openpbx-perl-${PV}"
+
+inherit cpan
+
+do_install_append () {
+  install -d ${D}${datadir}/openpbx.org/ogi/perl
+  install ${S}/examples/* ${D}${datadir}/openpbx.org/ogi/perl
+}
+
+PACKAGES =+ "${PN}-examples"
+
+FILES_${PN}-examples = "${datadir}/openpbx.org/ogi/perl"
============================================================
--- packages/openpbx/openpbx.org_1.2_rc3.bb	49a30ccb91b4a3db1f750c2efa7e2295dcdf7cca
+++ packages/openpbx/openpbx.org_1.2_rc3.bb	6479fb49390c52f1cab5317ed4dcb63e683786a3
@@ -1,16 +1,18 @@ LICENSE = "GPL"
 DESCRIPTION = "A flexible VOIP soft switch/PBX."
 HOMEPAGE = "http://www.openpbx.org"
 #RDEPENDS = "ssmtp"
 SECTION = "voip"
 LICENSE = "GPL"
-DEPENDS = "openssl zlib tiff libcap spandsp speex readline js"
+DEPENDS = "openssl zlib tiff libcap spandsp speex readline js \
+           sox-native findutils-native"
 DEPENDS_${PN}-ldap = "openldap"
 RRECOMMENDS = "logrotate"
-RRECOMMENDS_${PN}-ogi = "perl perl-module-strict"
+RRECOMMENDS_${PN}-ogi = "perl perl-module-strict openpbx.org-perl"
 PV = "1.2_rc3"
-PR = "r0"
+PR = "r1"
 
 SRC_URI = "http://www.openpbx.org/releases/${P}.tar.gz \
+           svn://svn.openpbx.org/openpbx-sounds/trunk/sounds/en_US;module=MelanieTaylor;proto=svn \
            file://bootstrap.patch;patch=1 \
            file://openssl.m4.patch;patch=1 \
            file://logrotate \
@@ -45,17 +47,34 @@ do_install_append() {
     install -c -D -m 755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/openpbx
     install -c -D -m 644 ${WORKDIR}/logrotate ${D}${sysconfdir}/logrotate.d/openpbx
     install -c -D -m 644 ${WORKDIR}/volatiles ${D}${sysconfdir}/default/volatiles/openpbx
+    # 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}/openpbx.org/sounds/$relfile2.sln
+        install -c -D -m 644 ${WORKDIR}/MelanieTaylor/$relfile2.ulaw ${D}${datadir}/openpbx.org/sounds/$relfile2.ulaw
+        install -c -D -m 644 ${WORKDIR}/MelanieTaylor/$relfile2.alaw ${D}${datadir}/openpbx.org/sounds/$relfile2.alaw
+        install -c -D -m 644 ${WORKDIR}/MelanieTaylor/$relfile2.gsm ${D}${datadir}/openpbx.org/sounds/$relfile2.gsm
+    done
 }
 
-PACKAGES =+ "${PN}-fax ${PN}-ogi ${PN}-musiconhold ${PN}-ldap"
+PACKAGES = "${PN}-sounds ${PN}-fax ${PN}-ogi ${PN}-ldap ${PN}-doc ${PN}-dev ${PN}"
 
-FILES_${PN}-fax = "${libdir}/openpbx.org/modules/chan_fax.* \
-                   ${libdir}/openpbx.org/modules/app_rxfax.* \
-                   ${libdir}/openpbx.org/modules/app_txfax.* \
+FILES_${PN}-sounds = "${datadir}/openpbx.org/sounds/*"
+FILES_${PN}-dev = "${libdir}/openpbx.org/modules/*.la \
+                   ${libdir}/openpbx.org/*.la \
+                   ${includedir}/openpbx/*"
+FILES_${PN}-fax = "${libdir}/openpbx.org/modules/chan_fax.so \
+                   ${libdir}/openpbx.org/modules/app_rxfax.so \
+                   ${libdir}/openpbx.org/modules/app_txfax.so \
+                   ${libdir}/openpbx.org/modules/app_faxdetect.so \
                    ${sysconfdir}/openpbx.org/chan_fax.conf"
-FILES_${PN}-musiconhold = "${libdir}/openpbx.org/modules/res_musiconhold.* \
-                   ${sysconfdir}/openpbx.org/musiconhold.conf"
-FILES_${PN}-ogi = "${libdir}/openpbx.org/modules/res_ogi.* \
+FILES_${PN}-ogi = "${libdir}/openpbx.org/modules/res_ogi.so \
                    ${datadir}/openpbx.org/ogi/*"
 FILES_${PN}-ldap = "${libdir}/openpbx.org/modules/app_ldap.*"
 
@@ -67,7 +86,7 @@ CONFFILES_${PN}-fax += "${sysconfdir}/op
 }
 
 CONFFILES_${PN}-fax += "${sysconfdir}/openpbx.org/chan_fax.conf"
-CONFFILES_${PN}-musiconhold += "${sysconfdir}/openpbx.org/musiconhold.conf"
+CONFFILES_${PN} += "${sysconfdir}/openpbx.org/musiconhold.conf"
 CONFFILES_${PN} += "${sysconfdir}/openpbx.org/adsi.conf"
 CONFFILES_${PN} += "${sysconfdir}/openpbx.org/adtranvofr.conf"
 CONFFILES_${PN} += "${sysconfdir}/openpbx.org/agents.conf"






More information about the Openembedded-commits mailing list