Holger Hans Peter Freyther | f52b4a6 | 2011-11-11 21:31:43 +0800 | [diff] [blame] | 1 | # Copyright (C) 2007-2008, Stelios Koroneos - Digital OPSiS, All Rights Reserved |
| 2 | # Copyright (C) 2011, sysmocom - systems for mobile communications GmbH |
| 3 | # Released under the MIT license (see packages/COPYING) |
| 4 | DESCRITOPN = "asterisk PBX" |
| 5 | DEPENDS = "openssl ncurses" |
| 6 | HOMEPAGE = "http://www.asterisk.org" |
| 7 | LICENSE = "GPLv2" |
| 8 | LIC_FILES_CHKSUM = "file://COPYING;md5=3c6764ffcbe996d1d8f919b393ccdd67" |
| 9 | |
| 10 | PR = "r2" |
| 11 | |
| 12 | SRC_URI = "http://downloads.asterisk.org/pub/telephony/asterisk/releases/asterisk-${PV}.tar.gz \ |
| 13 | file://modules.conf \ |
| 14 | file://asterisk.init" |
| 15 | |
| 16 | EXTRA_OECONF = " \ |
| 17 | --without-curses \ |
| 18 | --with-sm=internal \ |
| 19 | --without-gtk \ |
| 20 | --without-gtk2 \ |
| 21 | --without-isdnnet \ |
| 22 | --without-kde \ |
| 23 | --without-misdn \ |
| 24 | --without-nbs \ |
| 25 | --with-ncurses \ |
| 26 | --without-netsnmp \ |
| 27 | --without-newt \ |
| 28 | --without-odbc \ |
| 29 | --without-ogg \ |
| 30 | --without-osptk \ |
| 31 | --without-popt \ |
| 32 | --without-pri \ |
| 33 | --without-qt \ |
| 34 | --without-radius \ |
| 35 | --without-sdl \ |
| 36 | --without-spandsp \ |
| 37 | --without-suppserv \ |
| 38 | --without-tds \ |
| 39 | --without-termcap \ |
| 40 | --without-tinfo \ |
| 41 | --without-vorbis \ |
| 42 | --without-vpb \ |
| 43 | --without-postgres \ |
| 44 | --without-openais \ |
| 45 | --without-lua \ |
| 46 | --disable-xmldoc" |
| 47 | |
| 48 | inherit autotools update-rc.d |
| 49 | |
| 50 | FILES_${PN}-dbg += "${libdir}/asterisk/modules/.debug" |
| 51 | |
| 52 | do_configure_prepend() { |
| 53 | # Due to menuselect below we want to save off these configures |
| 54 | mv ${S}/menuselect/configure ${S}/menuselect/configure.SAVE |
| 55 | mv ${S}/menuselect/mxml/configure ${S}/menuselect/mxml/configure.SAVE |
| 56 | mv ${S}/main/editline/configure ${S}/main/editline/configure.SAVE |
| 57 | } |
| 58 | |
| 59 | do_configure_append() { |
| 60 | # Put this back |
| 61 | mv ${S}/menuselect/configure.SAVE ${S}/menuselect/configure |
| 62 | mv ${S}/menuselect/mxml/configure.SAVE ${S}/menuselect/mxml/configure |
| 63 | mv ${S}/main/editline/configure.SAVE ${S}/main/editline/configure |
| 64 | } |
| 65 | |
| 66 | INITSCRIPT_PACKAGES = "${PN}" |
| 67 | INITSCRIPT_NAME_${PN} = "asterisk" |
| 68 | INITSCRIPT_PARAMS_${PN} = "defaults 29 29" |
| 69 | |
| 70 | CONFFILES_${PN} = "${sysconfdir}/asterisk/extensions.conf \ |
| 71 | ${sysconfdir}/asterisk/modules.conf \ |
| 72 | ${sysconfdir}/asterisk/sip.conf" |
| 73 | |
| 74 | PACKAGES =+ "${PN}-moh" |
| 75 | |
| 76 | DESCRIPTION_${PN}-moh = "Asterisk MusicOnHold sound" |
| 77 | FILES_${PN}-moh = "${localstatedir}/lib/${PN}/moh" |
| 78 | |
| 79 | |
| 80 | do_install_append() { |
| 81 | install -d ${D}${sysconfdir}/init.d |
| 82 | install -d ${D}${sysconfdir}/asterisk |
| 83 | |
| 84 | install -m 0775 ${WORKDIR}/asterisk.init ${D}${sysconfdir}/init.d/asterisk |
| 85 | install -m 0660 ${WORKDIR}/modules.conf ${D}${sysconfdir}/asterisk/ |
| 86 | } |