summaryrefslogtreecommitdiff
path: root/package/audio/asterisk
diff options
context:
space:
mode:
authorDaniel Laird <danieljlaird@hotmail.com>2008-09-05 12:06:50 +0000
committerDaniel Laird <danieljlaird@hotmail.com>2008-09-05 12:06:50 +0000
commit76235a15b37bae9e3c83bc20e9afd49a66e33455 (patch)
tree82f014617a2c1149231675eddd72714d6f7bd659 /package/audio/asterisk
parent03e3886c012c889611b77df85c5491989c4ebc31 (diff)
audio: Move all audio packages into audio subdir
Moved all audio packages into a subdir called audio. I then created a Config.in and made sure that a audio.mk existed. Daniel Laird
Diffstat (limited to 'package/audio/asterisk')
-rw-r--r--package/audio/asterisk/Config.in12
-rw-r--r--package/audio/asterisk/asterisk.mk89
-rw-r--r--package/audio/asterisk/asterisk_no_res_ninit.patch12
3 files changed, 113 insertions, 0 deletions
diff --git a/package/audio/asterisk/Config.in b/package/audio/asterisk/Config.in
new file mode 100644
index 000000000..e20eb5ac2
--- /dev/null
+++ b/package/audio/asterisk/Config.in
@@ -0,0 +1,12 @@
+config BR2_PACKAGE_ASTERISK
+ bool "asterisk"
+ select BR2_PACKAGE_NCURSES
+ select BR2_PACKAGE_ZLIB
+ depends on BR2_PACKAGE_OPENSSL
+ depends on BR2_PACKAGE_MPG123
+ help
+ Asterisk - the Open Source PBX
+
+comment "asterisk - disabled (required openssl and mpg123)"
+ depends on !BR2_PACKAGE_OPENSSL || ! BR2_PACKAGE_MPG123
+
diff --git a/package/audio/asterisk/asterisk.mk b/package/audio/asterisk/asterisk.mk
new file mode 100644
index 000000000..da065dccf
--- /dev/null
+++ b/package/audio/asterisk/asterisk.mk
@@ -0,0 +1,89 @@
+#############################################################
+#
+# asterisk
+#
+##############################################################
+ASTERISK_VERSION:=1.6.0-beta6
+ASTERISK_SOURCE:=asterisk-$(ASTERISK_VERSION).tar.gz
+ASTERISK_SITE:=http://downloads.digium.com/pub/asterisk/old-releases
+ASTERISK_DIR:=$(BUILD_DIR)/asterisk-$(ASTERISK_VERSION)
+ASTERISK_BINARY:=asterisk
+ASTERISK_TARGET_BINARY:=usr/sbin/asterisk
+
+$(DL_DIR)/$(ASTERISK_SOURCE):
+ $(WGET) -P $(DL_DIR) $(ASTERISK_SITE)/$(ASTERISK_SOURCE)
+
+$(ASTERISK_DIR)/.source: $(DL_DIR)/$(ASTERISK_SOURCE)
+ $(ZCAT) $(DL_DIR)/$(ASTERISK_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
+ toolchain/patch-kernel.sh $(ASTERISK_DIR) package/asterisk/ asterisk\*.patch
+ touch $@
+
+$(ASTERISK_DIR)/.configured: $(ASTERISK_DIR)/.source
+ touch $@
+
+$(ASTERISK_DIR)/$(ASTERISK_BINARY): $(ASTERISK_DIR)/.configured
+ $(MAKE1) -C $(ASTERISK_DIR) \
+ CROSS_ARCH=Linux \
+ CROSS_COMPILE=$(TARGET_CROSS) \
+ CROSS_COMPILE_BIN=$(STAGING_DIR)/bin/ \
+ CROSS_COMPILE_TARGET=$(STAGING_DIR) \
+ CROSS_PROC=$(OPTIMIZE_FOR_CPU) \
+ OPTIMIZE="$(TARGET_OPTIMIZATION)" \
+ OPTIONS=-DLOW_MEMORY \
+ DEBUG= \
+ $(TARGET_CONFIGURE_OPTS)
+
+$(TARGET_DIR)/$(ASTERISK_TARGET_BINARY): $(ASTERISK_DIR)/$(ASTERISK_BINARY)
+ $(MAKE) -C $(ASTERISK_DIR) \
+ CROSS_ARCH=Linux \
+ CROSS_COMPILE=$(TARGET_CROSS) \
+ CROSS_COMPILE_BIN=$(TARGET_CC) \
+ CROSS_COMPILE_TARGET=$(STAGING_DIR) \
+ CROSS_PROC=$(OPTIMIZE_FOR_CPU) \
+ OPTIMIZE="$(TARGET_OPTIMIZATION)" \
+ OPTIONS=-DLOW_MEMORY \
+ DEBUG= \
+ $(TARGET_CONFIGURE_OPTS) \
+ DESTDIR=$(TARGET_DIR) install
+ $(STRIPCMD) $(TARGET_DIR)/usr/sbin/asterisk
+ $(STRIPCMD) $(TARGET_DIR)/usr/sbin/stereorize
+ $(STRIPCMD) $(TARGET_DIR)/usr/sbin/streamplayer
+ $(STRIPCMD) $(STRIP_STRIP_UNNEEDED) \
+ $(TARGET_DIR)/usr/lib/asterisk/modules/*.so
+ $(INSTALL) -m 755 $(ASTERISK_DIR)/contrib/init.d/rc.debian.asterisk \
+ $(TARGET_DIR)/etc/init.d/S60asterisk
+ mv $(TARGET_DIR)/usr/include/asterisk $(STAGING_DIR)/usr/include/
+ifneq ($(BR2_HAVE_MANPAGES),y)
+ rm -Rf $(TARGET_DIR)/usr/share/man
+endif
+ rm -f $(TARGET_DIR)/usr/sbin/safe_asterisk
+ rm -f $(TARGET_DIR)/usr/sbin/autosupport
+ rm -f $(TARGET_DIR)/usr/sbin/astgenkey
+ touch -c $@
+
+asterisk: uclibc ncurses zlib openssl mpg123 $(TARGET_DIR)/$(ASTERISK_TARGET_BINARY)
+
+asterisk-source: $(DL_DIR)/$(ASTERISK_SOURCE)
+
+asterisk-clean:
+ rm -Rf $(STAGING_DIR)/usr/include/asterisk
+ rm -Rf $(TARGET_DIR)/etc/asterisk
+ rm -Rf $(TARGET_DIR)/usr/lib/asterisk
+ rm -Rf $(TARGET_DIR)/var/lib/asterisk
+ rm -Rf $(TARGET_DIR)/var/spool/asterisk
+ rm -f $(TARGET_DIR)/etc/init.d/S60asterisk
+ rm -f $(TARGET_DIR)/usr/sbin/stereorize
+ rm -f $(TARGET_DIR)/usr/sbin/streamplayer
+ -$(MAKE) -C $(ASTERISK_DIR) clean
+
+asterisk-dirclean:
+ rm -rf $(ASTERISK_DIR)
+
+#############################################################
+#
+# Toplevel Makefile options
+#
+#############################################################
+ifeq ($(strip $(BR2_PACKAGE_ASTERISK)),y)
+TARGETS+=asterisk
+endif
diff --git a/package/audio/asterisk/asterisk_no_res_ninit.patch b/package/audio/asterisk/asterisk_no_res_ninit.patch
new file mode 100644
index 000000000..1dff2f305
--- /dev/null
+++ b/package/audio/asterisk/asterisk_no_res_ninit.patch
@@ -0,0 +1,12 @@
+diff -ur /tmp/asterisk-1.2.0-beta1/dns.c asterisk-1.2.0-beta1/dns.c
+--- /tmp/asterisk-1.2.0-beta1/dns.c 2005-08-14 04:23:33.000000000 +0200
++++ asterisk-1.2.0-beta1/dns.c 2005-08-31 09:42:36.000000000 +0200
+@@ -157,7 +157,7 @@
+ return 0;
+ }
+
+-#if defined(res_ninit)
++#if (defined(res_ninit) && !defined(__UCLIBC__))
+ #define HAS_RES_NINIT
+ #else
+ AST_MUTEX_DEFINE_STATIC(res_lock);