diff --git a/recipes-isdn/asterisk/asterisk_1.8.7.0.bb b/recipes-isdn/asterisk/asterisk_1.8.7.0.bb new file mode 100644 index 0000000000..e0a4d71401 --- /dev/null +++ b/recipes-isdn/asterisk/asterisk_1.8.7.0.bb @@ -0,0 +1,86 @@ +# Copyright (C) 2007-2008, Stelios Koroneos - Digital OPSiS, All Rights Reserved +# Copyright (C) 2011, sysmocom - systems for mobile communications GmbH +# Released under the MIT license (see packages/COPYING) +DESCRITOPN = "asterisk PBX" +DEPENDS = "openssl ncurses" +HOMEPAGE = "http://www.asterisk.org" +LICENSE = "GPLv2" +LIC_FILES_CHKSUM = "file://COPYING;md5=3c6764ffcbe996d1d8f919b393ccdd67" + +PR = "r2" + +SRC_URI = "http://downloads.asterisk.org/pub/telephony/asterisk/releases/asterisk-${PV}.tar.gz \ + file://modules.conf \ + file://asterisk.init" + +EXTRA_OECONF = " \ + --without-curses \ + --with-sm=internal \ + --without-gtk \ + --without-gtk2 \ + --without-isdnnet \ + --without-kde \ + --without-misdn \ + --without-nbs \ + --with-ncurses \ + --without-netsnmp \ + --without-newt \ + --without-odbc \ + --without-ogg \ + --without-osptk \ + --without-popt \ + --without-pri \ + --without-qt \ + --without-radius \ + --without-sdl \ + --without-spandsp \ + --without-suppserv \ + --without-tds \ + --without-termcap \ + --without-tinfo \ + --without-vorbis \ + --without-vpb \ + --without-postgres \ + --without-openais \ + --without-lua \ + --disable-xmldoc" + +inherit autotools update-rc.d + +FILES_${PN}-dbg += "${libdir}/asterisk/modules/.debug" + +do_configure_prepend() { + # Due to menuselect below we want to save off these configures + mv ${S}/menuselect/configure ${S}/menuselect/configure.SAVE + mv ${S}/menuselect/mxml/configure ${S}/menuselect/mxml/configure.SAVE + mv ${S}/main/editline/configure ${S}/main/editline/configure.SAVE +} + +do_configure_append() { + # Put this back + mv ${S}/menuselect/configure.SAVE ${S}/menuselect/configure + mv ${S}/menuselect/mxml/configure.SAVE ${S}/menuselect/mxml/configure + mv ${S}/main/editline/configure.SAVE ${S}/main/editline/configure +} + +INITSCRIPT_PACKAGES = "${PN}" +INITSCRIPT_NAME_${PN} = "asterisk" +INITSCRIPT_PARAMS_${PN} = "defaults 29 29" + +CONFFILES_${PN} = "${sysconfdir}/asterisk/extensions.conf \ + ${sysconfdir}/asterisk/modules.conf \ + ${sysconfdir}/asterisk/sip.conf" + +PACKAGES =+ "${PN}-moh" + +DESCRIPTION_${PN}-moh = "Asterisk MusicOnHold sound" +FILES_${PN}-moh = "${localstatedir}/lib/${PN}/moh" + + +do_install_append() { + install -d ${D}${sysconfdir}/init.d + install -d ${D}${sysconfdir}/asterisk + + install -m 0775 ${WORKDIR}/asterisk.init ${D}${sysconfdir}/init.d/asterisk + install -m 0660 ${WORKDIR}/modules.conf ${D}${sysconfdir}/asterisk/ +} diff --git a/recipes-isdn/asterisk/files/asterisk.init b/recipes-isdn/asterisk/files/asterisk.init new file mode 100755 index 0000000000..8ef76aa2f6 --- /dev/null +++ b/recipes-isdn/asterisk/files/asterisk.init @@ -0,0 +1,21 @@ +#!/bin/sh + +NAME=asterisk + +set -e + +case "$1" in + start) + /usr/sbin/asterisk + echo "Forked asterisk" + ;; + stop) + echo "Can not stop it" + ;; + *) + N=/etc/init.d/$NAME + echo "Usage: $N {start|stop|restart|force-reload}" >&2 + exit 1 +esac + +exit 0 diff --git a/recipes-isdn/asterisk/files/modules.conf b/recipes-isdn/asterisk/files/modules.conf new file mode 100644 index 0000000000..68db67fbd9 --- /dev/null +++ b/recipes-isdn/asterisk/files/modules.conf @@ -0,0 +1,2 @@ +[modules] +autoload=yes