workaround asterisk daemon issue #4071 caused by uclibc 0.29 (thanks to charles.kirsch)
[openwrt/svn-archive/archive.git] / net / asterisk-1.4.x / Makefile
index 17aa9dc01d90148f9e6da63e9a462416f1600035..b3c5faf04635e37e70214339efb58cc4f8a43ff4 100644 (file)
@@ -9,36 +9,49 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=asterisk
-PKG_VERSION:=1.4.11
-PKG_RELEASE:=1
+PKG_VERSION:=1.4.22
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=http://ftp.digium.com/pub/asterisk/old-releases/
-PKG_MD5SUM:=3ba9b399fedc68de4845b1c5603d167c
+PKG_SOURCE_URL:=http://downloads.digium.com/pub/asterisk/releases/
+#PKG_MD5SUM:=c4cf69eb6eae3105806b08d3efc28ec7
+PKG_MD5SUM:=7626febc4a01e16e012dfccb9e4ab9d2
 
 PKG_BUILD_DEPENDS:= libopenh323 pwlib
 
 include $(INCLUDE_DIR)/package.mk
 
+STAMP_CONFIGURED:=$(STAMP_CONFIGURED)_$(call confvar, \
+       CONFIG_PACKAGE_asterisk14 CONFIG_PACKAGE_asterisk14-mini \
+       CONFIG_PACKAGE_asterisk14-chan-alsa CONFIG_PACKAGE_asterisk14-chan-gtalk \
+       CONFIG_PACKAGE_asterisk14-chan-h323 CONFIG_PACKAGE_asterisk14-chan-mgcp \
+       CONFIG_PACKAGE_asterisk14-chan-skinny CONFIG_PACKAGE_asterisk14-codec-ilbc \
+       CONFIG_PACKAGE_asterisk14-codec-lpc10 CONFIG_PACKAGE_asterisk14-codec-speex \
+       CONFIG_PACKAGE_asterisk14-pbx-dundi CONFIG_PACKAGE_asterisk14-res-agi \
+       CONFIG_PACKAGE_asterisk14-res-crypto CONFIG_PACKAGE_asterisk14-pgsql \
+       CONFIG_PACKAGE_asterisk14-sqlite CONFIG_PACKAGE_asterisk14-voicemail \
+       CONFIG_PACKAGE_asterisk14-sounds \
+)
+
 define Package/asterisk14/Default
   SUBMENU:=asterisk14 (Complete Open Source PBX), v1.4.x
   SECTION:=net
   CATEGORY:=Network
+  URL:=http://www.asterisk.org/
 endef
 
 define Package/asterisk14/Default/description
- Asterisk is a complete PBX in software. It provides all of the features 
- you would expect from a PBX and more. Asterisk does voice over IP in three 
- protocols, and can interoperate with almost all standards-based telephony 
+ Asterisk is a complete PBX in software. It provides all of the features
+ you would expect from a PBX and more. Asterisk does voice over IP in three
+ protocols, and can interoperate with almost all standards-based telephony
  equipment using relatively inexpensive hardware.
-  URL:=http://www.asterisk.org/
 endef
 
 
 define Package/asterisk14
 $(call Package/asterisk14/Default)
   TITLE:=Complete open source PBX
-  DEPENDS:= +libltdl +libncurses +libpopt +libpthread
+  DEPENDS:= +libncurses +libpopt +libpthread @!TARGET_avr32
 endef
 
 define Package/asterisk14/description
@@ -49,7 +62,7 @@ endef
 define Package/asterisk14-mini
 $(call Package/asterisk14/Default)
   TITLE:=Minimal open source PBX
-  DEPENDS:=+libncurses +libpthread
+  DEPENDS:=+libncurses +libpthread @!TARGET_avr32
 endef
 
 define Package/asterisk14-mini/description
@@ -71,6 +84,58 @@ $(call Package/asterisk14/Default/description)
 endef
 
 
+define Package/asterisk14-app-meetme
+$(call Package/asterisk14/Default)
+  TITLE:=conferencing support
+  DEPENDS:= +asterisk14 +zaptel14-libtonezone
+endef
+
+define Package/asterisk14-app-meetme/description
+$(call Package/asterisk14/Default/description)
+ This package provides the MeetMe application driver Conferencing support to 
+ Asterisk.
+endef
+
+
+define Package/asterisk14-chan-oss
+$(call Package/asterisk14/Default)
+  TITLE:=OSS soundcards support
+  DEPENDS:= +asterisk14
+endef
+
+define Package/asterisk14-chan-oss/description
+$(call Package/asterisk14/Default/description)
+ This package provides the channel driver for OSS sound cards support to 
+ Asterisk.
+endef
+
+
+define Package/asterisk14-app-meetme
+$(call Package/asterisk14/Default)
+  TITLE:=conferencing support
+  DEPENDS:= +asterisk14 +zaptel14-libtonezone
+endef
+
+define Package/asterisk14-app-meetme/description
+$(call Package/asterisk14/Default/description)
+ This package provides the MeetMe application driver Conferencing support to 
+ Asterisk.
+endef
+
+
+define Package/asterisk14-chan-oss
+$(call Package/asterisk14/Default)
+  TITLE:=OSS soundcards support
+  DEPENDS:= +asterisk14
+endef
+
+define Package/asterisk14-chan-oss/description
+$(call Package/asterisk14/Default/description)
+ This package provides the channel driver for OSS sound cards support to 
+ Asterisk.
+endef
+
+
 define Package/asterisk14-chan-alsa
 $(call Package/asterisk14/Default)
   TITLE:=ALSA soundcards support
@@ -135,17 +200,17 @@ $(call Package/asterisk14/Default/description)
 endef
 
 
-define Package/asterisk14-codec-ilbc
-$(call Package/asterisk14/Default)
-  TITLE:=ILBC Translator
-  DEPENDS:= +asterisk14
-endef
+#define Package/asterisk14-codec-ilbc
+#$(call Package/asterisk14/Default)
+#  TITLE:=ILBC Translator
+#  DEPENDS:= +asterisk14
+#endef
 
-define Package/asterisk14-codec-ilbc/description
-$(call Package/asterisk14/Default/description)
- This package contains the ILBC (Internet Low Bitrate Codec) translator 
- for Asterisk.
-endef
+#define Package/asterisk14-codec-ilbc/description
+#$(call Package/asterisk14/Default/description)
+# This package contains the ILBC (Internet Low Bitrate Codec) translator 
+# for Asterisk.
+#endef
 
 
 define Package/asterisk14-codec-lpc10
@@ -164,7 +229,7 @@ endef
 define Package/asterisk14-codec-speex
 $(call Package/asterisk14/Default)
   TITLE:=Speex/PCM16 Codec Translator
-  DEPENDS:= +asterisk14 +libspeex
+  DEPENDS:= +asterisk14 +libspeex +libspeexdsp
 endef
 
 define Package/asterisk14-chan-speex/description
@@ -260,15 +325,24 @@ $(call Package/asterisk14/Default/description)
  This package contains voicemail related modules for Asterisk.
 endef
 
+define Package/asterisk14-rawplayer
+$(call Package/asterisk14/Default)
+  TITLE:=Play raw files for asterisk
+endef
+
+define Package/asterisk14-rawplayer/description
+ Contains the rawplayer utility for asterisk
+endef
+
 
+#      --with-ltdl="$(STAGING_DIR)/usr" \
 CONFIGURE_ARGS+= \
        --without-curl \
        --without-curses \
-       --without-gsm \
+       --with-gsm="$(STAGING_DIR)/usr" \
        --without-imap \
        --without-isdnnet \
        --without-kde \
-       --with-ltdl="$(STAGING_DIR)/usr" \
        --without-misdn \
        --without-nbs \
        --with-ncurses="$(STAGING_DIR)/usr" \
@@ -277,7 +351,6 @@ CONFIGURE_ARGS+= \
        --without-odbc \
        --without-ogg \
        --without-osptk \
-       --without-oss \
        --with-popt="$(STAGING_DIR)/usr" \
        --without-pri \
        --without-qt \
@@ -287,27 +360,44 @@ CONFIGURE_ARGS+= \
        --without-tds \
        --without-termcap \
        --without-tinfo \
-       --without-tonezone \
        --without-vorbis \
        --without-vpb \
        --with-z="$(STAGING_DIR)/usr" \
-       --without-zaptel \
 
 EXTRA_CFLAGS:= $(TARGET_CPPFLAGS)
 EXTRA_LDFLAGS:= $(TARGET_LDFLAGS)
 
+ifneq ($(SDK)$(CONFIG_PACKAGE_asterisk14-app-meetme),)
+  CONFIGURE_ARGS+= \
+       --with-tonezone="$(STAGING_DIR)/usr" --with-zaptel="$(STAGING_DIR)/usr"
+else
+  CONFIGURE_ARGS+= \
+       --without-tonezone --without-zaptel
+endif
+
 ifneq ($(SDK)$(CONFIG_PACKAGE_asterisk14-chan-alsa),)
   CONFIGURE_ARGS+= \
-       --with-asound="$(STAGING_DIR)/usr"
+        --with-asound="$(STAGING_DIR)/usr"
 else
   CONFIGURE_ARGS+= \
-       --without-asound
+        --without-asound
+endif
+
+ifneq ($(SDK)$(CONFIG_PACKAGE_asterisk14-chan-oss),)
+  CONFIGURE_ARGS+= \
+        --with-oss
+else
+  CONFIGURE_ARGS+= \
+        --without-oss
 endif
 
 ifneq ($(SDK)$(CONFIG_PACKAGE_asterisk14-chan-gtalk),)
   CONFIGURE_ARGS+= \
        --with-gnutls="$(STAGING_DIR)/usr" \
        --with-iksemel="$(STAGING_DIR)/usr"
+  SITE_VARS+= \
+       ac_cv_lib_iksemel_iks_start_sasl=yes \
+       ac_cv_lib_gnutls_gnutls_bye=yes
 else
   CONFIGURE_ARGS+= \
        --without-gnutls \
@@ -370,6 +460,7 @@ endif
 
 
 define Build/Configure
+       -rm $(PKG_BUILD_DIR)/menuselect.makeopts
        ( cd $(PKG_BUILD_DIR); ./bootstrap.sh )
        $(call Build/Configure/Default,,$(SITE_VARS))
 endef
@@ -390,6 +481,8 @@ define Build/Compile
                DESTDIR="$(PKG_INSTALL_DIR)" \
                all install samples
        $(SED) 's|/var/lib/asterisk|/usr/lib/asterisk|g' $(PKG_INSTALL_DIR)/etc/asterisk/musiconhold.conf
+
+       $(TARGET_CC) -O2 $(PKG_BUILD_DIR)/contrib/utils/rawplayer.c -o $(PKG_BUILD_DIR)/rawplayer
 endef
 
 define Build/InstallDev
@@ -438,15 +531,15 @@ define Package/asterisk14/conffiles
 /etc/asterisk/users.conf
 endef
 
-define Package/asterisk14/postinst
-#!/bin/sh
-ROOT=`echo $${PKG_ROOT} | sed 's:[\/]:\\\&:g' -`
-/bin/sed -i 's/\ \/etc/\ '$${ROOT}'etc/g' $${PKG_ROOT}/etc/asterisk/asterisk.conf
-/bin/sed -i 's/\ \/var/\ '$${ROOT}'var/g' $${PKG_ROOT}/etc/asterisk/asterisk.conf
-/bin/sed -i 's/\ \/usr/\ '$${ROOT}'usr/g' $${PKG_ROOT}/etc/asterisk/asterisk.conf
-/bin/sed -i 's/^DEST=/DEST='$${ROOT}'/g' $${PKG_ROOT}/etc/init.d/asterisk
-/bin/sed -i 's/OPTIONS=\"\"/OPTIONS=\"-C\ '$${ROOT}'etc\/asterisk\/asterisk.conf\"/g' $${PKG_ROOT}/etc/default/asterisk
-endef
+#define Package/asterisk14/postinst
+##!/bin/sh
+#ROOT=`echo $${PKG_ROOT} | sed 's:[\/]:\\\&:g' -`
+#/bin/sed -i 's/\ \/etc/\ '$${ROOT}'etc/g' $${PKG_ROOT}/etc/asterisk/asterisk.conf
+#/bin/sed -i 's/\ \/var/\ '$${ROOT}'var/g' $${PKG_ROOT}/etc/asterisk/asterisk.conf
+#/bin/sed -i 's/\ \/usr/\ '$${ROOT}'usr/g' $${PKG_ROOT}/etc/asterisk/asterisk.conf
+#/bin/sed -i 's/^DEST=/DEST='$${ROOT}'/g' $${PKG_ROOT}/etc/init.d/asterisk
+#/bin/sed -i 's/OPTIONS=\"\"/OPTIONS=\"-C\ '$${ROOT}'etc\/asterisk\/asterisk.conf\"/g' $${PKG_ROOT}/etc/default/asterisk
+#endef
 
 define Package/asterisk14/install
        $(CP) $(PKG_INSTALL_DIR)/* $(1)
@@ -469,9 +562,10 @@ define Package/asterisk14/install
                cd modules; \
                rm -rf  *adsi* *festival* *modem* *oss* *phone* *intercom* \
                        *mp3* *nbscat* *sqlite* *mysql* *postgres* *pgsql* \
-                       *voicemail* *speex* *flash* *page* *zap* *jpeg* \
+                       *voicemail* *speex* *flash* *page* *meetme* *zap* *jpeg* \
                        *snmp* \
                        chan_alsa.so \
+                       chan_oss.so \
                        chan_gtalk.so \
                        chan_h323.so \
                        chan_mgcp.so \
@@ -552,6 +646,54 @@ define Package/asterisk14-mini/install
 endef
 
 
+define Package/asterisk14-app-meetme/conffiles
+/etc/asterisk/meetme.conf
+endef
+
+define Package/asterisk14-app-meetme/install
+       $(INSTALL_DIR) $(1)/etc/asterisk
+       $(INSTALL_DATA) $(PKG_INSTALL_DIR)/etc/asterisk/meetme.conf $(1)/etc/asterisk/
+       $(INSTALL_DIR) $(1)/usr/lib/asterisk/modules
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/app_meetme.so $(1)/usr/lib/asterisk/modules/
+endef
+
+
+define Package/asterisk14-chan-oss/conffiles
+/etc/asterisk/oss.conf
+endef
+
+define Package/asterisk14-chan-oss/install
+       $(INSTALL_DIR) $(1)/etc/asterisk
+       $(INSTALL_DATA) $(PKG_INSTALL_DIR)/etc/asterisk/oss.conf $(1)/etc/asterisk/
+       $(INSTALL_DIR) $(1)/usr/lib/asterisk/modules
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/chan_oss.so $(1)/usr/lib/asterisk/modules/
+endef
+
+
+define Package/asterisk14-app-meetme/conffiles
+/etc/asterisk/meetme.conf
+endef
+
+define Package/asterisk14-app-meetme/install
+       $(INSTALL_DIR) $(1)/etc/asterisk
+       $(INSTALL_DATA) $(PKG_INSTALL_DIR)/etc/asterisk/meetme.conf $(1)/etc/asterisk/
+       $(INSTALL_DIR) $(1)/usr/lib/asterisk/modules
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/app_meetme.so $(1)/usr/lib/asterisk/modules/
+endef
+
+
+define Package/asterisk14-chan-oss/conffiles
+/etc/asterisk/oss.conf
+endef
+
+define Package/asterisk14-chan-oss/install
+       $(INSTALL_DIR) $(1)/etc/asterisk
+       $(INSTALL_DATA) $(PKG_INSTALL_DIR)/etc/asterisk/oss.conf $(1)/etc/asterisk/
+       $(INSTALL_DIR) $(1)/usr/lib/asterisk/modules
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/chan_oss.so $(1)/usr/lib/asterisk/modules/
+endef
+
+
 define Package/asterisk14-chan-alsa/conffiles
 /etc/asterisk/alsa.conf
 endef
@@ -615,11 +757,11 @@ define Package/asterisk14-chan-skinny/install
 endef
 
 
-define Package/asterisk14-codec-ilbc/install
-       $(INSTALL_DIR) $(1)/usr/lib/asterisk/modules
-       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/codec_ilbc.so $(1)/usr/lib/asterisk/modules/
-       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/format_ilbc.so $(1)/usr/lib/asterisk/modules/
-endef
+#define Package/asterisk14-codec-ilbc/install
+#      $(INSTALL_DIR) $(1)/usr/lib/asterisk/modules
+#      $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/codec_ilbc.so $(1)/usr/lib/asterisk/modules/
+#      $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/format_ilbc.so $(1)/usr/lib/asterisk/modules/
+#endef
 
 
 define Package/asterisk14-codec-lpc10/install
@@ -702,15 +844,23 @@ define Package/asterisk14-voicemail/install
        $(CP) $(PKG_INSTALL_DIR)//usr/lib/asterisk/sounds/vm-*.gsm $(1)/usr/lib/asterisk/sounds/
 endef
 
+define Package/asterisk14-rawplayer/install
+       $(INSTALL_DIR) $(1)/usr/bin
+       $(INSTALL_BIN)  $(PKG_BUILD_DIR)/rawplayer \
+                       $(1)/usr/bin
+endef
+
 
 $(eval $(call BuildPackage,asterisk14))
 $(eval $(call BuildPackage,asterisk14-mini))
+$(eval $(call BuildPackage,asterisk14-app-meetme))
+$(eval $(call BuildPackage,asterisk14-chan-oss))
 $(eval $(call BuildPackage,asterisk14-chan-alsa))
 $(eval $(call BuildPackage,asterisk14-chan-gtalk))
 $(eval $(call BuildPackage,asterisk14-chan-h323))
 $(eval $(call BuildPackage,asterisk14-chan-mgcp))
 $(eval $(call BuildPackage,asterisk14-chan-skinny))
-$(eval $(call BuildPackage,asterisk14-codec-ilbc))
+#$(eval $(call BuildPackage,asterisk14-codec-ilbc))
 $(eval $(call BuildPackage,asterisk14-codec-lpc10))
 $(eval $(call BuildPackage,asterisk14-codec-speex))
 $(eval $(call BuildPackage,asterisk14-pbx-dundi))
@@ -720,3 +870,4 @@ $(eval $(call BuildPackage,asterisk14-pgsql))
 $(eval $(call BuildPackage,asterisk14-sqlite))
 $(eval $(call BuildPackage,asterisk14-voicemail))
 $(eval $(call BuildPackage,asterisk14-sounds))
+$(eval $(call BuildPackage,asterisk14-rawplayer))