Fix compilation, change rpl_malloc detection, closes #423
[openwrt.git] / openwrt / package / asterisk / Makefile
index 4703154..015f0cc 100644 (file)
@@ -7,7 +7,7 @@ PKG_VERSION:=1.2.1
 PKG_RELEASE:=1
 PKG_MD5SUM:=04657086791e80f319c0d728af705001
 
-PKG_SOURCE_URL:=http://ftp.digium.com/pub/asterisk/ ftp://ftp.digium.com/pub/asterisk/
+PKG_SOURCE_URL:=http://ftp.digium.com/pub/asterisk/old-releases/ ftp://ftp.digium.com/pub/asterisk/old-releases/
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_CAT:=zcat
 
@@ -23,6 +23,7 @@ $(eval $(call PKG_template,ASTERISK_SQLITE,asterisk-sqlite,$(PKG_VERSION)-$(PKG_
 $(eval $(call PKG_template,ASTERISK_VOICEMAIL,asterisk-voicemail,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
 $(eval $(call PKG_template,ASTERISK_SOUNDS,asterisk-sounds,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
 $(eval $(call PKG_template,ASTERISK_CHAN_BLUETOOTH,asterisk-chan-bluetooth,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
+$(eval $(call PKG_template,ASTERISK_CHAN_H323,asterisk-chan-h323,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
 $(eval $(call PKG_template,ASTERISK_CHAN_MGCP,asterisk-chan-mgcp,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
 $(eval $(call PKG_template,ASTERISK_CHAN_SKINNY,asterisk-chan-skinny,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
 $(eval $(call PKG_template,ASTERISK_CODEC_ILBC,asterisk-codec-ilbc,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
@@ -57,6 +58,21 @@ $(PKG_BUILD_DIR)/.configured:
        touch $@
 
 $(PKG_BUILD_DIR)/.built:
+       (cd $(PKG_BUILD_DIR)/channels/h323/ ; \
+               $(MAKE) \
+               CROSS_ARCH="Linux" \
+               CROSS_COMPILE="$(TARGET_CROSS)" \
+               CROSS_COMPILE_BIN="/void/" \
+               CROSS_COMPILE_TARGET="/void/" \
+               $(TARGET_CONFIGURE_OPTS) \
+               HOST_CC="$(HOSTCC)" \
+               OPTIMIZE="$(TARGET_CFLAGS)" \
+               PROC="$(ARCH)" \
+               DEBUG="" \
+               OPTIONS="-DLOW_MEMORY -Dlinux" \
+               OPENH323DIR=$(BUILD_DIR)/openh323-cvs-20051230 \
+               opt ; \
+       );
        $(MAKE) -C "$(PKG_BUILD_DIR)" \
                CROSS_ARCH="Linux" \
                CROSS_COMPILE="$(TARGET_CROSS)" \
@@ -77,12 +93,14 @@ $(PKG_BUILD_DIR)/.built:
                EXTRA_RES_MODULES="$(EXTRA_RES_MODULES)" \
                DESTDIR="$(PKG_INSTALL_DIR)" \
                ASTVARLIBDIR="/usr/lib/asterisk" \
+               OPENH323DIR=$(BUILD_DIR)/openh323-cvs-20051230 \
+               PWLIBDIR=$(BUILD_DIR)/pwlib \
                all install samples
        rm -f $(PKG_INSTALL_DIR)/etc/asterisk/*.old
        touch $@
 
 $(IPKG_ASTERISK):
-       cp -fpR $(PKG_INSTALL_DIR)/* $(IDIR_ASTERISK)
+       $(CP) $(PKG_INSTALL_DIR)/* $(IDIR_ASTERISK)
        rm -rf $(IDIR_ASTERISK)/usr/sbin/astgenkey
        rm -rf $(IDIR_ASTERISK)/usr/bin
        rm -rf $(IDIR_ASTERISK)/usr/share
@@ -128,23 +146,23 @@ $(IPKG_ASTERISK):
 $(IPKG_ASTERISK_MINI):
        install -d -m0755 $(IDIR_ASTERISK_MINI)/etc/asterisk
        for f in asterisk enum extconfig extensions features iax iaxprov logger manager modules musiconhold rtp sip; do \
-         cp -fpR $(PKG_INSTALL_DIR)/etc/asterisk/$$f.conf $(IDIR_ASTERISK_MINI)/etc/asterisk/ ; \
+         $(CP) $(PKG_INSTALL_DIR)/etc/asterisk/$$f.conf $(IDIR_ASTERISK_MINI)/etc/asterisk/ ; \
        done
        install -m0644 ./files/modules.conf $(IDIR_ASTERISK)/etc/asterisk/
        $(SED) 's|/var/lib/asterisk|/usr/lib/asterisk|g' $(PKG_INSTALL_DIR)/etc/asterisk/musiconhold.conf
        install -d -m0755 $(IDIR_ASTERISK_MINI)/usr/lib/asterisk
-       cp -fpR $(PKG_INSTALL_DIR)/usr/lib/asterisk/firmware $(IDIR_ASTERISK_MINI)/usr/lib/asterisk/
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/asterisk/firmware $(IDIR_ASTERISK_MINI)/usr/lib/asterisk/
        install -d -m0755 $(IDIR_ASTERISK_MINI)/usr/lib/asterisk/keys
        install -d -m0755 $(IDIR_ASTERISK_MINI)/usr/lib/asterisk/modules
        for f in chan_iax2 chan_local chan_sip codec_gsm codec_ulaw format_gsm format_pcm format_wav \
          format_wav_gsm pbx_config res_features res_musiconhold; do \
-         cp -fpR $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/$$f.so $(IDIR_ASTERISK_MINI)/usr/lib/asterisk/modules/ ; \
+         $(CP) $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/$$f.so $(IDIR_ASTERISK_MINI)/usr/lib/asterisk/modules/ ; \
        done
        install -d -m0755 $(IDIR_ASTERISK_MINI)/usr/lib/asterisk/mohmp3
        install -d -m0755 $(IDIR_ASTERISK_MINI)/usr/lib/asterisk/sounds
        install -d -m0755 $(IDIR_ASTERISK_MINI)/usr/sbin
-       cp -fpR $(PKG_INSTALL_DIR)/usr/sbin/asterisk $(IDIR_ASTERISK_MINI)/usr/sbin/
-       cp -fpR $(PKG_INSTALL_DIR)/usr/sbin/safe_asterisk $(IDIR_ASTERISK_MINI)/usr/sbin/
+       $(CP) $(PKG_INSTALL_DIR)/usr/sbin/asterisk $(IDIR_ASTERISK_MINI)/usr/sbin/
+       $(CP) $(PKG_INSTALL_DIR)/usr/sbin/safe_asterisk $(IDIR_ASTERISK_MINI)/usr/sbin/
        install -d -m0755 $(IDIR_ASTERISK_MINI)/etc/default
        install -m0644  ./files/asterisk.default $(IDIR_ASTERISK_MINI)/etc/default/asterisk
        install -d -m0755 $(IDIR_ASTERISK_MINI)/etc/init.d
@@ -179,7 +197,7 @@ $(IPKG_ASTERISK_SQLITE):
 
 $(IPKG_ASTERISK_SOUNDS):
        install -d -m0755 $(IDIR_ASTERISK_SOUNDS)/usr/lib/asterisk/sounds
-       cp -fpR $(PKG_BUILD_DIR)/sounds/* $(IDIR_ASTERISK_SOUNDS)/usr/lib/asterisk/sounds/
+       $(CP) $(PKG_BUILD_DIR)/sounds/* $(IDIR_ASTERISK_SOUNDS)/usr/lib/asterisk/sounds/
        rm -f $(IDIR_ASTERISK_SOUNDS)/usr/lib/asterisk/sounds/*.mp3
        rm -f $(IDIR_ASTERISK_SOUNDS)/usr/lib/asterisk/sounds/vm-*
        $(IPKG_BUILD) $(IDIR_ASTERISK_SOUNDS) $(PACKAGE_DIR)
@@ -191,7 +209,7 @@ $(IPKG_ASTERISK_VOICEMAIL):
        install -m0755 $(PKG_BUILD_DIR)/apps/*voicemail.so $(IDIR_ASTERISK_VOICEMAIL)/usr/lib/asterisk/modules/
        install -m0755 $(PKG_BUILD_DIR)/res/res_adsi.so $(IDIR_ASTERISK_VOICEMAIL)/usr/lib/asterisk/modules/
        install -d -m0755 $(IDIR_ASTERISK_VOICEMAIL)/usr/lib/asterisk/sounds
-       cp -fpR $(PKG_BUILD_DIR)/sounds/vm-*.gsm $(IDIR_ASTERISK_VOICEMAIL)/usr/lib/asterisk/sounds/
+       $(CP) $(PKG_BUILD_DIR)/sounds/vm-*.gsm $(IDIR_ASTERISK_VOICEMAIL)/usr/lib/asterisk/sounds/
        $(RSTRIP) $(IDIR_ASTERISK_VOICEMAIL)
        $(IPKG_BUILD) $(IDIR_ASTERISK_VOICEMAIL) $(PACKAGE_DIR)
 
@@ -203,6 +221,14 @@ $(IPKG_ASTERISK_CHAN_BLUETOOTH):
        $(RSTRIP) $(IDIR_ASTERISK_CHAN_BLUETOOTH)
        $(IPKG_BUILD) $(IDIR_ASTERISK_CHAN_BLUETOOTH) $(PACKAGE_DIR)
 
+$(IPKG_ASTERISK_CHAN_H323):
+       install -d -m0755 $(IDIR_ASTERISK_CHAN_H323)/etc/asterisk
+       install -m0644 $(PKG_BUILD_DIR)/channels/h323/h323.conf.sample $(IDIR_ASTERISK_CHAN_H323)/etc/asterisk/h323.conf
+       install -d -m0755 $(IDIR_ASTERISK_CHAN_H323)/usr/lib/asterisk/modules
+       install -m0755 $(PKG_BUILD_DIR)/channels/chan_h323.so $(IDIR_ASTERISK_CHAN_H323)/usr/lib/asterisk/modules/
+       $(RSTRIP) $(IDIR_ASTERISK_CHAN_H323)
+       $(IPKG_BUILD) $(IDIR_ASTERISK_CHAN_H323) $(PACKAGE_DIR)
+
 $(IPKG_ASTERISK_CHAN_MGCP):
        install -d -m0755 $(IDIR_ASTERISK_CHAN_MGCP)/etc/asterisk
        install -m0644 $(PKG_BUILD_DIR)/configs/mgcp.conf.sample $(IDIR_ASTERISK_CHAN_MGCP)/etc/asterisk/mgcp.conf
This page took 0.024512 seconds and 4 git commands to generate.