[packages] freeswitch: do not even try to autoreconf this junkpile
[openwrt/svn-archive/archive.git] / net / freeswitch / Makefile
index 13a0d6d043c7363b78ffe13e2169e68370c69a30..a68685cb4cdddcd2771674a61c980a927920b02a 100644 (file)
@@ -9,14 +9,14 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=freeswitch
 PKG_VERSION:=1.0.6
-PKG_RELEASE:=7
+PKG_RELEASE:=11
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
 PKG_SOURCE_URL:=http://files.freeswitch.org/
 PKG_MD5SUM:=388effee587887a81fe7f411b7350590
 
-PKG_FIXUP:=libtool
+PKG_FIXUP:=libtool no-autoreconf
 
 FS_MOD_AVAILABLE:= \
        alsa \
@@ -130,7 +130,7 @@ define Package/freeswitch/Default
   SECTION:=net
   CATEGORY:=Network
   URL:=http://www.freeswitch.org/
-  MAINTAINER:=Daniel Dickinson <ddickinson@vertical.com>
+  MAINTAINER:=Daniel Dickinson <openwrt@cshore.neomailbox.net>
 endef
 
 
@@ -180,14 +180,13 @@ endef
 define Package/freeswitch-config-minimal/description
   A minimal configuration of FreeSWITCH for OpenWRT devices.  Is what the UCI 
   configuration began with.
-  
 endef
 
 define Package/freeswitch-collection-upstream-defaults
 $(call Package/freeswitch/Default)
   TITLE:=FreeSWITCH upstream default (sample) config
   DEPENDS:= freeswitch \
-               +freeswitch-config-upstream-defaults \
+               +freeswitch-config-upstream-defaults \
                +freeswitch-mod-commands \
                +freeswitch-mod-conference \
                +freeswitch-mod-syslog \
@@ -216,7 +215,7 @@ define Package/freeswitch-collection-minimal
 $(call Package/freeswitch/Default)
   TITLE:=A FreeSWITCH minimal package collection
   DEPENDS:= freeswitch \
-               +freeswitch-config-minimal \
+               +freeswitch-config-minimal \
                +freeswitch-mod-commands \
                +freeswitch-mod-syslog \
                +freeswitch-mod-dialplan-xml \
@@ -304,7 +303,7 @@ FS_TARGET_CXXFLAGS:= ${TARGET_CXXFLAGS} -DLUA_USE_LINUX $(FPIC) -Wno-format
 FS_TARGET_CPPFLAGS:= -I. -I./lua ${TARGET_CPPFLAGS}
 
 CONFIGURE_ARGS+= \
-       --prefix="/usr/freeswitch" \
+       --prefix="/usr/share/freeswitch" \
        --bindir="/usr/bin" \
        --libdir="/usr/lib" \
        --sysconfdir="/etc/freeswitch" \
@@ -385,7 +384,7 @@ endef
 
 define Build/InstallDev
        $(INSTALL_DIR) $(1)/usr/include/freeswitch
-       $(CP) $(PKG_INSTALL_DIR)/usr/freeswitch/include/* $(1)/usr/include/freeswitch/
+       $(CP) $(PKG_INSTALL_DIR)/usr/share/freeswitch/include/* $(1)/usr/include/freeswitch/
        $(INSTALL_DIR) $(1)/usr/lib
        $(CP) $(PKG_INSTALL_DIR)/usr/lib/libfreeswitch.{a,so*} $(1)/usr/lib/
 endef
@@ -434,13 +433,13 @@ define Package/freeswitch-config-minimal/install
 endef
 
 define Package/freeswitch-sounds-en/install
-       $(INSTALL_DIR) $(1)/usr/freeswitch/sounds
-       $(CP) $(PKG_INSTALL_DIR)/usr/freeswitch/sounds/en $(1)/usr/freeswitch/sounds/
+       $(INSTALL_DIR) $(1)/usr/share/freeswitch/sounds
+       $(CP) $(PKG_INSTALL_DIR)/usr/share/freeswitch/sounds/en $(1)/usr/share/freeswitch/sounds/
 endef
 
 define Package/freeswitch-sounds-moh/install
-       $(INSTALL_DIR) $(1)/usr/freeswitch/sounds
-       $(CP) $(PKG_INSTALL_DIR)/usr/freeswitch/sounds/music $(1)/usr/freeswitch/sounds/
+       $(INSTALL_DIR) $(1)/usr/share/freeswitch/sounds
+       $(CP) $(PKG_INSTALL_DIR)/usr/share/freeswitch/sounds/music $(1)/usr/share/freeswitch/sounds/
 endef
 
 define Package/freeswitch-tools/install
@@ -467,6 +466,22 @@ define BuildPlugin
                        $(PKG_INSTALL_DIR)/usr/lib/freeswitch/$$$$$$$${f}.so \
                        $$(1)/usr/lib/freeswitch/ ; \
        done
+       if [ -d "./files/etc.packages/$(1)" ]; then \
+               $(INSTALL_DIR) $$(1)/etc/freeswitch ; \
+               $(CP) \
+                       ./files/etc.packages/$(1)/* \
+                       $$(1)/etc/freeswitch/ ; \
+        fi
+  endef
+
+  define Package/freeswitch-mod-$(1)/postinst
+#!/bin/sh
+sed -i -e 's|^\([ \t]*\)<!-- *\(.*\)"mod_$(subst -,_,$(1))"\(.*\) *-->\(.*\)$$$$|\1\2"mod_$(subst -,_,$(1))"\3\4|' $$$${IPKG_INSTROOT}/etc/freeswitch/autoload_configs/modules.conf.xml
+  endef
+
+  define Package/freeswitch-mod-$(1)/postrm
+#!/bin/sh
+sed -i -e 's|^\([ \t]*\)\(.*\)"mod_$(subst -,_,$(1))"\(.*\)$$$$|\1<!-- \2"mod_$(subst -,_,$(1))"\3 -->|' $$$${IPKG_INSTROOT}/etc/freeswitch/autoload_configs/modules.conf.xml
   endef
 
   $$(eval $$(call BuildPackage,freeswitch-mod-$(1)))