<commit_before># Copyright (C) 2007, <NAME> - Digital OPSiS, All Rights Reserved
# Released under the MIT license (see packages/COPYING)
DESCRIPTION = "The Asterisk open source software PBX"
HOMEPAGE = "http://www.asterisk.org"
SECTION = "voip"
LICENSE = "GPLv2"
PRIORITY = "optional"
SECTION = "console/telephony"
DEPENDS = "speex readline zlib openssl curl popt gnutls sqlite libogg libvorbis"
#RRECOMMENDS_${PN} = "logrotate"
PR = "r0"


SRC_URI="http://ftp.digium.com/pub/asterisk/releases/asterisk-${PV}.tar.gz\
	file://sounds.xml.patch;patch=1\
	file://Makefile.patch;patch=1\
	file://logrotate \
	file://volatiles \
	file://init"

ARCH_efika="ppc"
ARCH_dht-walnut="ppc"
ARCH_magicbox="ppc"
ARCH_sequoia="ppc"




INITSCRIPT_NAME = "asterisk"
INITSCRIPT_PARAMS = "defaults 60"

inherit autotools update-rc.d

EXTRA_OECONF =  "--with-ssl=${STAGING_EXECPREFIXDIR} \
			--with-z=${STAGING_EXECPREFIXDIR} \
			--with-curl=${STAGING_EXECPREFIXDIR} \
			--with-termcap=${STAGING_EXECPREFIXDIR} \
			--with-ogg=${STAGING_EXECPREFIXDIR} \
			--with-vorbis=${STAGING_EXECPREFIXDIR} \
			--with-sqlite=${STAGING_EXECPREFIXDIR} \
			--with-popt=${STAGING_EXECPREFIXDIR} \
			--with-gnutls=${STAGING_EXECPREFIXDIR} \
			--without-curses\
			--with-ncurses=${STAGING_EXECPREFIXDIR} \
			--without-imap\
			--without-netsnmp\
			--without-odbc\
			--without-osptk\
			--without-nbs\
			--without-pwlib\
			--without-radius\
			--without-tds\
			--without-postgres\
			--without-zaptel\
			"

#export NOISY_BUILD=yes

export ASTCFLAGS = "-fsigned-char -I${STAGING_INCDIR} -DPATH_MAX=4096"
export ASTLDFLAGS="${LDFLAGS} -lpthread -ldl -lresolv "
export PROC="${ARCH}"

do_configure_prepend () {
	sed -i 's:/var:${localstatedir}:' ${WORKDIR}/logrotate
	sed -i 's:/etc/init.d:${sysconfdir}/init.d:' ${WORKDIR}/logrotate
	sed -i 's:/var:${localstatedir}:' ${WORKDIR}/volatiles
}

do_configure () {
	# Looks like rebuilding configure doesn't work, so we are skipping
	# that and are just using the shipped one
	gnu-configize
	libtoolize --force
	oe_runconf
}


do_compile() {
        (
         #make sure that menuselect gets build using host toolchain
         unset CC LD CXX CCLD CFLAGS CPPFLAGS LDFLAGS CXXFLAGS
         cd menuselect 
         ./configure
         oe_runmake
         cd ../
        ) || exit 1
        oe_runmake
}




do_install_append() {
        install -d ${D}${sysconfdir}/init.d/
	install -m 755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/asterisk<commit_msg>asterisk: add unset RANLIB to make the build success.<commit_after># Copyright (C) 2007, <NAME> - Digital OPSiS, All Rights Reserved
# Released under the MIT license (see packages/COPYING)
DESCRIPTION = "The Asterisk open source software PBX"
HOMEPAGE = "http://www.asterisk.org"
SECTION = "voip"
LICENSE = "GPLv2"
PRIORITY = "optional"
SECTION = "console/telephony"
DEPENDS = "speex readline zlib openssl curl popt gnutls sqlite libogg libvorbis"
#RRECOMMENDS_${PN} = "logrotate"
PR = "r0"


SRC_URI="http://ftp.digium.com/pub/asterisk/releases/asterisk-${PV}.tar.gz\
	file://sounds.xml.patch;patch=1\
	file://Makefile.patch;patch=1\
	file://logrotate \
	file://volatiles \
	file://init"

ARCH_efika="ppc"
ARCH_dht-walnut="ppc"
ARCH_magicbox="ppc"
ARCH_sequoia="ppc"




INITSCRIPT_NAME = "asterisk"
INITSCRIPT_PARAMS = "defaults 60"

inherit autotools update-rc.d

EXTRA_OECONF =  "--with-ssl=${STAGING_EXECPREFIXDIR} \
			--with-z=${STAGING_EXECPREFIXDIR} \
			--with-curl=${STAGING_EXECPREFIXDIR} \
			--with-termcap=${STAGING_EXECPREFIXDIR} \
			--with-ogg=${STAGING_EXECPREFIXDIR} \
			--with-vorbis=${STAGING_EXECPREFIXDIR} \
			--with-sqlite=${STAGING_EXECPREFIXDIR} \
			--with-popt=${STAGING_EXECPREFIXDIR} \
			--with-gnutls=${STAGING_EXECPREFIXDIR} \
			--without-curses\
			--with-ncurses=${STAGING_EXECPREFIXDIR} \
			--without-imap\
			--without-netsnmp\
			--without-odbc\
			--without-osptk\
			--without-nbs\
			--without-pwlib\
			--without-radius\
			--without-tds\
			--without-postgres\
			--without-zaptel\
			"

#export NOISY_BUILD=yes

export ASTCFLAGS = "-fsigned-char -I${STAGING_INCDIR} -DPATH_MAX=4096"
export ASTLDFLAGS="${LDFLAGS} -lpthread -ldl -lresolv "
export PROC="${ARCH}"

do_configure_prepend () {
	sed -i 's:/var:${localstatedir}:' ${WORKDIR}/logrotate
	sed -i 's:/etc/init.d:${sysconfdir}/init.d:' ${WORKDIR}/logrotate
	sed -i 's:/var:${localstatedir}:' ${WORKDIR}/volatiles
}

do_configure () {
	# Looks like rebuilding configure doesn't work, so we are skipping
	# that and are just using the shipped one
	gnu-configize
	libtoolize --force
	oe_runconf
}


do_compile() {
        (
         #make sure that menuselect gets build using host toolchain
         unset CC LD CXX CCLD CFLAGS CPPFLAGS LDFLAGS CXXFLAGS RANLIB
         cd menuselect 
         ./configure
         oe_runmake
         cd ../
        ) || exit 1
        oe_runmake
}




do_install_append() {
        install -d ${D}${sysconfdir}/init.d/
	install -m 755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/asterisk
{'fraction_non_alphanumeric': 0.15061085519727618, 'fraction_numerical': 0.0072100941317844985, 'mean_word_length': 3.4, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 2}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5378638', 'n_tokens_mistral': 2100, 'n_tokens_neox': 1868, 'n_words': 358}