From 3dbe5f598710f340139950567f0f46287094286a Mon Sep 17 00:00:00 2001 From: Hans Zandbelt Date: Wed, 16 Feb 2011 17:29:50 +0000 Subject: [PATCH] [packages] asterisk-*: allow headers for multiple versions to co-exist in staging SVN-Revision: 25557 --- net/asterisk-1.4.x/Makefile | 12 +++--- net/asterisk-1.6.x/Makefile | 6 ++- net/asterisk-1.8.x/Makefile | 39 +++++-------------- net/asterisk-addons-1.4.x/Makefile | 7 +--- .../patches/030-mysql_include.patch | 16 ++++++++ 5 files changed, 38 insertions(+), 42 deletions(-) create mode 100644 net/asterisk-addons-1.4.x/patches/030-mysql_include.patch diff --git a/net/asterisk-1.4.x/Makefile b/net/asterisk-1.4.x/Makefile index 3591c8567b..bac14fe665 100644 --- a/net/asterisk-1.4.x/Makefile +++ b/net/asterisk-1.4.x/Makefile @@ -7,14 +7,16 @@ include $(TOPDIR)/rules.mk -PKG_NAME:=asterisk +PKG_NAME:=asterisk14 PKG_VERSION:=1.4.25.1 PKG_RELEASE:=3 -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE:=asterisk-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=http://downloads.digium.com/pub/asterisk/releases/ PKG_MD5SUM:=ca17be11559eb939ea16b8de98ddeefb +PKG_BUILD_DIR=$(BUILD_DIR)/asterisk-$(PKG_VERSION) + PKG_BUILD_DEPENDS:= libopenh323 pwlib include $(INCLUDE_DIR)/package.mk @@ -484,9 +486,9 @@ define Build/Compile endef define Build/InstallDev - $(INSTALL_DIR) $(1)/usr/include/asterisk/ - $(CP) $(PKG_INSTALL_DIR)/usr/include/asterisk/*.h $(1)/usr/include/asterisk/ - $(CP) $(PKG_INSTALL_DIR)/usr/include/asterisk.h $(1)/usr/include/ + $(INSTALL_DIR) $(1)/usr/include/asterisk-1.4/include/asterisk/ + $(CP) $(PKG_INSTALL_DIR)/usr/include/asterisk/*.h $(1)/usr/include/asterisk-1.4/include/asterisk/ + $(CP) $(PKG_INSTALL_DIR)/usr/include/asterisk.h $(1)/usr/include/asterisk-1.4/include/ endef diff --git a/net/asterisk-1.6.x/Makefile b/net/asterisk-1.6.x/Makefile index 0a8baef147..356eb83213 100644 --- a/net/asterisk-1.6.x/Makefile +++ b/net/asterisk-1.6.x/Makefile @@ -7,14 +7,16 @@ include $(TOPDIR)/rules.mk -PKG_NAME:=asterisk +PKG_NAME:=asterisk16 PKG_VERSION:=1.6.2.14 PKG_RELEASE:=1 -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE:=asterisk-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=http://downloads.digium.com/pub/asterisk/releases/ PKG_MD5SUM:=4f0414c9b2d449222b2fc7096cbaffe7 +PKG_BUILD_DIR=$(BUILD_DIR)/asterisk-$(PKG_VERSION) + include $(INCLUDE_DIR)/package.mk define Package/asterisk16/Default diff --git a/net/asterisk-1.8.x/Makefile b/net/asterisk-1.8.x/Makefile index 911d06e1f4..b561c0cd79 100644 --- a/net/asterisk-1.8.x/Makefile +++ b/net/asterisk-1.8.x/Makefile @@ -7,14 +7,16 @@ include $(TOPDIR)/rules.mk -PKG_NAME:=asterisk +PKG_NAME:=asterisk18 PKG_VERSION:=1.8.2.3 PKG_RELEASE:=1 -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE:=asterisk-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=http://downloads.digium.com/pub/asterisk/releases/ PKG_MD5SUM:=e394b63dd71c07497620dc12883e0b80 +PKG_BUILD_DIR=$(BUILD_DIR)/asterisk-$(PKG_VERSION) + include $(INCLUDE_DIR)/package.mk define Package/asterisk18/Default @@ -36,7 +38,7 @@ endef define Package/asterisk18 $(call Package/asterisk18/Default) TITLE:=Complete open source PBX - DEPENDS:= +libopenssl +libncurses +libpopt +libpthread +zlib @!TARGET_avr32 @!PACKAGE_asterisk14 + DEPENDS:= +libopenssl +libncurses +libpopt +libpthread +zlib @!TARGET_avr32 endef define Package/asterisk18/description @@ -114,18 +116,6 @@ $(call Package/asterisk18/Default/description) Asterisk. endef -define Package/asterisk18-res-rtp-asterisk -$(call Package/asterisk18/Default) - TITLE:=RTP Support - DEPENDS:= +asterisk18 -endef - -define Package/asterisk18-res-rtp-asterisk/description -$(call Package/asterisk18/Default/description) - This package provides RTP support to Asterisk. - It is needed by chan_sip. -endef - define Package/asterisk18-chan-gtalk $(call Package/asterisk18/Default) TITLE:=GTalk support @@ -235,9 +225,9 @@ define Build/Compile endef define Build/InstallDev - $(INSTALL_DIR) $(1)/usr/include/asterisk/ - $(CP) $(PKG_INSTALL_DIR)/usr/include/asterisk/*.h $(1)/usr/include/asterisk/ - $(CP) $(PKG_INSTALL_DIR)/usr/include/asterisk.h $(1)/usr/include/ + $(INSTALL_DIR) $(1)/usr/include/asterisk-1.8/include/asterisk/ + $(CP) $(PKG_INSTALL_DIR)/usr/include/asterisk/*.h $(1)/usr/include/asterisk-1.8/include/asterisk/ + $(CP) $(PKG_INSTALL_DIR)/usr/include/asterisk.h $(1)/usr/include/asterisk-1.8/include/ endef define Package/asterisk18/conffiles @@ -264,7 +254,7 @@ define Package/asterisk18/install done $(INSTALL_DIR) $(1)/usr/lib/asterisk/modules for f in app_dial app_echo app_playback app_macro \ - chan_sip \ + chan_sip res_rtp \ codec_ulaw codec_gsm \ format_gsm format_pcm format_wav format_wav_gsm \ pbx_config \ @@ -355,16 +345,6 @@ define Package/asterisk18-res-musiconhold/install $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/res_musiconhold.so $(1)/usr/lib/asterisk/modules/ endef -define Package/asterisk18-res-rtp-asterisk/install - $(INSTALL_DIR) $(1)/usr/lib/asterisk/modules - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/res_rtp*.so $(1)/usr/lib/asterisk/modules/ -endef - -define Package/asterisk18-res-rtp-asterisk/install - $(INSTALL_DIR) $(1)/usr/lib/asterisk/modules - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/res_rtp*.so $(1)/usr/lib/asterisk/modules/ -endef - define Package/asterisk18-chan-gtalk/conffiles /etc/asterisk/gtalk.conf /etc/asterisk/jabber.conf @@ -413,7 +393,6 @@ $(eval $(call BuildPackage,asterisk18-sounds)) $(eval $(call BuildPackage,asterisk18-chan-iax2)) $(eval $(call BuildPackage,asterisk18-cdr)) $(eval $(call BuildPackage,asterisk18-res-musiconhold)) -$(eval $(call BuildPackage,asterisk18-res-rtp-asterisk)) $(eval $(call BuildPackage,asterisk18-chan-gtalk)) $(eval $(call BuildPackage,asterisk18-curl)) $(eval $(call Buildasterisk18ModuleTemplate,app_authenticate,Authenticate,support for executing arbitrary authenticate commands)) diff --git a/net/asterisk-addons-1.4.x/Makefile b/net/asterisk-addons-1.4.x/Makefile index 7fe91b5673..36c48ca778 100644 --- a/net/asterisk-addons-1.4.x/Makefile +++ b/net/asterisk-addons-1.4.x/Makefile @@ -91,14 +91,11 @@ ifneq ($(SDK)$(CONFIG_PACKAGE_asterisk14-mysql),) endif CONFIGURE_ARGS += \ - --with-asterisk="$(STAGING_DIR)/usr" \ + --with-asterisk="$(STAGING_DIR)/usr/include/asterisk-1.4" \ --with-bluetooth="$(STAGING_DIR)/usr" \ --with-ncurses="$(STAGING_DIR)/usr" \ --with-mysqlclient="$(STAGING_DIR)/usr" \ - -CONFIGURE_VARS += \ - ac_cv_file__usr_include_asterisk_channel_h="yes" \ - + define Build/Configure ( cd $(PKG_BUILD_DIR); ./bootstrap.sh ) $(call Build/Configure/Default,,,) diff --git a/net/asterisk-addons-1.4.x/patches/030-mysql_include.patch b/net/asterisk-addons-1.4.x/patches/030-mysql_include.patch new file mode 100644 index 0000000000..2782d04cb5 --- /dev/null +++ b/net/asterisk-addons-1.4.x/patches/030-mysql_include.patch @@ -0,0 +1,16 @@ +--- asterisk-addons-1.4.8/configure.ac.org 2011-02-16 15:32:41.000000000 +0100 ++++ asterisk-addons-1.4.8/configure.ac 2011-02-16 15:36:05.000000000 +0100 +@@ -191,11 +191,13 @@ + fi + if test x"${MYSQL_CONFIG}" != xNo; then + MYSQLCLIENT_libs=`mysql_config --libs` ++ MYSQLCLIENT_include=`mysql_config --include` + + AC_CHECK_LIB([mysqlclient], [mysql_init], [], [], ${MYSQLCLIENT_libs}) + + if test "${ac_cv_lib_mysqlclient_mysql_init}" = "yes"; then + MYSQLCLIENT_LIB="${MYSQLCLIENT_libs}" ++ MYSQLCLIENT_INCLUDE="${MYSQLCLIENT_include}/.." + PBX_MYSQLCLIENT=1 + elif test ! -z "${MYSQLCLIENT_MANDATORY}"; + then -- 2.30.2