[package] asterisk-1.8.x: add ODBC module
authorFlorian Fainelli <florian@openwrt.org>
Tue, 16 Oct 2012 15:55:44 +0000 (15:55 +0000)
committerFlorian Fainelli <florian@openwrt.org>
Tue, 16 Oct 2012 15:55:44 +0000 (15:55 +0000)
this patch includes ODBC support for Asterisk18 package.

Signed-off-by: Jiri Slachta <slachta@cesnet.cz>
SVN-Revision: 33793

net/asterisk-1.8.x/Makefile

index 6c769cc9ea72df31306fe2c37d85db56575ccc7b..8cb5ad0d8e65d8f8e9a8cc4daf92431ac9685789 100644 (file)
@@ -234,6 +234,17 @@ $(call Package/asterisk18/Default/description)
  This package provides the channel chan_lantiq support to Asterisk.
 endef
 
+define Package/asterisk18-odbc
+$(call Package/asterisk18/Default)
+  TITLE:=ODBC support
+  DEPENDS:= asterisk18 +libpthread +libc +unixodbc
+endef
+
+define Package/asterisk18-odbc/description
+$(call Package/asterisk18/Default/description)
+ This package provides ODBC support for Asterisk.
+endef
+
 ifneq ($(SDK)$(CONFIG_PACKAGE_asterisk18-app-meetme),)
   CONFIGURE_ARGS+= \
        --with-dahdi="$(STAGING_DIR)/usr"
@@ -308,7 +319,6 @@ CONFIGURE_ARGS+= \
        --with-ncurses="$(STAGING_DIR)/usr" \
        --without-netsnmp \
        --without-newt \
-       --without-odbc \
        --without-ogg \
        --without-osptk \
        --with-popt="$(STAGING_DIR)/usr" \
@@ -594,6 +604,13 @@ define Package/asterisk18-res-srtp/install
        $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/res_srtp.so $(1)/usr/lib/asterisk/modules/
 endef
 
+define Package/asterisk18-odbc/install
+       $(INSTALL_DIR) $(1)/etc/asterisk
+       $(CP) $(PKG_INSTALL_DIR)/etc/asterisk/*odbc*.conf $(1)/etc/asterisk/
+       $(INSTALL_DIR) $(1)/usr/lib/asterisk/modules
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/*odbc*.so $(1)/usr/lib/asterisk/modules/
+endef
+
 define Buildasterisk18ModuleTemplate
 
   define Package/asterisk18-$(subst _,-,$(1))
@@ -624,6 +641,7 @@ $(eval $(call BuildPackage,asterisk18-cdr))
 $(eval $(call BuildPackage,asterisk18-res-musiconhold))
 $(eval $(call BuildPackage,asterisk18-chan-gtalk))
 $(eval $(call BuildPackage,asterisk18-chan-mobile))
+$(eval $(call BuildPackage,asterisk18-odbc))
 $(eval $(call BuildPackage,asterisk18-res-fax))
 $(eval $(call BuildPackage,asterisk18-res-fax-spandsp))
 $(eval $(call BuildPackage,asterisk18-res-timing-timerfd))