remove lots of non-essential packages

git-svn-id: svn://svn.openwrt.org/openwrt/branches/buildroot-ng/openwrt@3641 3c298f89-4303-0410-b956-a3cf2f4a3e73
master
Felix Fietkau 2006-04-13 22:20:15 +00:00
parent 7797df7609
commit 8675818f87
1593 changed files with 0 additions and 167325 deletions

View File

@ -1,12 +0,0 @@
config BR2_PACKAGE_6TUNNEL
prompt "6tunnel........................... IPv4 / IPv6 tunnel proxy"
tristate
default m if CONFIG_DEVEL
select BR2_PACKAGE_KMOD_IPV6
help
6tunnel allows you to use services provided by IPv6 hosts with IPv4-only
applications and vice-versa. It can bind to any of your IPv4 (default)
or IPv6 addresses and forward all data to IPv4 or IPv6 (default) host.
http://toxygen.net/6tunnel/

View File

@ -1,60 +0,0 @@
# $Id$
include $(TOPDIR)/rules.mk
PKG_NAME:=6tunnel
PKG_VERSION:=0.11rc1
PKG_RELEASE:=1
PKG_MD5SUM:=b325fa9d238e32195fbb3fc3646b0d28
PKG_SOURCE_URL:=http://toxygen.net/6tunnel/
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_CAT:=zcat
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-0.11
PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
include $(TOPDIR)/package/rules.mk
$(eval $(call PKG_template,6TUNNEL,6tunnel,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
$(PKG_BUILD_DIR)/.configured:
(cd $(PKG_BUILD_DIR); rm -rf config.{cache,status}; \
$(TARGET_CONFIGURE_OPTS) \
CFLAGS="$(TARGET_CFLAGS)" \
ac_cv_path_STRIP=$(STRIP) \
ac_cv_func_vsnprintf=yes \
./configure \
--target=$(GNU_TARGET_NAME) \
--host=$(GNU_TARGET_NAME) \
--build=$(GNU_HOST_NAME) \
--program-prefix="" \
--program-suffix="" \
--prefix=/usr \
--exec-prefix=/usr \
--bindir=/usr/sbin \
--datadir=/usr/share \
--includedir=/usr/include \
--infodir=/usr/share/info \
--libdir=/usr/lib \
--libexecdir=/usr/lib \
--localstatedir=/var \
--mandir=/usr/share/man \
--sbindir=/usr/sbin \
--sysconfdir=/etc \
$(DISABLE_LARGEFILE) \
$(DISABLE_NLS) \
);
touch $@
$(PKG_BUILD_DIR)/.built:
$(MAKE) -C $(PKG_BUILD_DIR) \
default
touch $@
$(IPKG_6TUNNEL):
install -d -m0755 $(IDIR_6TUNNEL)/usr/sbin
$(CP) $(PKG_BUILD_DIR)/6tunnel $(IDIR_6TUNNEL)/usr/sbin/
$(RSTRIP) $(IDIR_6TUNNEL)/
$(IPKG_BUILD) $(IDIR_6TUNNEL) $(PACKAGE_DIR)

View File

@ -1,5 +0,0 @@
Package: 6tunnel
Priority: optional
Section: net
Depends:
Description: An IPv4/IPv6 tunnel proxy

View File

@ -1,11 +0,0 @@
config BR2_PACKAGE_AICCU
prompt "aiccu............................. SixXS Automatic IPv6 Connectivity Client Utility"
tristate
default m if CONFIG_DEVEL
select BR2_PACKAGE_KMOD_IPV6
select BR2_PACKAGE_LIBPTHREAD
help
SixXS Automatic IPv6 Connectivity Client Utility
For more information about SixXS check http://www.sixxs.net/

View File

@ -1,36 +0,0 @@
# $Id$
include $(TOPDIR)/rules.mk
PKG_NAME:=aiccu
PKG_VERSION:=2005.01.31
PKG_RELEASE:=1
PKG_MD5SUM:=7c3da5feab3d59fb5a99a45203e0ca56
PKG_SOURCE_URL:=http://www.sixxs.net/archive/sixxs/aiccu/unix
PKG_SOURCE:=$(PKG_NAME)_$(PKG_VERSION).tar.gz
PKG_CAT:=zcat
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)
include $(TOPDIR)/package/rules.mk
$(eval $(call PKG_template,AICCU,aiccu,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
$(PKG_BUILD_DIR)/.configured:
$(SED) "s,strip,$(STRIP)," $(PKG_BUILD_DIR)/unix-console/Makefile
touch $@
$(PKG_BUILD_DIR)/.built:
$(MAKE) -C $(PKG_BUILD_DIR) \
CC=$(TARGET_CC) CFLAGS="$(TARGET_CFLAGS) -D_GNU_SOURCE" DEBUG=0
touch $@
$(IPKG_AICCU):
mkdir -p $(IDIR_AICCU)/usr/sbin $(IDIR_AICCU)/etc/init.d
install -m 755 $(PKG_BUILD_DIR)/unix-console/$(PKG_NAME) $(IDIR_AICCU)/usr/sbin/
install -m 755 ./files/aiccu.init $(IDIR_AICCU)/etc/init.d/S51aiccu
install -m 644 $(PKG_BUILD_DIR)/doc/aiccu.conf $(IDIR_AICCU)/etc/aiccu.conf
$(STRIP) $(IDIR_AICCU)/usr/sbin/*
$(IPKG_BUILD) $(IDIR_AICCU) $(PACKAGE_DIR)

View File

@ -1,21 +0,0 @@
#!/bin/sh
case "$1" in
start)
aiccu start
;;
stop)
aiccu stop
aiccu stop
;;
restart)
$0 stop
$0 start
;;
*)
echo "Usage: $0 {start|stop|restart}"
exit 1
;;
esac

View File

@ -1 +0,0 @@
/etc/aiccu.conf

View File

@ -1,5 +0,0 @@
Package: aiccu
Priority: optional
Section: net
Depends: kmod-ipv6, ip, libpthread
Description: SixXS Automatic IPv6 Connectivity Client Utility

View File

@ -1,15 +0,0 @@
config BR2_PACKAGE_AIRCRACK
prompt "aircrack.......................... A set of tools for auditing wireless networks"
tristate
default m if CONFIG_DEVEL
select BR2_PACKAGE_LIBPTHREAD
help
aircrack is a set of tools for auditing wireless networks:
* aircrack: static WEP and WPA-PSK key cracker
* airdecap: decrypts WEP/WPA capture files
* aireplay: 802.11 packet injection program
* airodump: 802.11 packet capture program
http://www.cr0.net:8040/code/network/aircrack/

View File

@ -1,45 +0,0 @@
# $Id$
include $(TOPDIR)/rules.mk
PKG_NAME:=aircrack
PKG_VERSION:=2.41
PKG_RELEASE:=1
PKG_MD5SUM:=05a37c8a165efb11ea226829c809deb3
PKG_SOURCE_URL:=http://www.cr0.net:8040/code/network/
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tgz
PKG_CAT:=zcat
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
include $(TOPDIR)/package/rules.mk
$(eval $(call PKG_template,AIRCRACK,aircrack,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
$(PKG_BUILD_DIR)/.configured:
touch $@
$(PKG_BUILD_DIR)/.built:
rm -rf $(PKG_INSTALL_DIR)
mkdir -p $(PKG_INSTALL_DIR)
$(MAKE) -C $(PKG_BUILD_DIR) \
CC="$(TARGET_CC)" \
CFLAGS="$(TARGET_CFLAGS) -Wall" \
CROSS="$(TARGET_CROSS)" \
prefix="/usr" \
DESTDIR="$(PKG_INSTALL_DIR)" \
all install
touch $@
$(IPKG_AIRCRACK):
install -d -m0755 $(IDIR_AIRCRACK)/usr/bin
$(CP) $(PKG_INSTALL_DIR)/usr/bin/aircrack $(IDIR_AIRCRACK)/usr/bin/
$(CP) $(PKG_INSTALL_DIR)/usr/bin/airdecap $(IDIR_AIRCRACK)/usr/bin/
$(CP) $(PKG_INSTALL_DIR)/usr/bin/aireplay $(IDIR_AIRCRACK)/usr/bin/
$(CP) $(PKG_INSTALL_DIR)/usr/bin/airodump $(IDIR_AIRCRACK)/usr/bin/
$(CP) $(PKG_INSTALL_DIR)/usr/bin/arpforge $(IDIR_AIRCRACK)/usr/bin/
$(RSTRIP) $(IDIR_AIRCRACK)
$(IPKG_BUILD) $(IDIR_AIRCRACK) $(PACKAGE_DIR)

View File

@ -1,5 +0,0 @@
Package: aircrack
Priority: optional
Section: net
Depends: libpthread
Description: A set of tools for auditing wireless networks

View File

@ -1,10 +0,0 @@
config BR2_PACKAGE_AMWALL
prompt "amwall............................ PF to iptables"
tristate
default m if CONFIG_DEVEL
select BR2_PACKAGE_LIBAMSEL
help
PF for iptables
http://amselinux.de/

View File

@ -1,48 +0,0 @@
# $Id$
include $(TOPDIR)/rules.mk
PKG_NAME:=amwall
PKG_VERSION:=0.1.0
PKG_RELEASE:=1
PKG_MD5SUM:=a8b6438e7fd9ccadc9f68824ae62349c
PKG_SOURCE_URL:=ftp://ftp.amselinux.net/source/
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
PKG_CAT:=bzcat
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
include $(TOPDIR)/package/rules.mk
$(eval $(call PKG_template,AMWALL,amwall,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
$(PKG_BUILD_DIR)/.configured:
touch $@
$(PKG_BUILD_DIR)/.built:
rm -rf $(PKG_INSTALL_DIR)
mkdir -p $(PKG_INSTALL_DIR)
$(MAKE) -C $(PKG_BUILD_DIR) \
$(TARGET_CONFIGURE_OPTS) \
V= \
LDIR=$(PKG_BUILD_DIR) \
AMSEL_INCLUDE="$(STAGING_DIR)/usr/include" \
OPT_LDFLAGS="-L$(STAGING_DIR)/usr/lib" \
PREFIX="/usr" \
CONFIG="$(PKG_BUILD_DIR)/etc/amsel" \
DESTDIR=$(PKG_INSTALL_DIR) \
all install
touch $@
$(IPKG_AMWALL):
install -d -m0755 $(IDIR_AMWALL)/usr/bin
$(CP) $(PKG_INSTALL_DIR)/usr/bin/* $(IDIR_AMWALL)/usr/bin
install -d -m0755 $(IDIR_AMWALL)/usr/sbin
$(CP) $(PKG_INSTALL_DIR)/usr/sbin/* $(IDIR_AMWALL)/usr/sbin
install -d -m0755 $(IDIR_AMWALL)/etc/amsel
$(CP) $(PKG_INSTALL_DIR)/etc/amsel* $(IDIR_AMWALL)/etc
$(RSTRIP) $(IDIR_AMWALL)
$(IPKG_BUILD) $(IDIR_AMWALL) $(PACKAGE_DIR)

View File

@ -1,5 +0,0 @@
Package: amwall
Priority: optional
Section: net
Depends: libamsel
Description: pf to iptables and more

View File

@ -1,11 +0,0 @@
config BR2_PACKAGE_ARPD
prompt "arpd.............................. A daemon to fake ARP replies"
tristate
default m if CONFIG_DEVEL
select BR2_PACKAGE_LIBPCAP
select BR2_PACKAGE_LIBDNET
select BR2_PACKAGE_LIBEVENT
help
Generates ARP responses for (locally unused) IP addresses
http://www.honeyd.org/tools.php

View File

@ -1,64 +0,0 @@
# $Id$
include $(TOPDIR)/rules.mk
PKG_NAME:=arpd
PKG_VERSION:=0.2
PKG_RELEASE:=1
PKG_MD5SUM:=e2911fa9de1b92ef50deda1489ae944d
PKG_SOURCE_URL:=http://niels.xtdnet.nl/honeyd
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_CAT:=zcat
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)
include $(TOPDIR)/package/rules.mk
$(eval $(call PKG_template,ARPD,arpd,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
$(PKG_BUILD_DIR)/.configured:
(cd $(PKG_BUILD_DIR); rm -rf config.cache; \
$(TARGET_CONFIGURE_OPTS) \
CFLAGS="$(TARGET_CFLAGS)" \
CPPFLAGS="-I$(STAGING_DIR)/usr/include" \
LDFLAGS="-L$(STAGING_DIR)/usr/lib" \
./configure \
--target=$(GNU_TARGET_NAME) \
--host=$(GNU_TARGET_NAME) \
--build=$(GNU_HOST_NAME) \
--program-prefix="" \
--program-suffix="" \
--prefix=/usr \
--exec-prefix=/usr \
--bindir=/usr/bin \
--datadir=/usr/share \
--includedir=/usr/include \
--infodir=/usr/share/info \
--libdir=/usr/lib \
--libexecdir=/usr/lib \
--localstatedir=/var \
--mandir=/usr/share/man \
--sbindir=/usr/sbin \
--sysconfdir=/etc \
$(DISABLE_NLS) \
$(DISABLE_LARGEFILE) \
--enable-shared \
--disable-static \
--with-libdnet=$(STAGING_DIR)/usr \
--with-libevent=$(STAGING_DIR)/usr \
--with-libpcap=$(STAGING_DIR)/usr \
);
touch $@
$(PKG_BUILD_DIR)/.built:
$(MAKE) -C $(PKG_BUILD_DIR) \
CCOPT="$(TARGET_CFLAGS)" \
INCLS="-I. -I$(STAGING_DIR)/usr/include" \
LIBS="-L$(STAGING_DIR)/usr/lib -lpcap -ldnet -levent"
touch $@
$(IPKG_ARPD):
mkdir -p $(IDIR_ARPD)/usr/sbin
$(CP) $(PKG_BUILD_DIR)/arpd $(IDIR_ARPD)/usr/sbin/
$(STRIP) $(IDIR_ARPD)/usr/sbin/*
$(IPKG_BUILD) $(IDIR_ARPD) $(PACKAGE_DIR)

View File

@ -1,5 +0,0 @@
Package: arpd
Priority: optional
Section: net
Description: Generates ARP responses for IP address ranges
Depends: libpcap, libdnet, libevent

View File

@ -1,12 +0,0 @@
--- arpd/configure.orig Sun Feb 9 19:31:28 2003
+++ arpd/configure Thu Jul 21 16:05:16 2005
@@ -2258,8 +2258,7 @@
if cd $withval; then withval=`pwd`; cd $owd; fi
PCAPINC="-I$withval -I$withval/bpf"
PCAPLIB="-L$withval -lpcap"
- elif test -f $withval/include/pcap.h -a \
- -f $withval/include/net/bpf.h; then
+ elif test -f $withval/include/pcap.h; then
owd=`pwd`
if cd $withval; then withval=`pwd`; cd $owd; fi
PCAPINC="-I$withval/include"

View File

@ -1,42 +0,0 @@
--- arpd/arpd.c.orig Sun Feb 9 05:20:40 2003
+++ arpd/arpd.c Thu Jul 21 17:05:40 2005
@@ -265,7 +265,7 @@
spa->addr_ip, tha->addr_eth, tpa->addr_ip);
if (op == ARP_OP_REQUEST) {
- syslog(LOG_DEBUG, __FUNCTION__ ": who-has %s tell %s",
+ syslog(LOG_DEBUG, "%s: who-has %s tell %s", __FUNCTION__,
addr_ntoa(tpa), addr_ntoa(spa));
} else if (op == ARP_OP_REPLY) {
syslog(LOG_INFO, "arp reply %s is-at %s",
@@ -282,7 +282,7 @@
int error;
if (addr_cmp(addr, &arpd_ifent.intf_addr) == 0) {
- syslog(LOG_DEBUG, __FUNCTION__ ": %s at %s",
+ syslog(LOG_DEBUG, "%s: %s at %s", __FUNCTION__,
addr_ntoa(addr), addr_ntoa(&arpd_ifent.intf_link_addr));
return (0);
}
@@ -291,10 +291,10 @@
error = arp_get(arpd_arp, &arpent);
if (error == -1) {
- syslog(LOG_DEBUG, __FUNCTION__ ": no entry for %s",
+ syslog(LOG_DEBUG, "%s: no entry for %s", __FUNCTION__,
addr_ntoa(addr));
} else {
- syslog(LOG_DEBUG, __FUNCTION__ ": %s at %s",
+ syslog(LOG_DEBUG, "%s: %s at %s", __FUNCTION__,
addr_ntoa(addr), addr_ntoa(&arpent.arp_ha));
}
return (error);
@@ -423,7 +423,7 @@
if ((req = SPLAY_FIND(tree, &arpd_reqs, &tmp)) != NULL) {
addr_pack(&src.arp_ha, ADDR_TYPE_ETH, ETH_ADDR_BITS,
ethip->ar_sha, ETH_ADDR_LEN);
- syslog(LOG_DEBUG, __FUNCTION__ ": %s at %s",
+ syslog(LOG_DEBUG, "%s: %s at %s", __FUNCTION__,
addr_ntoa(&req->pa), addr_ntoa(&src.arp_ha));
/* This address is claimed */

View File

@ -1,75 +0,0 @@
--- arpd/arpd.c Sun Feb 9 05:20:40 2003
+++ arpd/arpd.c.new Mon Aug 1 00:50:40 2005
@@ -70,7 +70,7 @@
static void
usage(void)
{
- fprintf(stderr, "Usage: arpd [-d] [-i interface] [net]\n");
+ fprintf(stderr, "Usage: arpd [-d] [-i interface] [-a 'pcap_expr'] [{host|net|range} ...]\n");
exit(1);
}
@@ -182,7 +182,7 @@
}
static void
-arpd_init(char *dev, int naddresses, char **addresses)
+arpd_init(char *dev, char *and_pcap_exp, int naddresses, char **addresses)
{
struct bpf_program fcode;
char filter[1024], ebuf[PCAP_ERRBUF_SIZE], *dst;
@@ -214,9 +214,13 @@
errx(1, "bad interface configuration: not IP or Ethernet");
arpd_ifent.intf_addr.addr_bits = IP_ADDR_BITS;
- snprintf(filter, sizeof(filter), "arp %s%s%s and not ether src %s",
+ snprintf(filter, sizeof(filter), "arp %s%s%s and not ether src %s%s%s%s",
dst ? "and (" : "", dst ? dst : "", dst ? ")" : "",
- addr_ntoa(&arpd_ifent.intf_link_addr));
+ addr_ntoa(&arpd_ifent.intf_link_addr),
+ and_pcap_exp ? " and (" : "",
+ and_pcap_exp ? and_pcap_exp : "",
+ and_pcap_exp ? ")" : ""
+ );
if ((arpd_pcap = pcap_open_live(dev, 128, 0, 500, ebuf)) == NULL)
errx(1, "pcap_open_live: %s", ebuf);
@@ -465,14 +469,14 @@
{
struct event recv_ev;
extern int (*event_sigcb)(void);
- char *dev;
+ char *dev, *and_pcap_exp;
int c, debug;
FILE *fp;
dev = NULL;
debug = 0;
- while ((c = getopt(argc, argv, "di:h?")) != -1) {
+ while ((c = getopt(argc, argv, "a:di:h?")) != -1) {
switch (c) {
case 'd':
debug = 1;
@@ -480,6 +484,9 @@
case 'i':
dev = optarg;
break;
+ case 'a':
+ and_pcap_exp = optarg;
+ break;
default:
usage();
break;
@@ -489,9 +496,9 @@
argv += optind;
if (argc == 0)
- arpd_init(dev, 0, NULL);
+ arpd_init(dev, and_pcap_exp, 0, NULL);
else
- arpd_init(dev, argc, argv);
+ arpd_init(dev, and_pcap_exp, argc, argv);
if ((fp = fopen(PIDFILE, "w")) == NULL)
err(1, "fopen");

View File

@ -1,9 +0,0 @@
config BR2_PACKAGE_ARPTABLES
prompt "arptables......................... ARP firewall administration utility"
tristate
default m if CONFIG_DEVEL
help
ARP Firewalling (arptables)
http://ebtables.sourceforge.net/

View File

@ -1,32 +0,0 @@
# $Id$
include $(TOPDIR)/rules.mk
PKG_NAME:=arptables
PKG_VERSION:=0.0.3
PKG_RELEASE:=1
PKG_MD5SUM:=1672244603c8979577aa4738be35a759
PKG_SOURCE_URL:=@SF/ebtables
PKG_SOURCE:=$(PKG_NAME)-v$(PKG_VERSION).tar.gz
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-v$(PKG_VERSION)
PKG_CAT:=zcat
include $(TOPDIR)/package/rules.mk
$(eval $(call PKG_template,ARPTABLES,arptables,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
$(PKG_BUILD_DIR)/.configured:
touch $@
$(PKG_BUILD_DIR)/.built:
$(MAKE) -C $(PKG_BUILD_DIR) \
CC=$(TARGET_CC) LD=$(TARGET_CROSS)ld \
COPT_FLAGS="$(TARGET_CFLAGS)" \
KERNEL_DIR="./include/linux"
touch $@
$(IPKG_ARPTABLES):
install -d -m0755 $(IDIR_ARPTABLES)/usr/sbin
install -m0755 $(PKG_BUILD_DIR)/arptables $(IDIR_ARPTABLES)/usr/sbin/
$(RSTRIP) $(IDIR_ARPTABLES)
$(IPKG_BUILD) $(IDIR_ARPTABLES) $(PACKAGE_DIR)

View File

@ -1,4 +0,0 @@
Package: arptables
Priority: optional
Section: net
Description: ARP firewalling software

View File

@ -1,7 +0,0 @@
config BR2_PACKAGE_ARPWATCH
prompt "arpwatch.......................... Ethernet station activity monitor"
tristate
default m if CONFIG_DEVEL
help
Ethernet monitor program for keeping track of ethernet/ip address pairings

View File

@ -1,63 +0,0 @@
# $Id$
include $(TOPDIR)/rules.mk
PKG_NAME:=arpwatch
PKG_VERSION:=2.1a11
PKG_RELEASE:=1
PKG_MD5SUM:=9ecd00db892737431b0e524f3e52e19e
PKG_SOURCE_URL:=http://nbd.vd-s.ath.cx/openwrt
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_CAT:=zcat
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
include $(TOPDIR)/package/rules.mk
$(eval $(call PKG_template,ARPWATCH,arpwatch,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
$(PKG_BUILD_DIR)/.configured:
(cd $(PKG_BUILD_DIR); rm -rf config.cache; \
$(TARGET_CONFIGURE_OPTS) \
CFLAGS="$(TARGET_CFLAGS)" \
CPPFLAGS="-I$(STAGING_DIR)/usr/include" \
LDFLAGS="-L$(STAGING_DIR)/usr/lib" \
./configure \
--target=$(GNU_TARGET_NAME) \
--host=$(GNU_TARGET_NAME) \
--build=$(GNU_HOST_NAME) \
--program-prefix="" \
--program-suffix="" \
--prefix=/usr \
--exec-prefix=/usr \
--bindir=/usr/bin \
--datadir=/usr/share \
--includedir=/usr/include \
--infodir=/usr/share/info \
--libdir=/usr/lib \
--libexecdir=/usr/lib \
--localstatedir=/var \
--mandir=/usr/share/man \
--sbindir=/usr/sbin \
--sysconfdir=/etc \
$(DISABLE_NLS) \
$(DISABLE_LARGEFILE) \
);
touch $@
$(PKG_BUILD_DIR)/.built:
$(MAKE) -C $(PKG_BUILD_DIR) \
ARPDIR=/etc/arpwatch \
CCOPT="$(TARGET_CFLAGS)" \
INCLS="-I. -I$(STAGING_DIR)/usr/include" \
LIBS="-L$(STAGING_DIR)/usr/lib -lpcap"
touch $@
$(IPKG_ARPWATCH):
mkdir -p $(IDIR_ARPWATCH)/usr/sbin
$(CP) $(PKG_BUILD_DIR)/arpwatch $(IDIR_ARPWATCH)/usr/sbin/
$(CP) $(PKG_BUILD_DIR)/arpsnmp $(IDIR_ARPWATCH)/usr/sbin/
$(STRIP) $(IDIR_ARPWATCH)/usr/sbin/*
mkdir -p $(IDIR_ARPWATCH)/etc/arpwatch
$(CP) $(PKG_BUILD_DIR)/arp.dat $(IDIR_ARPWATCH)/etc/arpwatch/
$(IPKG_BUILD) $(IDIR_ARPWATCH) $(PACKAGE_DIR)

View File

@ -1 +0,0 @@
/etc/arpwatch/arp.dat

View File

@ -1,5 +0,0 @@
Package: arpwatch
Priority: optional
Section: net
Description: Ethernet monitor program for keeping track of ethernet/ip address pairings
Depends: libpcap

View File

@ -1,159 +0,0 @@
menu "asterisk.......................... Complete open source PBX"
config BR2_PACKAGE_ASTERISK
prompt "asterisk.......................... Complete open source PBX"
tristate
default m if CONFIG_DEVEL
help
Asterisk is a complete PBX in software. It provides all of the features
you would expect from a PBX and more. Asterisk does voice over IP in three
protocols, and can interoperate with almost all standards-based telephony
equipment using relatively inexpensive hardware.
http://www.asterisk.org/
config BR2_PACKAGE_ASTERISK_CHAN_BLUETOOTH
prompt "asterisk-chan-bluetooth......... Bluetooth HandsFreeProfile support for Asterisk"
tristate
default m if CONFIG_DEVEL
depends BR2_PACKAGE_ASTERISK
select BR2_PACKAGE_BLUEZ_LIBS
help
The Bluetooth HandsFreeProfile support for Asterisk
config BR2_PACKAGE_ASTERISK_CHAN_H323
prompt "asterisk-chan-h323.............. H.323 support for Asterisk"
tristate
default m if CONFIG_DEVEL
depends BR2_PACKAGE_ASTERISK
select BR2_PACKAGE_OPENH323
help
H.323 support for Asterisk
config BR2_PACKAGE_ASTERISK_CHAN_MGCP
prompt "asterisk-chan-mgcp.............. Media Gateway Control Protocol implementation"
tristate
default m if CONFIG_DEVEL
depends BR2_PACKAGE_ASTERISK
help
Media Gateway Control Protocol implementation for Asterisk
config BR2_PACKAGE_ASTERISK_CHAN_SKINNY
prompt "asterisk-chan-skinny............ Skinny Client Control Protocol implementation"
tristate
default m if CONFIG_DEVEL
depends BR2_PACKAGE_ASTERISK
help
Skinny Client Control Protocol implementation for Asterisk
config BR2_PACKAGE_ASTERISK_CODEC_ILBC
prompt "asterisk-codec-ilbc............. Internet Low Bitrate Codec (ILBC) Translator"
tristate
default m if CONFIG_DEVEL
depends BR2_PACKAGE_ASTERISK
help
The Internet Low Bitrate Codec (ILBC) Translator for Asterisk
config BR2_PACKAGE_ASTERISK_CODEC_LPC10
prompt "asterisk-codec-lpc10............ LPC10 (Linear Predictor Code) 2.4kbps Voice Coder"
tristate
default m if CONFIG_DEVEL
depends BR2_PACKAGE_ASTERISK
help
The LPC10 (Linear Predictor Code) 2.4kbps Voice Coder for Asterisk
config BR2_PACKAGE_ASTERISK_CODEC_SPEEX
prompt "asterisk-codec-speex............ Speex/PCM16 Codec Translator"
tristate
default m if CONFIG_DEVEL
depends BR2_PACKAGE_ASTERISK
select BR2_PACKAGE_LIBSPEEX
help
The Speex speech compression codec for Asterisk
config BR2_PACKAGE_ASTERISK_PBX_DUNDI
prompt "asterisk-pbx-dundi.............. Distributed Universal Number Discovery (DUNDi) support"
tristate
default m if CONFIG_DEVEL
depends BR2_PACKAGE_ASTERISK
help
Distributed Universal Number Discovery (DUNDi) support for Asterisk
config BR2_PACKAGE_ASTERISK_RES_AGI
prompt "asterisk-res-agi................ Asterisk Gateway Interface module"
tristate
default m if CONFIG_DEVEL
depends BR2_PACKAGE_ASTERISK
help
Asterisk Gateway Interface module
config BR2_PACKAGE_ASTERISK_MYSQL
prompt "asterisk-mysql.................. MySQL modules"
tristate
default m if CONFIG_DEVEL
depends BR2_PACKAGE_ASTERISK
select BR2_PACKAGE_LIBMYSQLCLIENT
help
MySQL modules for Asterisk
config BR2_PACKAGE_ASTERISK_PGSQL
prompt "asterisk-pgsql.................. PostgreSQL modules"
tristate
default m if CONFIG_DEVEL
depends BR2_PACKAGE_ASTERISK
select BR2_PACKAGE_LIBPQ
help
PostgreSQL modules for Asterisk
config BR2_PACKAGE_ASTERISK_SQLITE
prompt "asterisk-sqlite................. SQLite modules"
tristate
default m if CONFIG_DEVEL
depends BR2_PACKAGE_ASTERISK
select BR2_PACKAGE_LIBSQLITE
help
SQLite modules for Asterisk
config BR2_PACKAGE_ASTERISK_SOUNDS
prompt "asterisk-sounds................. Sound files"
tristate
default m if CONFIG_DEVEL
depends BR2_PACKAGE_ASTERISK
help
Sound files for Asterisk
config BR2_PACKAGE_ASTERISK_VOICEMAIL
prompt "asterisk-voicemail.............. Voicemail support"
tristate
default m if CONFIG_DEVEL
depends BR2_PACKAGE_ASTERISK
help
Voicemail related modules for Asterisk
config BR2_PACKAGE_ASTERISK_MINI
prompt "asterisk-mini..................... Minimal open source PBX"
tristate
default m if CONFIG_DEVEL
help
Asterisk is a complete PBX in software. It provides all of the features
you would expect from a PBX and more. Asterisk does voice over IP in three
protocols, and can interoperate with almost all standards-based telephony
equipment using relatively inexpensive hardware.
http://www.asterisk.org/
This package contains only the following modules:
- 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
endmenu

View File

@ -1,281 +0,0 @@
# $Id$
include $(TOPDIR)/rules.mk
PKG_NAME:=asterisk
PKG_VERSION:=1.2.1
PKG_RELEASE:=1
PKG_MD5SUM:=04657086791e80f319c0d728af705001
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
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
include $(TOPDIR)/package/rules.mk
$(eval $(call PKG_template,ASTERISK,asterisk,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
$(eval $(call PKG_template,ASTERISK_MINI,asterisk-mini,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
$(eval $(call PKG_template,ASTERISK_MYSQL,asterisk-mysql,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
$(eval $(call PKG_template,ASTERISK_PGSQL,asterisk-pgsql,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
$(eval $(call PKG_template,ASTERISK_SQLITE,asterisk-sqlite,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
$(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)))
$(eval $(call PKG_template,ASTERISK_CODEC_LPC10,asterisk-codec-lpc10,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
$(eval $(call PKG_template,ASTERISK_CODEC_SPEEX,asterisk-codec-speex,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
$(eval $(call PKG_template,ASTERISK_PBX_DUNDI,asterisk-pbx-dundi,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
$(eval $(call PKG_template,ASTERISK_RES_AGI,asterisk-res-agi,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
EXTRA_CFLAGS := -I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include
EXTRA_LDFLAGS := -L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib
ifneq ($(BR2_PACKAGE_ASTERISK_MYSQL),)
EXTRA_CFLAGS += -I$(STAGING_DIR)/usr/include/mysql
EXTRA_LDFLAGS += -L$(STAGING_DIR)/usr/lib/mysql
EXTRA_APP_MODULES += app_sql_mysql.so
EXTRA_CDR_MODULES += cdr_mysql.so
EXTRA_RES_MODULES += res_config_mysql.so
endif
ifneq ($(BR2_PACKAGE_ASTERISK_PGSQL),)
EXTRA_APP_MODULES += app_sql_postgres.so
EXTRA_CDR_MODULES += cdr_pgsql.so
endif
ifneq ($(BR2_PACKAGE_ASTERISK_SQLITE),)
EXTRA_CDR_MODULES += cdr_sqlite.so
endif
ifneq ($(BR2_PACKAGE_ASTERISK_CODEC_SPEEX),)
EXTRA_CFLAGS += -I$(STAGING_DIR)/usr/include/speex
EXTRA_CODEC_MODULES += codec_speex.so
endif
$(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)" \
CROSS_COMPILE_BIN="/void/" \
CROSS_COMPILE_TARGET="/void/" \
$(TARGET_CONFIGURE_OPTS) \
HOST_CC="$(HOSTCC)" \
OPTIMIZE="$(TARGET_CFLAGS)" \
PROC="$(ARCH)" \
DEBUG="" \
OPTIONS="-DLOW_MEMORY -Dlinux" \
NOCRYPTO="yes" \
EXTRA_CFLAGS="$(EXTRA_CFLAGS)" \
EXTRA_LDFLAGS="$(EXTRA_LDFLAGS)" \
EXTRA_APP_MODULES="$(EXTRA_APP_MODULES)" \
EXTRA_CDR_MODULES="$(EXTRA_CDR_MODULES)" \
EXTRA_CODEC_MODULES="$(EXTRA_CODEC_MODULES)" \
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) $(PKG_INSTALL_DIR)/* $(IDIR_ASTERISK)
rm -rf $(IDIR_ASTERISK)/usr/sbin/astgenkey
rm -rf $(IDIR_ASTERISK)/usr/bin
rm -rf $(IDIR_ASTERISK)/usr/share
rm -rf $(IDIR_ASTERISK)/usr/include
rm -rf $(IDIR_ASTERISK)/var
(cd $(IDIR_ASTERISK)/usr/lib/asterisk; \
rm -rf agi-bin; \
rm -rf images; \
rm -rf keys/*; \
rm -rf mohmp3/*.mp3; \
rm -rf sounds/*; \
cd modules; \
rm -rf *adsi* *festival* *modem* *meetme* *oss* *phone* *intercom* \
*mp3* *nbscat* *mysql* *postgres* *pgsql* *voicemail* *speex* \
*zapateller* *jpeg*; \
rm -f chan_bluetooth.so ; \
rm -f chan_mgcp.so ; \
rm -f chan_skinny.so ; \
rm -f {codec,format}_ilbc.so ; \
rm -f codec_lpc10.so ; \
rm -f pbx_dundi.so ; \
rm -f res_agi.so ; \
)
(cd $(IDIR_ASTERISK)/etc/asterisk; \
rm -f *odbc* *mysql* *postgres* *pgsql* *voicemail* *adsi* *oss* *alsa* \
*festival* *modem* *meetme* *phone* *tds* *vofr* *rpt* *vpb* \
*zapata*; \
rm -f bluetooth.conf ; \
rm -f mgcp.conf ; \
rm -f skinny.conf ; \
rm -f dundi.conf ; \
)
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)/etc/default
install -m0644 ./files/asterisk.default $(IDIR_ASTERISK)/etc/default/asterisk
install -d -m0755 $(IDIR_ASTERISK)/etc/init.d
install -m0755 ./files/asterisk.init $(IDIR_ASTERISK)/etc/init.d/asterisk
ln -sf asterisk $(IDIR_ASTERISK)/etc/init.d/S60asterisk
$(RSTRIP) $(IDIR_ASTERISK)
$(IPKG_BUILD) $(IDIR_ASTERISK) $(PACKAGE_DIR)
$(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) $(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) $(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) $(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) $(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
install -m0755 ./files/asterisk.init $(IDIR_ASTERISK_MINI)/etc/init.d/asterisk
ln -sf asterisk $(IDIR_ASTERISK_MINI)/etc/init.d/S60asterisk
$(RSTRIP) $(IDIR_ASTERISK_MINI)
$(IPKG_BUILD) $(IDIR_ASTERISK_MINI) $(PACKAGE_DIR)
$(IPKG_ASTERISK_MYSQL):
install -d -m0755 $(IDIR_ASTERISK_MYSQL)/etc/asterisk
install -m0600 $(PKG_BUILD_DIR)/configs/cdr_mysql.conf.sample $(IDIR_ASTERISK_MYSQL)/etc/asterisk/cdr_mysql.conf
install -d -m0755 $(IDIR_ASTERISK_MYSQL)/usr/lib/asterisk/modules
install -m0755 $(PKG_BUILD_DIR)/apps/app_sql_mysql.so $(IDIR_ASTERISK_MYSQL)/usr/lib/asterisk/modules/
install -m0755 $(PKG_BUILD_DIR)/cdr/cdr_mysql.so $(IDIR_ASTERISK_MYSQL)/usr/lib/asterisk/modules/
$(RSTRIP) $(IDIR_ASTERISK_MYSQL)
$(IPKG_BUILD) $(IDIR_ASTERISK_MYSQL) $(PACKAGE_DIR)
$(IPKG_ASTERISK_PGSQL):
install -d -m0755 $(IDIR_ASTERISK_PGSQL)/etc/asterisk
install -m0600 $(PKG_BUILD_DIR)/configs/cdr_pgsql.conf.sample $(IDIR_ASTERISK_PGSQL)/etc/asterisk/cdr_pgsql.conf
install -d -m0755 $(IDIR_ASTERISK_PGSQL)/usr/lib/asterisk/modules
install -m0755 $(PKG_BUILD_DIR)/apps/app_sql_postgres.so $(IDIR_ASTERISK_PGSQL)/usr/lib/asterisk/modules/
install -m0755 $(PKG_BUILD_DIR)/cdr/cdr_pgsql.so $(IDIR_ASTERISK_PGSQL)/usr/lib/asterisk/modules/
$(RSTRIP) $(IDIR_ASTERISK_PGSQL)
$(IPKG_BUILD) $(IDIR_ASTERISK_PGSQL) $(PACKAGE_DIR)
$(IPKG_ASTERISK_SQLITE):
install -d -m0755 $(IDIR_ASTERISK_SQLITE)/usr/lib/asterisk/modules
install -m0755 $(PKG_BUILD_DIR)/cdr/cdr_sqlite.so $(IDIR_ASTERISK_SQLITE)/usr/lib/asterisk/modules/
$(RSTRIP) $(IDIR_ASTERISK_SQLITE)
$(IPKG_BUILD) $(IDIR_ASTERISK_SQLITE) $(PACKAGE_DIR)
$(IPKG_ASTERISK_SOUNDS):
install -d -m0755 $(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)
$(IPKG_ASTERISK_VOICEMAIL):
install -d -m0755 $(IDIR_ASTERISK_VOICEMAIL)/etc/asterisk
install -m0644 $(PKG_BUILD_DIR)/configs/voicemail.conf.sample $(IDIR_ASTERISK_VOICEMAIL)/etc/asterisk/voicemail.conf
install -d -m0755 $(IDIR_ASTERISK_VOICEMAIL)/usr/lib/asterisk/modules
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) $(PKG_BUILD_DIR)/sounds/vm-*.gsm $(IDIR_ASTERISK_VOICEMAIL)/usr/lib/asterisk/sounds/
$(RSTRIP) $(IDIR_ASTERISK_VOICEMAIL)
$(IPKG_BUILD) $(IDIR_ASTERISK_VOICEMAIL) $(PACKAGE_DIR)
$(IPKG_ASTERISK_CHAN_BLUETOOTH):
install -d -m0755 $(IDIR_ASTERISK_CHAN_BLUETOOTH)/etc/asterisk
install -m0644 $(PKG_BUILD_DIR)/configs/bluetooth.conf $(IDIR_ASTERISK_CHAN_BLUETOOTH)/etc/asterisk/bluetooth.conf
install -d -m0755 $(IDIR_ASTERISK_CHAN_BLUETOOTH)/usr/lib/asterisk/modules
install -m0755 $(PKG_BUILD_DIR)/channels/chan_bluetooth.so $(IDIR_ASTERISK_CHAN_BLUETOOTH)/usr/lib/asterisk/modules/
$(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
install -d -m0755 $(IDIR_ASTERISK_CHAN_MGCP)/usr/lib/asterisk/modules
install -m0755 $(PKG_BUILD_DIR)/channels/chan_mgcp.so $(IDIR_ASTERISK_CHAN_MGCP)/usr/lib/asterisk/modules/
$(RSTRIP) $(IDIR_ASTERISK_CHAN_MGCP)
$(IPKG_BUILD) $(IDIR_ASTERISK_CHAN_MGCP) $(PACKAGE_DIR)
$(IPKG_ASTERISK_CHAN_SKINNY):
install -d -m0755 $(IDIR_ASTERISK_CHAN_SKINNY)/etc/asterisk
install -m0644 $(PKG_BUILD_DIR)/configs/skinny.conf.sample $(IDIR_ASTERISK_CHAN_SKINNY)/etc/asterisk/skinny.conf
install -d -m0755 $(IDIR_ASTERISK_CHAN_SKINNY)/usr/lib/asterisk/modules
install -m0755 $(PKG_BUILD_DIR)/channels/chan_skinny.so $(IDIR_ASTERISK_CHAN_SKINNY)/usr/lib/asterisk/modules/
$(RSTRIP) $(IDIR_ASTERISK_CHAN_SKINNY)
$(IPKG_BUILD) $(IDIR_ASTERISK_CHAN_SKINNY) $(PACKAGE_DIR)
$(IPKG_ASTERISK_CODEC_ILBC):
install -d -m0755 $(IDIR_ASTERISK_CODEC_ILBC)/usr/lib/asterisk/modules
install -m0755 $(PKG_BUILD_DIR)/codecs/codec_ilbc.so $(IDIR_ASTERISK_CODEC_ILBC)/usr/lib/asterisk/modules/
install -m0755 $(PKG_BUILD_DIR)/formats/format_ilbc.so $(IDIR_ASTERISK_CODEC_ILBC)/usr/lib/asterisk/modules/
$(RSTRIP) $(IDIR_ASTERISK_CODEC_ILBC)
$(IPKG_BUILD) $(IDIR_ASTERISK_CODEC_ILBC) $(PACKAGE_DIR)
$(IPKG_ASTERISK_CODEC_LPC10):
install -d -m0755 $(IDIR_ASTERISK_CODEC_LPC10)/usr/lib/asterisk/modules
install -m0755 $(PKG_BUILD_DIR)/codecs/codec_lpc10.so $(IDIR_ASTERISK_CODEC_LPC10)/usr/lib/asterisk/modules/
$(RSTRIP) $(IDIR_ASTERISK_CODEC_LPC10)
$(IPKG_BUILD) $(IDIR_ASTERISK_CODEC_LPC10) $(PACKAGE_DIR)
$(IPKG_ASTERISK_CODEC_SPEEX):
install -d -m0755 $(IDIR_ASTERISK_CODEC_SPEEX)/usr/lib/asterisk/modules
install -m0755 $(PKG_BUILD_DIR)/codecs/codec_speex.so $(IDIR_ASTERISK_CODEC_SPEEX)/usr/lib/asterisk/modules/
$(RSTRIP) $(IDIR_ASTERISK_CODEC_SPEEX)
$(IPKG_BUILD) $(IDIR_ASTERISK_CODEC_SPEEX) $(PACKAGE_DIR)
$(IPKG_ASTERISK_PBX_DUNDI):
install -d -m0755 $(IDIR_ASTERISK_PBX_DUNDI)/etc/asterisk
install -m0644 $(PKG_BUILD_DIR)/configs/dundi.conf.sample $(IDIR_ASTERISK_PBX_DUNDI)/etc/asterisk/dundi.conf
install -d -m0755 $(IDIR_ASTERISK_PBX_DUNDI)/usr/lib/asterisk/modules
install -m0755 $(PKG_BUILD_DIR)/pbx/pbx_dundi.so $(IDIR_ASTERISK_PBX_DUNDI)/usr/lib/asterisk/modules/
$(RSTRIP) $(IDIR_ASTERISK_PBX_DUNDI)
$(IPKG_BUILD) $(IDIR_ASTERISK_PBX_DUNDI) $(PACKAGE_DIR)
$(IPKG_ASTERISK_RES_AGI):
install -d -m0755 $(IDIR_ASTERISK_RES_AGI)/usr/lib/asterisk/agi-bin
install -d -m0755 $(IDIR_ASTERISK_RES_AGI)/usr/lib/asterisk/modules
install -m0755 $(PKG_BUILD_DIR)/res/res_agi.so $(IDIR_ASTERISK_RES_AGI)/usr/lib/asterisk/modules/
$(RSTRIP) $(IDIR_ASTERISK_RES_AGI)
$(IPKG_BUILD) $(IDIR_ASTERISK_RES_AGI) $(PACKAGE_DIR)

View File

@ -1,4 +0,0 @@
## startup options for /etc/init.d/asterisk
ENABLE_ASTERISK="no"
OPTIONS=""

View File

@ -1,23 +0,0 @@
#!/bin/sh
DEFAULT=/etc/default/asterisk
OPTIONS=""
[ -f $DEFAULT ] && . $DEFAULT
[ "$ENABLE_ASTERISK" = "yes" ] || exit 0
case $1 in
start)
[ -d /var/run ] || mkdir -p /var/run
[ -d /var/log/asterisk ] || mkdir -p /var/log/asterisk
[ -d /var/spool/asterisk ] || mkdir -p /var/spool/asterisk
/usr/sbin/asterisk $OPTIONS
;;
stop)
[ -f /var/run/asterisk.pid ] && kill $(cat /var/run/asterisk.pid) >/dev/null 2>&1
;;
*)
echo "usage: $0 (start|stop)"
exit 1
esac
exit $?

View File

@ -1,138 +0,0 @@
;
; Asterisk configuration file
;
; Module Loader configuration file
;
[modules]
autoload=yes
;
; Any modules that need to be loaded before the Asterisk core has been
; initialized (just after the logger has been initialized) can be loaded
; using 'preload'. This will frequently be needed if you wish to map all
; module configuration files into Realtime storage, since the Realtime
; driver will need to be loaded before the modules using those configuration
; files are initialized.
;
; An example of loading ODBC support would be:
;preload => res_odbc.so
;preload => res_config_odbc.so
;
noload => res_config_mysql.so ;
;
; load => res_features.so ; Call Parking Resource
noload => res_indications.so ; Indications Configuration
noload => res_monitor.so ; Call Monitoring Resource
; load => res_musiconhold.so ; Music On Hold Resource
noload => cdr_csv.so ; Comma Separated Values CDR Backend
noload => cdr_custom.so ; Customizable Comma Separated Values CDR Backend
noload => cdr_manager.so ; Asterisk Call Manager CDR Backend
noload => cdr_mysql.so ; MySQL CDR Backend
noload => cdr_pgsql.so ; PostgreSQL CDR Backend
noload => cdr_sqlite.so ; SQLite CDR Backend
noload => chan_agent.so ; Agent Proxy Channel
; load => chan_iax2.so ; Inter Asterisk eXchange (Ver 2)
; load => chan_local.so ; Local Proxy Channel
; load => chan_sip.so ; Session Initiation Protocol (SIP)
noload => codec_a_mu.so ; A-law and Mulaw direct Coder/Decoder
noload => codec_adpcm.so ; Adaptive Differential PCM Coder/Decoder
noload => codec_alaw.so ; A-law Coder/Decoder
noload => codec_g726.so ; ITU G.726-32kbps G726 Transcoder
; load => codec_gsm.so ; GSM/PCM16 (signed linear) Codec Translation
; load => codec_ulaw.so ; Mu-law Coder/Decoder
noload => codec_speex.so ; Speex/PCM16 (signed linear) Codec Translator
noload => format_au.so ; Sun Microsystems AU format (signed linear)
noload => format_g723.so ; G.723.1 Simple Timestamp File Format
noload => format_g726.so ; Raw G.726 (16/24/32/40kbps) data
noload => format_g729.so ; Raw G729 data
; load => format_gsm.so ; Raw GSM data
noload => format_h263.so ; Raw h263 data
noload => format_jpeg.so ; JPEG (Joint Picture Experts Group) Image
; load => format_pcm.so ; Raw uLaw 8khz Audio support (PCM)
noload => format_pcm_alaw.so ; Raw aLaw 8khz PCM Audio support
noload => format_sln.so ; Raw Signed Linear Audio support (SLN)
noload => format_vox.so ; Dialogic VOX (ADPCM) File Format
; load => format_wav.so ; Microsoft WAV format (8000hz Signed Line
; load => format_wav_gsm.so ; Microsoft WAV format (Proprietary GSM)
noload => app_alarmreceiver.so ; Alarm Receiver Application
noload => app_authenticate.so ; Authentication Application
noload => app_cdr.so ; Make sure asterisk doesn't save CDR
noload => app_chanisavail.so ; Check if channel is available
noload => app_chanspy.so ; Listen in on any channel
noload => app_controlplayback.so ; Control Playback Application
noload => app_cut.so ; Cuts up variables
noload => app_db.so ; Database access functions
; load => app_dial.so ; Dialing Application
noload => app_dictate.so ; Virtual Dictation Machine Application
noload => app_directory.so ; Extension Directory
noload => app_directed_pickup.so ; Directed Call Pickup Support
noload => app_disa.so ; DISA (Direct Inward System Access) Application
noload => app_dumpchan.so ; Dump channel variables Application
; load => app_echo.so ; Simple Echo Application
noload => app_enumlookup.so ; ENUM Lookup
noload => app_eval.so ; Reevaluates strings
noload => app_exec.so ; Executes applications
noload => app_externalivr.so ; External IVR application interface
noload => app_forkcdr.so ; Fork The CDR into 2 seperate entities
noload => app_getcpeid.so ; Get ADSI CPE ID
noload => app_groupcount.so ; Group Management Routines
noload => app_ices.so ; Encode and Stream via icecast and ices
noload => app_image.so ; Image Transmission Application
noload => app_lookupblacklist.so ; Look up Caller*ID name/number from black
noload => app_lookupcidname.so ; Look up CallerID Name from local databas
; load => app_macro.so ; Extension Macros
noload => app_math.so ; A simple math Application
noload => app_md5.so ; MD5 checksum Application
; load => app_milliwatt.so ; Digital Milliwatt (mu-law) Test Application
noload => app_mixmonitor.so ; Record a call and mix the audio during the recording
noload => app_parkandannounce.so ; Call Parking and Announce Application
; load => app_playback.so ; Trivial Playback Application
noload => app_privacy.so ; Require phone number to be entered, if n
noload => app_queue.so ; True Call Queueing
noload => app_random.so ; Random goto
noload => app_read.so ; Read Variable Application
noload => app_readfile.so ; Read in a file
noload => app_realtime.so ; Realtime Data Lookup/Rewrite
noload => app_record.so ; Trivial Record Application
; load => app_sayunixtime.so ; Say time
noload => app_senddtmf.so ; Send DTMF digits Application
noload => app_sendtext.so ; Send Text Applications
noload => app_setcallerid.so ; Set CallerID Application
noload => app_setcdruserfield.so ; CDR user field apps
noload => app_setcidname.so ; Set CallerID Name
noload => app_setcidnum.so ; Set CallerID Number
noload => app_setrndis.so ; Set RDNIS Number
noload => app_settransfercapability.so ; Set ISDN Transfer Capability
noload => app_sms.so ; SMS/PSTN handler
noload => app_softhangup.so ; Hangs up the requested channel
noload => app_sql_mysql.so ; Simple MySQL Interface
noload => app_sql_postgres.so ; Simple PostgreSQL Interface
noload => app_stack.so ; Stack Routines
noload => app_system.so ; Generic System() application
noload => app_talkdetect.so ; Playback with Talk Detection
noload => app_test.so ; Interface Test Application
noload => app_transfer.so ; Transfer
noload => app_txtcidname.so ; TXTCIDName
noload => app_url.so ; Send URL Applications
noload => app_userevent.so ; Custom User Event Application
; load => app_verbose.so ; Send verbose output
noload => app_waitforring.so ; Waits until first ring after time
noload => app_waitforsilence.so ; Wait For Silence Application
noload => app_while.so ; While Loops and Conditional Execution
noload => pbx_ael.so ; Asterisk Extension Language Compiler
; load => pbx_config.so ; Text Extension Configuration
noload => pbx_functions.so ; Builtin dialplan functions
noload => pbx_loopback.so ; Loopback Switch
noload => pbx_realtime.so ; Realtime Switch
noload => pbx_spool.so ; Outgoing Spool Support
noload => pbx_wilcalu.so ; Wil Cal U (Auto Dialer)
noload => func_callerid.so ; Caller ID related dialplan functions
noload => func_enum.so ; ENUM Functions
noload => func_uri.so ; URI encoding / decoding functions
;
; Module names listed in "global" section will have symbols globally
; exported to modules loaded after them.
;
[global]
chan_modem.so=no

View File

@ -1 +0,0 @@
/etc/asterisk/bluetooth.conf

View File

@ -1,5 +0,0 @@
Package: asterisk-chan-bluetooth
Priority: optional
Section: net
Description: Bluetooth HandsFreeProfile support for Asterisk
Depends: asterisk, bluez-libs

View File

@ -1 +0,0 @@
/etc/asterisk/h323.conf

View File

@ -1,5 +0,0 @@
Package: asterisk-chan-h323
Priority: optional
Section: net
Description: H.323 support for Asterisk
Depends: asterisk, openh323

View File

@ -1 +0,0 @@
/etc/asterisk/mgcp.conf

View File

@ -1,5 +0,0 @@
Package: asterisk-chan-mgcp
Priority: optional
Section: net
Description: a Media Gateway Control Protocol implementation for Asterisk
Depends: asterisk

View File

@ -1 +0,0 @@
/etc/asterisk/skinny.conf

View File

@ -1,5 +0,0 @@
Package: asterisk-chan-skinny
Priority: optional
Section: net
Description: a Skinny Client Control Protocol implementation for Asterisk
Depends: asterisk

View File

@ -1,5 +0,0 @@
Package: asterisk-codec-ilbc
Priority: optional
Section: net
Description: an Internet Low Bitrate Codec (ILBC) Translator for Asterisk
Depends: asterisk

View File

@ -1,5 +0,0 @@
Package: asterisk-codec-lpc10
Priority: optional
Section: net
Description: an LPC10 (Linear Predictor Code) 2.4kbps Voice Coder for Asterisk
Depends: asterisk

View File

@ -1,5 +0,0 @@
Package: asterisk-codec-speex
Priority: optional
Section: net
Description: a Speex/PCM16 Codec Translator for Asterisk
Depends: asterisk, libspeex

View File

@ -1,13 +0,0 @@
/etc/asterisk/asterisk.conf
/etc/asterisk/enum.conf
/etc/asterisk/extconfig.conf
/etc/asterisk/extensions.conf
/etc/asterisk/features.conf
/etc/asterisk/iax.conf
/etc/asterisk/iaxprov.conf
/etc/asterisk/logger.conf
/etc/asterisk/manager.conf
/etc/asterisk/modules.conf
/etc/asterisk/musiconhold.conf
/etc/asterisk/rtp.conf
/etc/asterisk/sip.conf

View File

@ -1,5 +0,0 @@
Package: asterisk-mini
Priority: optional
Section: net
Depends: libncurses, libpthread
Description: A minimal open source PBX

View File

@ -1 +0,0 @@
/etc/asterisk/cdr_mysql.conf

View File

@ -1,5 +0,0 @@
Package: asterisk-mysql
Priority: optional
Section: net
Description: MySQL modules for Asterisk
Depends: asterisk, libmysqlclient, zlib

View File

@ -1 +0,0 @@
/etc/asterisk/dundi.conf

View File

@ -1,5 +0,0 @@
Package: asterisk-pbx-dundi
Priority: optional
Section: net
Description: Distributed Universal Number Discovery (DUNDi) support for Asterisk
Depends: asterisk

View File

@ -1 +0,0 @@
/etc/asterisk/cdr_pgsql.conf

View File

@ -1,5 +0,0 @@
Package: asterisk-pgsql
Priority: optional
Section: net
Description: PostgreSQL modules for Asterisk
Depends: asterisk, libpq, zlib

View File

@ -1,5 +0,0 @@
Package: asterisk-res-agi
Priority: optional
Section: net
Description: Asterisk Gateway Interface module
Depends: asterisk

View File

@ -1,5 +0,0 @@
Package: asterisk-sounds
Priority: optional
Section: net
Description: a sounds collection for Asterisk
Depends: asterisk

View File

@ -1,5 +0,0 @@
Package: asterisk-sqlite
Priority: optional
Section: net
Description: SQLite modules for Asterisk
Depends: asterisk, libsqlite2

View File

@ -1 +0,0 @@
/etc/asterisk/voicemail.conf

View File

@ -1,5 +0,0 @@
Package: asterisk-voicemail
Priority: optional
Section: net
Description: VoiceMail related modules for Asterisk
Depends: asterisk

View File

@ -1,21 +0,0 @@
/etc/asterisk/asterisk.conf
/etc/asterisk/agents.conf
/etc/asterisk/alarmreceiver.conf
/etc/asterisk/cdr_manager.conf
/etc/asterisk/codecs.conf
/etc/asterisk/enum.conf
/etc/asterisk/extconfig.conf
/etc/asterisk/extensions.conf
/etc/asterisk/features.conf
/etc/asterisk/iax.conf
/etc/asterisk/iaxprov.conf
/etc/asterisk/indications.conf
/etc/asterisk/logger.conf
/etc/asterisk/manager.conf
/etc/asterisk/modules.conf
/etc/asterisk/musiconhold.conf
/etc/asterisk/osp.conf
/etc/asterisk/privacy.conf
/etc/asterisk/queues.conf
/etc/asterisk/rtp.conf
/etc/asterisk/sip.conf

View File

@ -1,5 +0,0 @@
Package: asterisk
Priority: optional
Section: net
Depends: libncurses, libpthread
Description: An open source PBX

View File

@ -1,14 +0,0 @@
diff -ruN asterisk-1.0.7-old/db1-ast/Makefile asterisk-1.0.7-new/db1-ast/Makefile
--- asterisk-1.0.7-old/db1-ast/Makefile 2004-08-31 18:33:00.000000000 +0200
+++ asterisk-1.0.7-new/db1-ast/Makefile 2005-03-19 17:38:06.000000000 +0100
@@ -32,8 +32,8 @@
$(LIBDB): $(OBJS)
rm -f $@
- ar cq $@ $(OBJS)
- ranlib $@
+ $(AR) cq $@ $(OBJS)
+ $(RANLIB) $@
$(LIBDBSO): $(SHOBJS)
$(CC) -Wl,-O1 -Wl,--version-script=libdb.map -Wl,-soname=$(LIBDBSO) -shared -o $@ $^

View File

@ -1,28 +0,0 @@
diff -ruN asterisk-1.0.7-old/codecs/lpc10/Makefile asterisk-1.0.7-new/codecs/lpc10/Makefile
--- asterisk-1.0.7-old/codecs/lpc10/Makefile 2004-08-31 18:33:00.000000000 +0200
+++ asterisk-1.0.7-new/codecs/lpc10/Makefile 2005-03-19 17:38:06.000000000 +0100
@@ -31,6 +31,7 @@
ifneq ($(PROC),ppc)
ifneq ($(PROC),x86_64)
ifneq ($(PROC),alpha)
+ifneq ($(PROC),mipsel)
#The problem with sparc is the best stuff is in newer versions of gcc (post 3.0) only.
#This works for even old (2.96) versions of gcc and provides a small boost either way.
#A ultrasparc cpu is really v9 but the stock debian stable 3.0 gcc doesn.t support it.
@@ -46,6 +47,7 @@
endif
endif
endif
+endif
LIB = $(LIB_TARGET_DIR)/liblpc10.a
@@ -62,7 +64,7 @@
$(LIB): $(OBJ)
$(AR) cr $@ $(OBJ)
- ranlib $@
+ $(RANLIB) $@
clean:
-rm -f *.o $(LIB)

View File

@ -1,14 +0,0 @@
diff -ruN asterisk-1.0.7-old/stdtime/Makefile asterisk-1.0.7-new/stdtime/Makefile
--- asterisk-1.0.7-old/stdtime/Makefile 2003-11-05 07:19:41.000000000 +0100
+++ asterisk-1.0.7-new/stdtime/Makefile 2005-03-19 17:38:06.000000000 +0100
@@ -3,8 +3,8 @@
all: libtime.a
libtime.a: $(OBJS)
- ar rv $@ $(OBJS)
- ranlib $@
+ $(AR) rv $@ $(OBJS)
+ $(RANLIB) $@
install:

View File

@ -1,12 +0,0 @@
diff -ruN asterisk-1.0.7-old/channels/chan_iax2.c asterisk-1.0.7-new/channels/chan_iax2.c
--- asterisk-1.0.7-old/channels/chan_iax2.c 2005-10-25 02:06:35.000000000 +0200
+++ asterisk-1.0.7-new/channels/chan_iax2.c 2005-10-25 04:35:11.000000000 +0200
@@ -960,7 +960,7 @@
last++;
else
last = s;
- snprintf(s2, strlen(s) + 100, "/var/tmp/%s-%ld", last, (unsigned long)rand());
+ snprintf(s2, strlen(s) + 100, "/tmp/%s-%ld", last, (unsigned long)rand());
res = stat(s, &stbuf);
if (res < 0) {
ast_log(LOG_WARNING, "Failed to stat '%s': %s\n", s, strerror(errno));

View File

@ -1,18 +0,0 @@
diff -ruN asterisk-1.0.7-old/dns.c asterisk-1.0.7-new/dns.c
--- asterisk-1.0.7-old/dns.c 2004-06-22 22:11:15.000000000 +0200
+++ asterisk-1.0.7-new/dns.c 2005-03-19 17:38:06.000000000 +0100
@@ -153,7 +153,13 @@
#if defined(res_ninit)
#define HAS_RES_NINIT
-#else
+#endif
+
+#ifdef __UCLIBC__
+#undef HAS_RES_NINIT
+#endif
+
+#ifndef HAS_RES_NINIT
AST_MUTEX_DEFINE_STATIC(res_lock);
#if 0
#warning "Warning, res_ninit is missing... Could have reentrancy issues"

File diff suppressed because it is too large Load Diff

View File

@ -1,34 +0,0 @@
diff -ruN asterisk-1.2.0-old/apps/Makefile asterisk-1.2.0-new/apps/Makefile
--- asterisk-1.2.0-old/apps/Makefile 2005-11-11 01:32:45.000000000 +0100
+++ asterisk-1.2.0-new/apps/Makefile 2005-12-04 19:26:20.000000000 +0100
@@ -83,6 +83,9 @@
#CFLAGS+=-DEXTENDED_ODBC_STORAGE
# See doc/README.odbcstorage for more information
+CFLAGS += $(EXTRA_CFLAGS)
+APPS += $(EXTRA_APP_MODULES)
+
all: $(APPS)
clean:
@@ -102,14 +105,17 @@
app_curl.so: app_curl.o
$(CC) $(SOLINK) -o $@ ${CYGSOLINK} $< ${CYGSOLIB} $(CURLLIBS)
+app_sql_mysql.so: app_sql_mysql.o
+ $(CC) $(SOLINK) -o $@ ${CYGSOLINK} $< ${CYGSOLIB} $(EXTRA_LDFLAGS) -lmysqlclient
+
app_sql_postgres.o: app_sql_postgres.c
- $(CC) -pipe -I/usr/local/pgsql/include $(CFLAGS) -c -o app_sql_postgres.o app_sql_postgres.c
+ $(CC) -pipe $(CFLAGS) -c -o app_sql_postgres.o app_sql_postgres.c
app_sql_postgres.so: app_sql_postgres.o
- $(CC) $(SOLINK) -o $@ ${CYGSOLINK} $< ${CYGSOLIB} -L/usr/local/pgsql/lib -lpq
+ $(CC) $(SOLINK) -o $@ ${CYGSOLINK} $< ${CYGSOLIB} $(EXTRA_LDFLAGS) -lpq
app_sql_odbc.so: app_sql_odbc.o
- $(CC) $(SOLINK) -o $@ ${CYGSOLINK} $< ${CYGSOLIB} -lodbc
+ $(CC) $(SOLINK) -o $@ ${CYGSOLINK} $< ${CYGSOLIB} $(EXTRA_LDFLAGS) -lodbc
look: look.c
$(CC) -pipe -O6 -g look.c -o look -lncurses

View File

@ -1,37 +0,0 @@
diff -ruN asterisk-1.2.0-old/cdr/Makefile asterisk-1.2.0-new/cdr/Makefile
--- asterisk-1.2.0-old/cdr/Makefile 2005-11-14 01:45:07.000000000 +0100
+++ asterisk-1.2.0-new/cdr/Makefile 2005-12-04 22:22:43.000000000 +0100
@@ -107,6 +107,9 @@
MODS+=cdr_sqlite.so
endif
+CFLAGS += $(EXTRA_CFLAGS)
+MODS += $(EXTRA_CDR_MODULES)
+
all: depend $(MODS)
install: all
@@ -123,16 +126,19 @@
endif
cdr_odbc.so: cdr_odbc.o
- $(CC) $(SOLINK) -o $@ ${CYGSOLINK} $< ${CYGSOLIB} -lodbc $(MLFLAGS)
+ $(CC) $(SOLINK) -o $@ ${CYGSOLINK} $< ${CYGSOLIB} $(EXTRA_LDFLAGS) -lodbc $(MLFLAGS)
cdr_tds.so: cdr_tds.o
- $(CC) $(SOLINK) -o $@ ${CYGSOLINK} $< ${CYGSOLIB} -ltds $(MLFLAGS)
+ $(CC) $(SOLINK) -o $@ ${CYGSOLINK} $< ${CYGSOLIB} $(EXTRA_LDFLAGS) -ltds $(MLFLAGS)
+
+cdr_mysql.so: cdr_pgsql.o
+ $(CC) $(SOLINK) -o $@ ${CYGSOLINK} $< ${CYGSOLIB} $(EXTRA_LDFLAGS) -lmysqlclient -lz $(MLFLAGS)
cdr_pgsql.so: cdr_pgsql.o
- $(CC) $(SOLINK) -o $@ ${CYGSOLINK} $< ${CYGSOLIB} -lpq -lz $(MLFLAGS)
+ $(CC) $(SOLINK) -o $@ ${CYGSOLINK} $< ${CYGSOLIB} $(EXTRA_LDFLAGS) -lpq -lz $(MLFLAGS)
cdr_sqlite.so: cdr_sqlite.o
- $(CC) $(SOLINK) -o $@ ${CYGSOLINK} $< ${CYGSOLIB} -lsqlite $(MLFLAGS)
+ $(CC) $(SOLINK) -o $@ ${CYGSOLINK} $< ${CYGSOLIB} $(EXTRA_LDFLAGS) -lsqlite $(MLFLAGS)
depend: .depend

View File

@ -1,22 +0,0 @@
diff -ruN asterisk-1.2.0-old/channels/Makefile asterisk-1.2.0-new/channels/Makefile
--- asterisk-1.2.0-old/channels/Makefile 2005-12-04 04:48:40.000000000 +0100
+++ asterisk-1.2.0-new/channels/Makefile 2005-12-04 23:30:19.000000000 +0100
@@ -155,6 +155,9 @@
#CFLAGS+=$(shell [ -f $(ZAPDIR)/libzap.a ] && echo "-I$(ZAPDIR)")
+CFLAGS += $(EXTRA_CFLAGS)
+CHANNEL_LIBS += $(EXTRA_CHAN_MODULES)
+
all: depend $(CHANNEL_LIBS)
clean:
@@ -162,7 +165,7 @@
rm -f busy.h ringtone.h gentone gentone-ulaw
%.so : %.o
- $(CC) $(SOLINK) -o $@ ${CYGSOLINK} $< ${CYGSOLIB} ${LIBS}
+ $(CC) $(SOLINK) -o $@ ${CYGSOLINK} $< ${CYGSOLIB}
ifneq ($(wildcard .depend),)
include .depend

View File

@ -1,39 +0,0 @@
diff -ruN asterisk-1.2.0-old/codecs/gsm/Makefile asterisk-1.2.0-new/codecs/gsm/Makefile
--- asterisk-1.2.0-old/codecs/gsm/Makefile 2005-11-08 04:31:45.000000000 +0100
+++ asterisk-1.2.0-new/codecs/gsm/Makefile 2005-12-04 13:31:50.000000000 +0100
@@ -236,6 +236,8 @@
ifneq ($(shell uname -m),armv4l)
ifneq ($(shell uname -m),sparc64)
ifneq (${PROC},arm)
+ifneq (${PROC},mipsel)
+ifneq (${PROC},mips)
GSM_SOURCES+= $(SRC)/k6opt.s
endif
endif
@@ -246,6 +247,8 @@
endif
endif
endif
+endif
+endif
TOAST_SOURCES = $(SRC)/toast.c \
$(SRC)/toast_lin.c \
@@ -299,6 +301,8 @@
ifneq ($(shell uname -m), alpha)
ifneq ($(shell uname -m), sparc64)
ifneq ($(shell uname -m), armv4l)
+ifneq (${PROC}, mipsel)
+ifneq (${PROC}, mips)
GSM_OBJECTS+= $(SRC)/k6opt.o
endif
endif
@@ -308,6 +311,8 @@
endif
endif
endif
+endif
+endif
TOAST_OBJECTS = $(SRC)/toast.o \
$(SRC)/toast_lin.o \

View File

@ -1,13 +0,0 @@
diff -ruN asterisk-1.2.0-old/codecs/Makefile asterisk-1.2.0-new/codecs/Makefile
--- asterisk-1.2.0-old/codecs/Makefile 2005-11-08 05:13:18.000000000 +0100
+++ asterisk-1.2.0-new/codecs/Makefile 2005-12-04 19:24:53.000000000 +0100
@@ -72,6 +72,9 @@
codec_adpcm.so codec_ulaw.so codec_alaw.so codec_a_mu.so \
codec_g726.so
+CFLAGS += $(EXTRA_CFLAGS)
+CODECS += $(EXTRA_CODEC_MODULES)
+
all: depend $(CODECS)
clean:

View File

@ -1,22 +0,0 @@
diff -ruN asterisk-1.2.0-old/pbx/Makefile asterisk-1.2.0-new/pbx/Makefile
--- asterisk-1.2.0-old/pbx/Makefile 2005-11-01 22:53:30.000000000 +0100
+++ asterisk-1.2.0-new/pbx/Makefile 2005-12-04 19:23:48.000000000 +0100
@@ -38,6 +38,9 @@
KDE_CONSOLE_OBJS=pbx_kdeconsole_main.o pbx_kdeconsole.o
+CFLAGS += $(EXTRA_CFLAGS)
+PBX_LIBS += $(EXTRA_PBX_MODULES)
+
all: depend $(PBX_LIBS)
clean:
@@ -59,7 +62,7 @@
$(CC) $(SOLINK) -o $@ $(KDE_CONSOLE_OBJS) $(KDE_LIBS)
pbx_dundi.so: dundi-parser.o pbx_dundi.o
- $(CC) $(SOLINK) -o $@ ${CYGSOLINK} pbx_dundi.o dundi-parser.o -lz ${CYGSOLIB}
+ $(CC) $(SOLINK) -o $@ ${CYGSOLINK} pbx_dundi.o dundi-parser.o $(EXTRA_LDFLAGS) -lz ${CYGSOLIB}
%.moc : %.h
$(MOC) $< -o $@

View File

@ -1,26 +0,0 @@
diff -ruN asterisk-1.2.0-old/res/Makefile asterisk-1.2.0-new/res/Makefile
--- asterisk-1.2.0-old/res/Makefile 2005-11-16 21:49:44.000000000 +0100
+++ asterisk-1.2.0-new/res/Makefile 2005-12-04 19:18:15.000000000 +0100
@@ -69,6 +69,9 @@
CFLAGS+=-DOPENSSL_NO_KRB5 -fPIC
endif
+CFLAGS += $(EXTRA_CFLAGS)
+MODS += $(EXTRA_RES_MODULES)
+
all: depend $(MODS)
install: all
@@ -112,6 +112,12 @@
res_config_odbc.so: res_config_odbc.o
$(CC) $(SOLINK) -o $@ ${CYGSOLINK} $< ${CYGSOLIB} ${CYG_RES_CONFIG_ODBC_LIB}
+res_config_mysql.so: res_config_mysql.o
+ $(CC) $(SOLINK) -o $@ ${CYGSOLINK} $< ${CYGSOLIB} $(EXTRA_LDFLAGS) -lmysqlclient -lz
+
+res_sqlite.so: res_sqlite.o
+ $(CC) $(SOLINK) -o $@ ${CYGSOLINK} $< ${CYGSOLIB} $(EXTRA_LDFLAGS) -lsqlite
+
ifneq ($(wildcard .depend),)
include .depend
endif

View File

@ -1,54 +0,0 @@
diff -ruN asterisk-1.2.0-old/Makefile asterisk-1.2.0-new/Makefile
--- asterisk-1.2.0-old/Makefile 2005-11-16 21:23:53.000000000 +0100
+++ asterisk-1.2.0-new/Makefile 2005-12-04 23:01:16.000000000 +0100
@@ -341,16 +339,6 @@
netsock.o slinfactory.o ast_expr2.o ast_expr2f.o \
cryptostub.o
-ifeq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/include/sys/poll.h),)
- OBJS+= poll.o
- ASTCFLAGS+=-DPOLLCOMPAT
-endif
-
-ifeq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/include/dlfcn.h),)
- OBJS+= dlfcn.o
- ASTCFLAGS+=-DDLFCNCOMPAT
-endif
-
ifeq ($(OSARCH),Linux)
LIBS+=-ldl -lpthread -lncurses -lm -lresolv #-lnjamd
else
@@ -401,7 +389,9 @@
HAVEDOT=no
endif
+ifneq ($(NOCRYPTO),yes)
LIBS+=-lssl
+endif
INSTALL=install
@@ -430,12 +420,12 @@
cd editline && unset CFLAGS LIBS && ./configure ; \
editline/libedit.a: FORCE
- cd editline && unset CFLAGS LIBS && test -f config.h || ./configure
+ cd editline && unset CFLAGS LIBS && test -f config.h || CFLAGS="$(OPTIMIZE) $(EXTRA_CFLAGS)" LDFLAGS="$(EXTRA_LDFLAGS)" ./configure
$(MAKE) -C editline libedit.a
db1-ast/libdb1.a: FORCE
@if [ -d db1-ast ]; then \
- $(MAKE) -C db1-ast libdb1.a ; \
+ $(MAKE) OORG="$(OPTIMIZE)" -C db1-ast libdb1.a ; \
else \
echo "You need to do a cvs update -d not just cvs update"; \
exit 1; \
@@ -513,7 +503,7 @@
fi
rm -f include/asterisk/build.h.tmp
$(CC) -c -o buildinfo.o $(CFLAGS) buildinfo.c
- $(CC) $(DEBUG) $(ASTOBJ) $(ASTLINK) $(OBJS) buildinfo.o $(LIBEDIT) db1-ast/libdb1.a stdtime/libtime.a $(LIBS)
+ $(CC) $(DEBUG) $(ASTOBJ) $(ASTLINK) $(OBJS) buildinfo.o $(LIBEDIT) db1-ast/libdb1.a stdtime/libtime.a $(EXTRA_LDFLAGS) $(LIBS)
muted: muted.o
$(CC) $(AUDIO_LIBS) -o muted muted.o

View File

@ -1,449 +0,0 @@
diff -ruN asterisk-1.2.0-old/apps/app_sql_mysql.c asterisk-1.2.0-new/apps/app_sql_mysql.c
--- asterisk-1.2.0-old/apps/app_sql_mysql.c 1970-01-01 01:00:00.000000000 +0100
+++ asterisk-1.2.0-new/apps/app_sql_mysql.c 2005-06-07 18:36:28.000000000 +0200
@@ -0,0 +1,445 @@
+/*
+ * Asterisk -- A telephony toolkit for Linux.
+ *
+ * Connect to MySQL
+ *
+ * Copyright (C) 2004, Constantine Filin and Christos Ricudis
+ *
+ * Christos Ricudis <ricudis@itc.auth.gr>
+ * Constantine Filin <cf@intermedia.net>
+ *
+ * This program is free software, distributed under the terms of
+ * the GNU General Public License
+ */
+
+#include <stdlib.h>
+#include <unistd.h>
+#include <string.h>
+#include <stdlib.h>
+#include <sys/types.h>
+#include <stdio.h>
+#include <unistd.h>
+
+#include <mysql.h>
+
+#include <asterisk/file.h>
+#include <asterisk/logger.h>
+#include <asterisk/channel.h>
+#include <asterisk/pbx.h>
+#include <asterisk/module.h>
+#include <asterisk/linkedlists.h>
+#include <asterisk/chanvars.h>
+#include <asterisk/lock.h>
+
+#define EXTRA_LOG 0
+
+static char *tdesc = "Simple Mysql Interface";
+
+static char *app = "MYSQL";
+
+static char *synopsis = "Do several mySQLy things";
+
+static char *descrip =
+"MYSQL(): Do several mySQLy things\n"
+"Syntax:\n"
+" MYSQL(Connect connid dhhost dbuser dbpass dbname)\n"
+" Connects to a database. Arguments contain standard MySQL parameters\n"
+" passed to function mysql_real_connect. Connection identifer returned\n"
+" in ${var}\n"
+" MYSQL(Query resultid ${connid} query-string)\n"
+" Executes standard MySQL query contained in query-string using established\n"
+" connection identified by ${connection_identifier}. Result of query is\n"
+" is stored in ${var}.\n"
+" MYSQL(Fetch fetchid ${resultid} var1 var2 ... varN)\n"
+" Fetches a single row from a result set contained in ${result_identifier}.\n"
+" Assigns returned fields to ${var1} ... ${varn}. ${fetchid} is set TRUE\n"
+" if additional rows exist in result set.\n"
+" MYSQL(Clear ${resultid})\n"
+" Frees memory and datastructures associated with result set.\n"
+" MYSQL(Disconnect ${connid})\n"
+" Disconnects from named connection to MySQL.\n"
+" On exit, always returns 0. Sets MYSQL_STATUS to 0 on success and -1 on error.\n";
+
+/*
+EXAMPLES OF USE :
+
+exten => s,2,MYSQL(Connect connid localhost asterisk mypass credit)
+exten => s,3,MYSQL(Query resultid ${connid} SELECT username,credit FROM credit WHERE callerid=${CALLERIDNUM})
+exten => s,4,MYSQL(Fetch fetchid ${resultid} datavar1 datavar2)
+exten => s,5,GotoIf(${fetchid}?6:8)
+exten => s,6,Festival("User ${datavar1} currently has credit balance of ${datavar2} dollars.")
+exten => s,7,Goto(s,4)
+exten => s,8,MYSQL(Clear ${resultid})
+exten => s,9,MYSQL(Disconnect ${connid})
+*/
+
+STANDARD_LOCAL_USER;
+LOCAL_USER_DECL;
+
+AST_MUTEX_DEFINE_STATIC(_mysql_mutex);
+
+#define AST_MYSQL_ID_DUMMY 0
+#define AST_MYSQL_ID_CONNID 1
+#define AST_MYSQL_ID_RESID 2
+#define AST_MYSQL_ID_FETCHID 3
+
+struct ast_MYSQL_id {
+ int identifier_type; /* 0=dummy, 1=connid, 2=resultid */
+ int identifier;
+ void *data;
+ AST_LIST_ENTRY(ast_MYSQL_id) entries;
+} *ast_MYSQL_id;
+
+AST_LIST_HEAD(MYSQLidshead,ast_MYSQL_id) _mysql_ids_head;
+
+/* helpful procs */
+static void *find_identifier(int identifier,int identifier_type) {
+ struct MYSQLidshead *headp;
+ struct ast_MYSQL_id *i;
+ void *res=NULL;
+ int found=0;
+
+ headp=&_mysql_ids_head;
+
+ if (AST_LIST_LOCK(headp)) {
+ ast_log(LOG_WARNING,"Unable to lock identifiers list\n");
+ } else {
+ AST_LIST_TRAVERSE(headp,i,entries) {
+ if ((i->identifier==identifier) && (i->identifier_type==identifier_type)) {
+ found=1;
+ res=i->data;
+ break;
+ }
+ }
+ if (!found) {
+ ast_log(LOG_WARNING,"Identifier %d, identifier_type %d not found in identifier list\n",identifier,identifier_type);
+ }
+ AST_LIST_UNLOCK(headp);
+ }
+
+ return res;
+}
+
+static int add_identifier(int identifier_type,void *data) {
+ struct ast_MYSQL_id *i,*j;
+ struct MYSQLidshead *headp;
+ int maxidentifier=0;
+
+ headp=&_mysql_ids_head;
+ i=NULL;
+ j=NULL;
+
+ if (AST_LIST_LOCK(headp)) {
+ ast_log(LOG_WARNING,"Unable to lock identifiers list\n");
+ return(-1);
+ } else {
+ i=malloc(sizeof(struct ast_MYSQL_id));
+ AST_LIST_TRAVERSE(headp,j,entries) {
+ if (j->identifier>maxidentifier) {
+ maxidentifier=j->identifier;
+ }
+ }
+ i->identifier=maxidentifier+1;
+ i->identifier_type=identifier_type;
+ i->data=data;
+ AST_LIST_INSERT_HEAD(headp,i,entries);
+ AST_LIST_UNLOCK(headp);
+ }
+ return i->identifier;
+}
+
+static int del_identifier(int identifier,int identifier_type) {
+ struct ast_MYSQL_id *i;
+ struct MYSQLidshead *headp;
+ int found=0;
+
+ headp=&_mysql_ids_head;
+
+ if (AST_LIST_LOCK(headp)) {
+ ast_log(LOG_WARNING,"Unable to lock identifiers list\n");
+ } else {
+ AST_LIST_TRAVERSE(headp,i,entries) {
+ if ((i->identifier==identifier) &&
+ (i->identifier_type==identifier_type)) {
+ AST_LIST_REMOVE(headp,i,entries);
+ free(i);
+ found=1;
+ break;
+ }
+ }
+ AST_LIST_UNLOCK(headp);
+ }
+
+ if (found==0) {
+ ast_log(LOG_WARNING,"Could not find identifier %d, identifier_type %d in list to delete\n",identifier,identifier_type);
+ return(-1);
+ } else {
+ return(0);
+ }
+}
+
+static int set_asterisk_int(struct ast_channel *chan, char *varname, int id) {
+ if( id>=0 ) {
+ char s[100] = "";
+ snprintf(s, sizeof(s)-1, "%d", id);
+#if EXTRA_LOG
+ ast_log(LOG_WARNING,"MYSQL: setting var '%s' to value '%s'\n",varname,s);
+#endif
+ pbx_builtin_setvar_helper(chan,varname,s);
+ }
+ return id;
+}
+
+static int add_identifier_and_set_asterisk_int(struct ast_channel *chan, char *varname, int identifier_type, void *data) {
+ return set_asterisk_int(chan,varname,add_identifier(identifier_type,data));
+}
+
+static int safe_scan_int( char** data, char* delim, int def ) {
+ char* end;
+ int res = def;
+ char* s = strsep(data,delim);
+ if( s ) {
+ res = strtol(s,&end,10);
+ if (*end) res = def; /* not an integer */
+ }
+ return res;
+}
+
+/* MYSQL operations */
+static int aMYSQL_connect(struct ast_channel *chan, char *data) {
+
+ MYSQL *mysql;
+
+ char *connid_var;
+ char *dbhost;
+ char *dbuser;
+ char *dbpass;
+ char *dbname;
+
+ strsep(&data," "); // eat the first token, we already know it :P
+
+ connid_var=strsep(&data," ");
+ dbhost=strsep(&data," ");
+ dbuser=strsep(&data," ");
+ dbpass=strsep(&data," ");
+ dbname=strsep(&data,"\n");
+
+ if( connid_var && dbhost && dbuser && dbpass && dbname ) {
+ mysql = mysql_init(NULL);
+ if (mysql) {
+ if (mysql_real_connect(mysql,dbhost,dbuser,dbpass,dbname,0,NULL,0)) {
+ add_identifier_and_set_asterisk_int(chan,connid_var,AST_MYSQL_ID_CONNID,mysql);
+ return 0;
+ }
+ else {
+ ast_log(LOG_WARNING,"mysql_real_connect(mysql,%s,%s,dbpass,%s,...) failed\n",dbhost,dbuser,dbname);
+ }
+ }
+ else {
+ ast_log(LOG_WARNING,"myslq_init returned NULL\n");
+ }
+ }
+ else {
+ ast_log(LOG_WARNING,"MYSQL(connect is missing some arguments\n");
+ }
+
+ return -1;
+}
+
+static int aMYSQL_query(struct ast_channel *chan, char *data) {
+
+ MYSQL *mysql;
+ MYSQL_RES *mysqlres;
+
+ char *resultid_var;
+ int connid;
+ char *querystring;
+
+ strsep(&data," "); // eat the first token, we already know it :P
+
+ resultid_var = strsep(&data," ");
+ connid = safe_scan_int(&data," ",-1);
+ querystring = strsep(&data,"\n");
+
+ if (resultid_var && (connid>=0) && querystring) {
+ if ((mysql=find_identifier(connid,AST_MYSQL_ID_CONNID))!=NULL) {
+ mysql_query(mysql,querystring);
+ if ((mysqlres=mysql_use_result(mysql))!=NULL) {
+ add_identifier_and_set_asterisk_int(chan,resultid_var,AST_MYSQL_ID_RESID,mysqlres);
+ return 0;
+ }
+ else if( mysql_field_count(mysql)==0 ) {
+ return 0; // See http://dev.mysql.com/doc/mysql/en/mysql_field_count.html
+ }
+ else {
+ ast_log(LOG_WARNING,"aMYSQL_query: mysql_store_result() failed on query %s\n",querystring);
+ }
+ }
+ else {
+ ast_log(LOG_WARNING,"aMYSQL_query: Invalid connection identifier %d passed in aMYSQL_query\n",connid);
+ }
+ }
+ else {
+ ast_log(LOG_WARNING,"aMYSQL_query: missing some arguments\n");
+ }
+
+ return -1;
+}
+
+
+static int aMYSQL_fetch(struct ast_channel *chan, char *data) {
+
+ MYSQL_RES *mysqlres;
+ MYSQL_ROW mysqlrow;
+
+ char *fetchid_var,*s5,*s6;
+ int resultid,numFields,j;
+
+ strsep(&data," "); // eat the first token, we already know it :P
+
+ fetchid_var = strsep(&data," ");
+ resultid = safe_scan_int(&data," ",-1);
+
+ if (fetchid_var && (resultid>=0) ) {
+ if ((mysqlres=find_identifier(resultid,AST_MYSQL_ID_RESID))!=NULL) {
+ /* Grab the next row */
+ if ((mysqlrow=mysql_fetch_row(mysqlres))!=NULL) {
+ numFields=mysql_num_fields(mysqlres);
+ for (j=0;j<numFields;j++) {
+ s5=strsep(&data," ");
+ if (s5==NULL) {
+ ast_log(LOG_WARNING,"ast_MYSQL_fetch: More fields (%d) than variables (%d)\n",numFields,j);
+ break;
+ }
+ s6=mysqlrow[j];
+ pbx_builtin_setvar_helper(chan,s5, s6 ? s6 : "NULL");
+ }
+#ifdef EXTRA_LOG
+ ast_log(LOG_WARNING,"ast_MYSQL_fetch: numFields=%d\n",numFields);
+#endif
+ set_asterisk_int(chan,fetchid_var,1); // try more rows
+ } else {
+#if EXTRA_LOG
+ ast_log(LOG_WARNING,"ast_MYSQL_fetch : EOF\n");
+#endif
+ set_asterisk_int(chan,fetchid_var,0); // no more rows
+ }
+ return 0;
+ }
+ else {
+ ast_log(LOG_WARNING,"aMYSQL_fetch: Invalid result identifier %d passed\n",resultid);
+ }
+ }
+ else {
+ ast_log(LOG_WARNING,"aMYSQL_fetch: missing some arguments\n");
+ }
+
+ return -1;
+}
+
+static int aMYSQL_clear(struct ast_channel *chan, char *data) {
+
+ MYSQL_RES *mysqlres;
+
+ int id;
+ strsep(&data," "); // eat the first token, we already know it :P
+ id = safe_scan_int(&data," \n",-1);
+ if ((mysqlres=find_identifier(id,AST_MYSQL_ID_RESID))==NULL) {
+ ast_log(LOG_WARNING,"Invalid result identifier %d passed in aMYSQL_clear\n",id);
+ } else {
+ mysql_free_result(mysqlres);
+ del_identifier(id,AST_MYSQL_ID_RESID);
+ }
+
+ return 0;
+}
+
+static int aMYSQL_disconnect(struct ast_channel *chan, char *data) {
+
+ MYSQL *mysql;
+ int id;
+ strsep(&data," "); // eat the first token, we already know it :P
+
+ id = safe_scan_int(&data," \n",-1);
+ if ((mysql=find_identifier(id,AST_MYSQL_ID_CONNID))==NULL) {
+ ast_log(LOG_WARNING,"Invalid connection identifier %d passed in aMYSQL_disconnect\n",id);
+ } else {
+ mysql_close(mysql);
+ del_identifier(id,AST_MYSQL_ID_CONNID);
+ }
+
+ return 0;
+}
+
+static int MYSQL_exec(struct ast_channel *chan, void *data)
+{
+ struct localuser *u;
+ int result;
+ char sresult[10];
+
+#if EXTRA_LOG
+ fprintf(stderr,"MYSQL_exec: data=%s\n",(char*)data);
+#endif
+
+ if (!data) {
+ ast_log(LOG_WARNING, "APP_MYSQL requires an argument (see manual)\n");
+ return -1;
+ }
+
+ LOCAL_USER_ADD(u);
+ result=0;
+
+ ast_mutex_lock(&_mysql_mutex);
+
+ if (strncasecmp("connect",data,strlen("connect"))==0) {
+ result=aMYSQL_connect(chan,ast_strdupa(data));
+ } else if (strncasecmp("query",data,strlen("query"))==0) {
+ result=aMYSQL_query(chan,ast_strdupa(data));
+ } else if (strncasecmp("fetch",data,strlen("fetch"))==0) {
+ result=aMYSQL_fetch(chan,ast_strdupa(data));
+ } else if (strncasecmp("clear",data,strlen("clear"))==0) {
+ result=aMYSQL_clear(chan,ast_strdupa(data));
+ } else if (strncasecmp("disconnect",data,strlen("disconnect"))==0) {
+ result=aMYSQL_disconnect(chan,ast_strdupa(data));
+ } else {
+ ast_log(LOG_WARNING, "Unknown argument to MYSQL application : %s\n",(char *)data);
+ result=-1;
+ }
+
+ ast_mutex_unlock(&_mysql_mutex);
+
+ LOCAL_USER_REMOVE(u);
+ snprintf(sresult, sizeof(sresult), "%d", result);
+ pbx_builtin_setvar_helper(chan, "MYSQL_STATUS", sresult);
+ return 0;
+}
+
+int unload_module(void)
+{
+ STANDARD_HANGUP_LOCALUSERS;
+ return ast_unregister_application(app);
+}
+
+int load_module(void)
+{
+ struct MYSQLidshead *headp = &_mysql_ids_head;
+ AST_LIST_HEAD_INIT(headp);
+ return ast_register_application(app, MYSQL_exec, synopsis, descrip);
+}
+
+char *description(void)
+{
+ return tdesc;
+}
+
+int usecount(void)
+{
+ int res;
+ STANDARD_USECOUNT(res);
+ return res;
+}
+
+char *key()
+{
+ return ASTERISK_GPL_KEY;
+}

View File

@ -1,522 +0,0 @@
diff -ruN asterisk-1.2.0-old/configs/cdr_mysql.conf.sample asterisk-1.2.0-new/configs/cdr_mysql.conf.sample
--- asterisk-1.2.0-old/configs/cdr_mysql.conf.sample 1970-01-01 01:00:00.000000000 +0100
+++ asterisk-1.2.0-new/configs/cdr_mysql.conf.sample 2005-01-21 02:43:20.000000000 +0100
@@ -0,0 +1,21 @@
+;
+; Note - if the database server is hosted on the same machine as the
+; asterisk server, you can achieve a local Unix socket connection by
+; setting hostname=localhost
+;
+; port and sock are both optional parameters. If hostname is specified
+; and is not "localhost", then cdr_mysql will attempt to connect to the
+; port specified or use the default port. If hostname is not specified
+; or if hostname is "localhost", then cdr_mysql will attempt to connect
+; to the socket file specified by sock or otherwise use the default socket
+; file.
+;
+;[global]
+;hostname=database.host.name
+;dbname=asteriskcdrdb
+;table=cdr
+;password=password
+;user=asteriskcdruser
+;port=3306
+;sock=/tmp/mysql.sock
+;userfield=1
diff -ruN asterisk-1.2.0-old/cdr/cdr_mysql.c asterisk-1.2.0-new/cdr/cdr_mysql.c
--- asterisk-1.2.0-old/cdr/cdr_mysql.c 1970-01-01 01:00:00.000000000 +0100
+++ asterisk-1.2.0-new/cdr/cdr_mysql.c 2005-12-04 20:10:59.000000000 +0100
@@ -0,0 +1,493 @@
+/*
+ * Asterisk -- A telephony toolkit for Linux.
+ *
+ * MySQL CDR logger
+ *
+ * James Sharp <jsharp@psychoses.org>
+ *
+ * Modified August 2003
+ * Tilghman Lesher <asterisk__cdr__cdr_mysql__200308@the-tilghman.com>
+ *
+ * Modified August 6, 2005
+ * Joseph Benden <joe@thrallingpenguin.com>
+ * Added mysql connection timeout parameter
+ * Added an automatic reconnect as to not lose a cdr record
+ * Cleaned up the original code to match the coding guidelines
+ *
+ * This program is free software, distributed under the terms of
+ * the GNU General Public License.
+ *
+ */
+
+#include <sys/types.h>
+
+#include <stdio.h>
+#include <string.h>
+
+#include <stdlib.h>
+#include <unistd.h>
+#include <time.h>
+
+#include <mysql.h>
+#include <errmsg.h>
+
+#include <sys/stat.h>
+#include <sys/types.h>
+#include <errno.h>
+
+#include <asterisk/config.h>
+#include <asterisk/options.h>
+#include <asterisk/channel.h>
+#include <asterisk/cdr.h>
+#include <asterisk/module.h>
+#include <asterisk/logger.h>
+#include <asterisk/cli.h>
+
+#define DATE_FORMAT "%Y-%m-%d %T"
+
+static char *desc = "MySQL CDR Backend";
+static char *name = "mysql";
+static char *config = "cdr_mysql.conf";
+static char *hostname = NULL, *dbname = NULL, *dbuser = NULL, *password = NULL, *dbsock = NULL, *dbtable = NULL;
+static int hostname_alloc = 0, dbname_alloc = 0, dbuser_alloc = 0, password_alloc = 0, dbsock_alloc = 0, dbtable_alloc = 0;
+static int dbport = 0;
+static int connected = 0;
+static time_t connect_time = 0;
+static int records = 0;
+static int totalrecords = 0;
+static int userfield = 0;
+static unsigned int timeout = 0;
+
+AST_MUTEX_DEFINE_STATIC(mysql_lock);
+
+static MYSQL mysql;
+
+static char cdr_mysql_status_help[] =
+"Usage: cdr mysql status\n"
+" Shows current connection status for cdr_mysql\n";
+
+static int handle_cdr_mysql_status(int fd, int argc, char *argv[])
+{
+ if (connected) {
+ char status[256], status2[100] = "";
+ int ctime = time(NULL) - connect_time;
+ if (dbport)
+ snprintf(status, 255, "Connected to %s@%s, port %d", dbname, hostname, dbport);
+ else if (dbsock)
+ snprintf(status, 255, "Connected to %s on socket file %s", dbname, dbsock);
+ else
+ snprintf(status, 255, "Connected to %s@%s", dbname, hostname);
+
+ if (dbuser && *dbuser)
+ snprintf(status2, 99, " with username %s", dbuser);
+ if (dbtable && *dbtable)
+ snprintf(status2, 99, " using table %s", dbtable);
+ if (ctime > 31536000) {
+ ast_cli(fd, "%s%s for %d years, %d days, %d hours, %d minutes, %d seconds.\n", status, status2, ctime / 31536000, (ctime % 31536000) / 86400, (ctime % 86400) / 3600, (ctime % 3600) / 60, ctime % 60);
+ } else if (ctime > 86400) {
+ ast_cli(fd, "%s%s for %d days, %d hours, %d minutes, %d seconds.\n", status, status2, ctime / 86400, (ctime % 86400) / 3600, (ctime % 3600) / 60, ctime % 60);
+ } else if (ctime > 3600) {
+ ast_cli(fd, "%s%s for %d hours, %d minutes, %d seconds.\n", status, status2, ctime / 3600, (ctime % 3600) / 60, ctime % 60);
+ } else if (ctime > 60) {
+ ast_cli(fd, "%s%s for %d minutes, %d seconds.\n", status, status2, ctime / 60, ctime % 60);
+ } else {
+ ast_cli(fd, "%s%s for %d seconds.\n", status, status2, ctime);
+ }
+ if (records == totalrecords)
+ ast_cli(fd, " Wrote %d records since last restart.\n", totalrecords);
+ else
+ ast_cli(fd, " Wrote %d records since last restart and %d records since last reconnect.\n", totalrecords, records);
+ return RESULT_SUCCESS;
+ } else {
+ ast_cli(fd, "Not currently connected to a MySQL server.\n");
+ return RESULT_FAILURE;
+ }
+}
+
+static struct ast_cli_entry cdr_mysql_status_cli =
+ { { "cdr", "mysql", "status", NULL },
+ handle_cdr_mysql_status, "Show connection status of cdr_mysql",
+ cdr_mysql_status_help, NULL };
+
+static int mysql_log(struct ast_cdr *cdr)
+{
+ struct tm tm;
+ struct timeval tv;
+ struct localuser *u;
+ char *userfielddata = NULL;
+ char sqlcmd[2048], timestr[128];
+ char *clid=NULL, *dcontext=NULL, *channel=NULL, *dstchannel=NULL, *lastapp=NULL, *lastdata=NULL;
+ int retries = 5;
+#ifdef MYSQL_LOGUNIQUEID
+ char *uniqueid = NULL;
+#endif
+
+ ast_mutex_lock(&mysql_lock);
+
+ memset(sqlcmd, 0, 2048);
+
+ localtime_r(&cdr->start.tv_sec, &tm);
+ strftime(timestr, 128, DATE_FORMAT, &tm);
+
+db_reconnect:
+ if ((!connected) && (hostname || dbsock) && dbuser && password && dbname && dbtable ) {
+ /* Attempt to connect */
+ mysql_init(&mysql);
+ /* Add option to quickly timeout the connection */
+ if (timeout && mysql_options(&mysql, MYSQL_OPT_CONNECT_TIMEOUT, (char *)&timeout)!=0) {
+ ast_log(LOG_ERROR, "cdr_mysql: mysql_options returned (%d) %s\n", mysql_errno(&mysql), mysql_error(&mysql));
+ }
+ if (mysql_real_connect(&mysql, hostname, dbuser, password, dbname, dbport, dbsock, 0)) {
+ connected = 1;
+ connect_time = time(NULL);
+ records = 0;
+ } else {
+ ast_log(LOG_ERROR, "cdr_mysql: cannot connect to database server %s.\n", hostname);
+ connected = 0;
+ }
+ } else {
+ /* Long connection - ping the server */
+ int error;
+ if ((error = mysql_ping(&mysql))) {
+ connected = 0;
+ records = 0;
+ switch (error) {
+ case CR_SERVER_GONE_ERROR:
+ case CR_SERVER_LOST:
+ ast_log(LOG_ERROR, "cdr_mysql: Server has gone away. Attempting to reconnect.\n");
+ break;
+ default:
+ ast_log(LOG_ERROR, "cdr_mysql: Unknown connection error: (%d) %s\n", mysql_errno(&mysql), mysql_error(&mysql));
+ }
+ retries--;
+ if (retries)
+ goto db_reconnect;
+ else
+ ast_log(LOG_ERROR, "cdr_mysql: Retried to connect fives times, giving up.\n");
+ }
+ }
+
+ /* Maximum space needed would be if all characters needed to be escaped, plus a trailing NULL */
+ /* WARNING: This code previously used mysql_real_escape_string, but the use of said function
+ requires an active connection to a database. If we are not connected, then this function
+ cannot be used. This is a problem since we need to store off the SQL statement into our
+ spool file for later restoration.
+ So the question is, what's the best way to handle this? This works for now.
+ */
+ if ((clid = alloca(strlen(cdr->clid) * 2 + 1)) != NULL)
+ mysql_escape_string(clid, cdr->clid, strlen(cdr->clid));
+ if ((dcontext = alloca(strlen(cdr->dcontext) * 2 + 1)) != NULL)
+ mysql_escape_string(dcontext, cdr->dcontext, strlen(cdr->dcontext));
+ if ((channel = alloca(strlen(cdr->channel) * 2 + 1)) != NULL)
+ mysql_escape_string(channel, cdr->channel, strlen(cdr->channel));
+ if ((dstchannel = alloca(strlen(cdr->dstchannel) * 2 + 1)) != NULL)
+ mysql_escape_string(dstchannel, cdr->dstchannel, strlen(cdr->dstchannel));
+ if ((lastapp = alloca(strlen(cdr->lastapp) * 2 + 1)) != NULL)
+ mysql_escape_string(lastapp, cdr->lastapp, strlen(cdr->lastapp));
+ if ((lastdata = alloca(strlen(cdr->lastdata) * 2 + 1)) != NULL)
+ mysql_escape_string(lastdata, cdr->lastdata, strlen(cdr->lastdata));
+#ifdef MYSQL_LOGUNIQUEID
+ if ((uniqueid = alloca(strlen(cdr->uniqueid) * 2 + 1)) != NULL)
+ mysql_escape_string(uniqueid, cdr->uniqueid, strlen(cdr->uniqueid));
+#endif
+ if (userfield && ((userfielddata = alloca(strlen(cdr->userfield) * 2 + 1)) != NULL))
+ mysql_escape_string(userfielddata, cdr->userfield, strlen(cdr->userfield));
+
+ /* Check for all alloca failures above at once */
+#ifdef MYSQL_LOGUNIQUEID
+ if ((!clid) || (!dcontext) || (!channel) || (!dstchannel) || (!lastapp) || (!lastdata) || (!uniqueid)) {
+#else
+ if ((!clid) || (!dcontext) || (!channel) || (!dstchannel) || (!lastapp) || (!lastdata)) {
+#endif
+ ast_log(LOG_ERROR, "cdr_mysql: Out of memory error (insert fails)\n");
+ ast_mutex_unlock(&mysql_lock);
+ return -1;
+ }
+
+ ast_log(LOG_DEBUG, "cdr_mysql: inserting a CDR record.\n");
+
+ if (userfield && userfielddata) {
+#ifdef MYSQL_LOGUNIQUEID
+ sprintf(sqlcmd, "INSERT INTO %s (calldate,clid,src,dst,dcontext,channel,dstchannel,lastapp,lastdata,duration,billsec,disposition,amaflags,accountcode,uniqueid,userfield) VALUES ('%s','%s','%s','%s','%s', '%s','%s','%s','%s',%i,%i,'%s',%i,'%s','%s','%s')", dbtable, timestr, clid, cdr->src, cdr->dst, dcontext, channel, dstchannel, lastapp, lastdata, cdr->duration, cdr->billsec, ast_cdr_disp2str(cdr->disposition), cdr->amaflags, cdr->accountcode, uniqueid, userfielddata);
+#else
+ sprintf(sqlcmd, "INSERT INTO %s (calldate,clid,src,dst,dcontext,channel,dstchannel,lastapp,lastdata,duration,billsec,disposition,amaflags,accountcode,userfield) VALUES ('%s','%s','%s','%s','%s', '%s','%s','%s','%s',%i,%i,'%s',%i,'%s','%s')", dbtable, timestr, clid, cdr->src, cdr->dst, dcontext,channel, dstchannel, lastapp, lastdata, cdr->duration, cdr->billsec, ast_cdr_disp2str(cdr->disposition), cdr->amaflags, cdr->accountcode, userfielddata);
+#endif
+ } else {
+#ifdef MYSQL_LOGUNIQUEID
+ sprintf(sqlcmd, "INSERT INTO %s (calldate,clid,src,dst,dcontext,channel,dstchannel,lastapp,lastdata,duration,billsec,disposition,amaflags,accountcode,uniqueid) VALUES ('%s','%s','%s','%s','%s', '%s','%s','%s','%s',%i,%i,'%s',%i,'%s','%s')", dbtable, timestr, clid, cdr->src, cdr->dst, dcontext,channel, dstchannel, lastapp, lastdata, cdr->duration, cdr->billsec, ast_cdr_disp2str(cdr->disposition), cdr->amaflags, cdr->accountcode, uniqueid);
+#else
+ sprintf(sqlcmd, "INSERT INTO %s (calldate,clid,src,dst,dcontext,channel,dstchannel,lastapp,lastdata,duration,billsec,disposition,amaflags,accountcode) VALUES ('%s','%s','%s','%s','%s', '%s','%s','%s','%s',%i,%i,'%s',%i,'%s')", dbtable, timestr, clid, cdr->src, cdr->dst, dcontext, channel, dstchannel, lastapp, lastdata, cdr->duration, cdr->billsec, ast_cdr_disp2str(cdr->disposition), cdr->amaflags, cdr->accountcode);
+#endif
+ }
+
+ ast_log(LOG_DEBUG, "cdr_mysql: SQL command as follows: %s\n", sqlcmd);
+
+ if (connected) {
+ if (mysql_real_query(&mysql, sqlcmd, strlen(sqlcmd))) {
+ ast_log(LOG_ERROR, "mysql_cdr: Failed to insert into database: (%d) %s", mysql_errno(&mysql), mysql_error(&mysql));
+ connected = 0;
+ } else {
+ records++;
+ totalrecords++;
+ }
+ }
+ ast_mutex_unlock(&mysql_lock);
+ return 0;
+}
+
+char *description(void)
+{
+ return desc;
+}
+
+static int my_unload_module(void)
+{
+ ast_cli_unregister(&cdr_mysql_status_cli);
+ if (connected) {
+ mysql_close(&mysql);
+ connected = 0;
+ records = 0;
+ }
+ if (hostname && hostname_alloc) {
+ free(hostname);
+ hostname = NULL;
+ hostname_alloc = 0;
+ }
+ if (dbname && dbname_alloc) {
+ free(dbname);
+ dbname = NULL;
+ dbname_alloc = 0;
+ }
+ if (dbuser && dbuser_alloc) {
+ free(dbuser);
+ dbuser = NULL;
+ dbuser_alloc = 0;
+ }
+ if (dbsock && dbsock_alloc) {
+ free(dbsock);
+ dbsock = NULL;
+ dbsock_alloc = 0;
+ }
+ if (dbtable && dbtable_alloc) {
+ free(dbtable);
+ dbtable = NULL;
+ dbtable_alloc = 0;
+ }
+ if (password && password_alloc) {
+ free(password);
+ password = NULL;
+ password_alloc = 0;
+ }
+ dbport = 0;
+ ast_cdr_unregister(name);
+ return 0;
+}
+
+static int my_load_module(void)
+{
+ int res;
+ struct ast_config *cfg;
+ struct ast_variable *var;
+ char *tmp;
+
+ cfg = ast_config_load(config);
+ if (!cfg) {
+ ast_log(LOG_WARNING, "Unable to load config for mysql CDR's: %s\n", config);
+ return 0;
+ }
+
+ var = ast_variable_browse(cfg, "global");
+ if (!var) {
+ /* nothing configured */
+ return 0;
+ }
+
+ tmp = ast_variable_retrieve(cfg, "global", "hostname");
+ if (tmp) {
+ hostname = malloc(strlen(tmp) + 1);
+ if (hostname != NULL) {
+ hostname_alloc = 1;
+ strcpy(hostname, tmp);
+ } else {
+ ast_log(LOG_ERROR, "Out of memory error.\n");
+ return -1;
+ }
+ } else {
+ ast_log(LOG_WARNING, "MySQL server hostname not specified. Assuming localhost\n");
+ hostname = "localhost";
+ }
+
+ tmp = ast_variable_retrieve(cfg, "global", "dbname");
+ if (tmp) {
+ dbname = malloc(strlen(tmp) + 1);
+ if (dbname != NULL) {
+ dbname_alloc = 1;
+ strcpy(dbname, tmp);
+ } else {
+ ast_log(LOG_ERROR, "Out of memory error.\n");
+ return -1;
+ }
+ } else {
+ ast_log(LOG_WARNING, "MySQL database not specified. Assuming asteriskcdrdb\n");
+ dbname = "asteriskcdrdb";
+ }
+
+ tmp = ast_variable_retrieve(cfg, "global", "user");
+ if (tmp) {
+ dbuser = malloc(strlen(tmp) + 1);
+ if (dbuser != NULL) {
+ dbuser_alloc = 1;
+ strcpy(dbuser, tmp);
+ } else {
+ ast_log(LOG_ERROR, "Out of memory error.\n");
+ return -1;
+ }
+ } else {
+ ast_log(LOG_WARNING, "MySQL database user not specified. Assuming root\n");
+ dbuser = "root";
+ }
+
+ tmp = ast_variable_retrieve(cfg, "global", "sock");
+ if (tmp) {
+ dbsock = malloc(strlen(tmp) + 1);
+ if (dbsock != NULL) {
+ dbsock_alloc = 1;
+ strcpy(dbsock, tmp);
+ } else {
+ ast_log(LOG_ERROR, "Out of memory error.\n");
+ return -1;
+ }
+ } else {
+ ast_log(LOG_WARNING, "MySQL database sock file not specified. Using default\n");
+ dbsock = NULL;
+ }
+
+ tmp = ast_variable_retrieve(cfg, "global", "table");
+ if (tmp) {
+ dbtable = malloc(strlen(tmp) + 1);
+ if (dbtable != NULL) {
+ dbtable_alloc = 1;
+ strcpy(dbtable, tmp);
+ } else {
+ ast_log(LOG_ERROR, "Out of memory error.\n");
+ return -1;
+ }
+ } else {
+ ast_log(LOG_NOTICE, "MySQL database table not specified. Assuming \"cdr\"\n");
+ dbtable = "cdr";
+ }
+
+ tmp = ast_variable_retrieve(cfg, "global", "password");
+ if (tmp) {
+ password = malloc(strlen(tmp) + 1);
+ if (password != NULL) {
+ password_alloc = 1;
+ strcpy(password, tmp);
+ } else {
+ ast_log(LOG_ERROR, "Out of memory error.\n");
+ return -1;
+ }
+ } else {
+ ast_log(LOG_WARNING, "MySQL database password not specified. Assuming blank\n");
+ password = "";
+ }
+
+ tmp = ast_variable_retrieve(cfg, "global", "port");
+ if (tmp) {
+ if (sscanf(tmp, "%d", &dbport) < 1) {
+ ast_log(LOG_WARNING, "Invalid MySQL port number. Using default\n");
+ dbport = 0;
+ }
+ }
+
+ tmp = ast_variable_retrieve(cfg, "global", "timeout");
+ if (tmp) {
+ if (sscanf(tmp,"%d", &timeout) < 1) {
+ ast_log(LOG_WARNING, "Invalid MySQL timeout number. Using default\n");
+ timeout = 0;
+ }
+ }
+
+ tmp = ast_variable_retrieve(cfg, "global", "userfield");
+ if (tmp) {
+ if (sscanf(tmp, "%d", &userfield) < 1) {
+ ast_log(LOG_WARNING, "Invalid MySQL configurtation file\n");
+ userfield = 0;
+ }
+ }
+
+ ast_config_destroy(cfg);
+
+ ast_log(LOG_DEBUG, "cdr_mysql: got hostname of %s\n", hostname);
+ ast_log(LOG_DEBUG, "cdr_mysql: got port of %d\n", dbport);
+ ast_log(LOG_DEBUG, "cdr_mysql: got a timeout of %d\n", timeout);
+ if (dbsock)
+ ast_log(LOG_DEBUG, "cdr_mysql: got sock file of %s\n", dbsock);
+ ast_log(LOG_DEBUG, "cdr_mysql: got user of %s\n", dbuser);
+ ast_log(LOG_DEBUG, "cdr_mysql: got dbname of %s\n", dbname);
+ ast_log(LOG_DEBUG, "cdr_mysql: got password of %s\n", password);
+
+ mysql_init(&mysql);
+
+ if (timeout && mysql_options(&mysql, MYSQL_OPT_CONNECT_TIMEOUT, (char *)&timeout)!=0) {
+ ast_log(LOG_ERROR, "cdr_mysql: mysql_options returned (%d) %s\n", mysql_errno(&mysql), mysql_error(&mysql));
+ }
+
+ if (!mysql_real_connect(&mysql, hostname, dbuser, password, dbname, dbport, dbsock, 0)) {
+ ast_log(LOG_ERROR, "Failed to connect to mysql database %s on %s.\n", dbname, hostname);
+ connected = 0;
+ records = 0;
+ } else {
+ ast_log(LOG_DEBUG, "Successfully connected to MySQL database.\n");
+ connected = 1;
+ records = 0;
+ connect_time = time(NULL);
+ }
+
+ res = ast_cdr_register(name, desc, mysql_log);
+ if (res) {
+ ast_log(LOG_ERROR, "Unable to register MySQL CDR handling\n");
+ } else {
+ res = ast_cli_register(&cdr_mysql_status_cli);
+ }
+
+ return res;
+}
+
+int load_module(void)
+{
+ return my_load_module();
+}
+
+int unload_module(void)
+{
+ return my_unload_module();
+}
+
+int reload(void)
+{
+ int ret;
+
+ ast_mutex_lock(&mysql_lock);
+ my_unload_module();
+ ret = my_load_module();
+ ast_mutex_unlock(&mysql_lock);
+
+ return ret;
+}
+
+int usecount(void)
+{
+ /* Simplistic use count */
+ if (ast_mutex_trylock(&mysql_lock)) {
+ return 1;
+ } else {
+ ast_mutex_unlock(&mysql_lock);
+ return 0;
+ }
+}
+
+char *key()
+{
+ return ASTERISK_GPL_KEY;
+}

View File

@ -1,11 +0,0 @@
diff -ruN asterisk-1.2.0-old/channels/chan_bluetooth.c asterisk-1.2.0-new/channels/chan_bluetooth.c
--- asterisk-1.2.0-old/channels/chan_bluetooth.c 2005-12-04 04:48:40.000000000 +0100
+++ asterisk-1.2.0-new/channels/chan_bluetooth.c 2005-12-04 23:07:19.000000000 +0100
@@ -104,6 +104,7 @@
#include <asterisk/options.h>
#include <asterisk/cli.h>
#include <asterisk/callerid.h>
+#include <asterisk/version.h>
#include <sys/socket.h>
#include <sys/signal.h>
#include <sys/time.h>

View File

@ -1,13 +0,0 @@
diff -ruN asterisk-1.2.0-old/include/asterisk/compat.h asterisk-1.2.0-new/include/asterisk/compat.h
--- asterisk-1.2.0-old/include/asterisk/compat.h 2005-11-08 05:13:19.000000000 +0100
+++ asterisk-1.2.0-new/include/asterisk/compat.h 2005-12-04 05:32:31.000000000 +0100
@@ -75,7 +75,9 @@
#define HAVE_STRTOQ
#ifdef _BSD_SOURCE
+#ifndef __UCLIBC__
#define HAVE_GETLOADAVG
+#endif /* __UCLIBC__ */
#endif
#ifdef __linux__

View File

@ -1,698 +0,0 @@
diff -ruN asterisk-1.2.0-old/configs/res_mysql.conf.sample asterisk-1.2.0-new/configs/res_mysql.conf.sample
--- asterisk-1.2.0-old/configs/res_mysql.conf.sample 1970-01-01 01:00:00.000000000 +0100
+++ asterisk-1.2.0-new/configs/res_mysql.conf.sample 2004-12-03 15:33:44.000000000 +0100
@@ -0,0 +1,15 @@
+;
+; Sample configuration for res_config_mysql.c
+;
+; The value of dbhost may be either a hostname or an IP address.
+; If dbhost is commented out or the string "localhost", a connection
+; to the local host is assumed and dbsock is used instead of TCP/IP
+; to connect to the server.
+;
+[general]
+;dbhost = 127.0.0.1
+;dbname = asterisk
+;dbuser = myuser
+;dbpass = mypass
+;dbport = 3306
+;dbsock = /tmp/mysql.sock
diff -ruN asterisk-1.2.0-old/res/res_config_mysql.c asterisk-1.2.0-new/res/res_config_mysql.c
--- asterisk-1.2.0-old/res/res_config_mysql.c 1970-01-01 01:00:00.000000000 +0100
+++ asterisk-1.2.0-new/res/res_config_mysql.c 2005-10-13 21:43:54.000000000 +0200
@@ -0,0 +1,675 @@
+/*
+ * Asterisk -- A telephony toolkit for Linux.
+ *
+ * Copyright (C) 1999-2005, Digium, Inc.
+ *
+ * Mark Spencer <markster@digium.com> - Asterisk Author
+ * Matthew Boehm <mboehm@cytelcom.com> - MySQL RealTime Driver Author
+ *
+ * res_config_mysql.c <mysql plugin for RealTime configuration engine>
+ *
+ * v2.0 - (10-07-05) - mutex_lock fixes (bug #4973, comment #0034602)
+ *
+ * v1.9 - (08-19-05) - Added support to correctly honor the family database specified
+ * in extconfig.conf (bug #4973)
+ *
+ * v1.8 - (04-21-05) - Modified return values of update_mysql to better indicate
+ * what really happened.
+ *
+ * v1.7 - (01-28-05) - Fixed non-initialization of ast_category struct
+ * in realtime_multi_mysql function which caused segfault.
+ *
+ * v1.6 - (00-00-00) - Skipped to bring comments into sync with version number in CVS.
+ *
+ * v1.5.1 - (01-26-05) - Added better(?) locking stuff
+ *
+ * v1.5 - (01-26-05) - Brought up to date with new config.h changes (bug #3406)
+ * - Added in extra locking provided by georg (bug #3248)
+ *
+ * v1.4 - (12-02-04) - Added realtime_multi_mysql function
+ * This function will return an ast_config with categories,
+ * unlike standard realtime_mysql which only returns
+ * a linked list of ast_variables
+ *
+ * v1.3 - (12-01-04) - Added support other operators
+ * Ex: =, !=, LIKE, NOT LIKE, RLIKE, etc...
+ *
+ * v1.2 - (11-DD-04) - Added reload. Updated load and unload.
+ * Code beautification (doc/CODING-GUIDELINES)
+ */
+
+#include <asterisk/channel.h>
+#include <asterisk/logger.h>
+#include <asterisk/config.h>
+#include <asterisk/module.h>
+#include <asterisk/lock.h>
+#include <asterisk/options.h>
+#include <asterisk/cli.h>
+#include <asterisk/utils.h>
+#include <stdlib.h>
+#include <string.h>
+#include <mysql.h>
+#include <mysql_version.h>
+#include <errmsg.h>
+
+static char *res_config_mysql_desc = "MySQL RealTime Configuration Driver";
+
+AST_MUTEX_DEFINE_STATIC(mysql_lock);
+#define RES_CONFIG_MYSQL_CONF "res_mysql.conf"
+MYSQL mysql;
+static char dbhost[50];
+static char dbuser[50];
+static char dbpass[50];
+static char dbname[50];
+static char dbsock[50];
+static int dbport;
+static int connected;
+static time_t connect_time;
+
+static int parse_config(void);
+static int mysql_reconnect(const char *database);
+static int realtime_mysql_status(int fd, int argc, char **argv);
+
+STANDARD_LOCAL_USER;
+
+LOCAL_USER_DECL;
+
+static char cli_realtime_mysql_status_usage[] =
+"Usage: realtime mysql status\n"
+" Shows connection information for the MySQL RealTime driver\n";
+
+static struct ast_cli_entry cli_realtime_mysql_status = {
+ { "realtime", "mysql", "status", NULL }, realtime_mysql_status,
+ "Shows connection information for the MySQL RealTime driver", cli_realtime_mysql_status_usage, NULL };
+
+static struct ast_variable *realtime_mysql(const char *database, const char *table, va_list ap)
+{
+ MYSQL_RES *result;
+ MYSQL_ROW row;
+ MYSQL_FIELD *fields;
+ int numFields, i;
+ char sql[256];
+ char *stringp;
+ char *chunk;
+ char *op;
+ const char *newparam, *newval;
+ struct ast_variable *var=NULL, *prev=NULL;
+
+ if(!table) {
+ ast_log(LOG_WARNING, "MySQL RealTime: No table specified.\n");
+ return NULL;
+ }
+
+ /* Get the first parameter and first value in our list of passed paramater/value pairs */
+ newparam = va_arg(ap, const char *);
+ newval = va_arg(ap, const char *);
+ if(!newparam || !newval) {
+ ast_log(LOG_WARNING, "MySQL RealTime: Realtime retrieval requires at least 1 parameter and 1 value to search on.\n");
+ mysql_close(&mysql);
+ return NULL;
+ }
+
+ /* Create the first part of the query using the first parameter/value pairs we just extracted
+ If there is only 1 set, then we have our query. Otherwise, loop thru the list and concat */
+
+ if(!strchr(newparam, ' ')) op = " ="; else op = "";
+
+ snprintf(sql, sizeof(sql), "SELECT * FROM %s WHERE %s%s '%s'", table, newparam, op, newval);
+ while((newparam = va_arg(ap, const char *))) {
+ newval = va_arg(ap, const char *);
+ if(!strchr(newparam, ' ')) op = " ="; else op = "";
+ snprintf(sql + strlen(sql), sizeof(sql) - strlen(sql), " AND %s%s '%s'", newparam, op, newval);
+ }
+ va_end(ap);
+
+ ast_log(LOG_DEBUG, "MySQL RealTime: Retrieve SQL: %s\n", sql);
+
+ /* We now have our complete statement; Lets connect to the server and execute it. */
+ ast_mutex_lock(&mysql_lock);
+ if(!mysql_reconnect(database)) {
+ ast_mutex_unlock(&mysql_lock);
+ return NULL;
+ }
+
+ if(mysql_real_query(&mysql, sql, strlen(sql))) {
+ ast_log(LOG_WARNING, "MySQL RealTime: Failed to query database. Check debug for more info.\n");
+ ast_log(LOG_DEBUG, "MySQL RealTime: Query: %s\n", sql);
+ ast_log(LOG_DEBUG, "MySQL RealTime: Query Failed because: %s\n", mysql_error(&mysql));
+ ast_mutex_unlock(&mysql_lock);
+ return NULL;
+ }
+
+ if((result = mysql_store_result(&mysql))) {
+ numFields = mysql_num_fields(result);
+ fields = mysql_fetch_fields(result);
+
+ while((row = mysql_fetch_row(result))) {
+ for(i = 0; i < numFields; i++) {
+ stringp = row[i];
+ while(stringp) {
+ chunk = strsep(&stringp, ";");
+ if(chunk && !ast_strlen_zero(ast_strip(chunk))) {
+ if(prev) {
+ prev->next = ast_variable_new(fields[i].name, chunk);
+ if (prev->next) {
+ prev = prev->next;
+ }
+ } else {
+ prev = var = ast_variable_new(fields[i].name, chunk);
+ }
+ }
+ }
+ }
+ }
+ } else {
+ ast_log(LOG_WARNING, "MySQL RealTime: Could not find any rows in table %s.\n", table);
+ }
+
+ ast_mutex_unlock(&mysql_lock);
+ mysql_free_result(result);
+
+ return var;
+}
+
+static struct ast_config *realtime_multi_mysql(const char *database, const char *table, va_list ap)
+{
+ MYSQL_RES *result;
+ MYSQL_ROW row;
+ MYSQL_FIELD *fields;
+ int numFields, i;
+ char sql[256];
+ const char *initfield = NULL;
+ char *stringp;
+ char *chunk;
+ char *op;
+ const char *newparam, *newval;
+ struct ast_realloca ra;
+ struct ast_variable *var=NULL;
+ struct ast_config *cfg = NULL;
+ struct ast_category *cat = NULL;
+
+ if(!table) {
+ ast_log(LOG_WARNING, "MySQL RealTime: No table specified.\n");
+ return NULL;
+ }
+
+ memset(&ra, 0, sizeof(ra));
+
+ cfg = ast_config_new();
+ if (!cfg) {
+ /* If I can't alloc memory at this point, why bother doing anything else? */
+ ast_log(LOG_WARNING, "Out of memory!\n");
+ return NULL;
+ }
+
+ /* Get the first parameter and first value in our list of passed paramater/value pairs */
+ newparam = va_arg(ap, const char *);
+ newval = va_arg(ap, const char *);
+ if(!newparam || !newval) {
+ ast_log(LOG_WARNING, "MySQL RealTime: Realtime retrieval requires at least 1 parameter and 1 value to search on.\n");
+ mysql_close(&mysql);
+ return NULL;
+ }
+
+ initfield = ast_strdupa(newparam);
+ if(initfield && (op = strchr(initfield, ' '))) {
+ *op = '\0';
+ }
+
+ /* Create the first part of the query using the first parameter/value pairs we just extracted
+ If there is only 1 set, then we have our query. Otherwise, loop thru the list and concat */
+
+ if(!strchr(newparam, ' ')) op = " ="; else op = "";
+
+ snprintf(sql, sizeof(sql), "SELECT * FROM %s WHERE %s%s '%s'", table, newparam, op, newval);
+ while((newparam = va_arg(ap, const char *))) {
+ newval = va_arg(ap, const char *);
+ if(!strchr(newparam, ' ')) op = " ="; else op = "";
+ snprintf(sql + strlen(sql), sizeof(sql) - strlen(sql), " AND %s%s '%s'", newparam, op, newval);
+ }
+
+ if(initfield) {
+ snprintf(sql + strlen(sql), sizeof(sql) - strlen(sql), " ORDER BY %s", initfield);
+ }
+
+ va_end(ap);
+
+ ast_log(LOG_DEBUG, "MySQL RealTime: Retrieve SQL: %s\n", sql);
+
+ /* We now have our complete statement; Lets connect to the server and execute it. */
+ ast_mutex_lock(&mysql_lock);
+ if(!mysql_reconnect(database)) {
+ ast_mutex_unlock(&mysql_lock);
+ return NULL;
+ }
+
+ if(mysql_real_query(&mysql, sql, strlen(sql))) {
+ ast_log(LOG_WARNING, "MySQL RealTime: Failed to query database. Check debug for more info.\n");
+ ast_log(LOG_DEBUG, "MySQL RealTime: Query: %s\n", sql);
+ ast_log(LOG_DEBUG, "MySQL RealTime: Query Failed because: %s\n", mysql_error(&mysql));
+ ast_mutex_unlock(&mysql_lock);
+ return NULL;
+ }
+
+ if((result = mysql_store_result(&mysql))) {
+ numFields = mysql_num_fields(result);
+ fields = mysql_fetch_fields(result);
+
+ while((row = mysql_fetch_row(result))) {
+ var = NULL;
+ cat = ast_category_new("");
+ if(!cat) {
+ ast_log(LOG_WARNING, "Out of memory!\n");
+ continue;
+ }
+ for(i = 0; i < numFields; i++) {
+ stringp = row[i];
+ while(stringp) {
+ chunk = strsep(&stringp, ";");
+ if(chunk && !ast_strlen_zero(ast_strip(chunk))) {
+ if(initfield && !strcmp(initfield, fields[i].name)) {
+ ast_category_rename(cat, chunk);
+ }
+ var = ast_variable_new(fields[i].name, chunk);
+ ast_variable_append(cat, var);
+ }
+ }
+ }
+ ast_category_append(cfg, cat);
+ }
+ } else {
+ ast_log(LOG_WARNING, "MySQL RealTime: Could not find any rows in table %s.\n", table);
+ }
+
+ ast_mutex_unlock(&mysql_lock);
+ mysql_free_result(result);
+
+ return cfg;
+}
+
+static int update_mysql(const char *database, const char *table, const char *keyfield, const char *lookup, va_list ap)
+{
+ my_ulonglong numrows;
+ char sql[256];
+ const char *newparam, *newval;
+
+ if(!table) {
+ ast_log(LOG_WARNING, "MySQL RealTime: No table specified.\n");
+ return -1;
+ }
+
+ /* Get the first parameter and first value in our list of passed paramater/value pairs */
+ newparam = va_arg(ap, const char *);
+ newval = va_arg(ap, const char *);
+ if(!newparam || !newval) {
+ ast_log(LOG_WARNING, "MySQL RealTime: Realtime retrieval requires at least 1 parameter and 1 value to search on.\n");
+ mysql_close(&mysql);
+ return -1;
+ }
+
+ /* Create the first part of the query using the first parameter/value pairs we just extracted
+ If there is only 1 set, then we have our query. Otherwise, loop thru the list and concat */
+
+ snprintf(sql, sizeof(sql), "UPDATE %s SET %s = '%s'", table, newparam, newval);
+ while((newparam = va_arg(ap, const char *))) {
+ newval = va_arg(ap, const char *);
+ snprintf(sql + strlen(sql), sizeof(sql) - strlen(sql), ", %s = '%s'", newparam, newval);
+ }
+ va_end(ap);
+ snprintf(sql + strlen(sql), sizeof(sql) - strlen(sql), " WHERE %s = '%s'", keyfield, lookup);
+
+ ast_log(LOG_DEBUG,"MySQL RealTime: Update SQL: %s\n", sql);
+
+ /* We now have our complete statement; Lets connect to the server and execute it. */
+ ast_mutex_lock(&mysql_lock);
+ if(!mysql_reconnect(database)) {
+ ast_mutex_unlock(&mysql_lock);
+ return -1;
+ }
+
+ if(mysql_real_query(&mysql, sql, strlen(sql))) {
+ ast_log(LOG_WARNING, "MySQL RealTime: Failed to query database. Check debug for more info.\n");
+ ast_log(LOG_DEBUG, "MySQL RealTime: Query: %s\n", sql);
+ ast_log(LOG_DEBUG, "MySQL RealTime: Query Failed because: %s\n", mysql_error(&mysql));
+ ast_mutex_unlock(&mysql_lock);
+ return -1;
+ }
+
+ numrows = mysql_affected_rows(&mysql);
+ ast_mutex_unlock(&mysql_lock);
+
+ ast_log(LOG_DEBUG,"MySQL RealTime: Updated %llu rows on table: %s\n", numrows, table);
+
+ /* From http://dev.mysql.com/doc/mysql/en/mysql-affected-rows.html
+ * An integer greater than zero indicates the number of rows affected
+ * Zero indicates that no records were updated
+ * -1 indicates that the query returned an error (although, if the query failed, it should have been caught above.)
+ */
+
+ if(numrows >= 0)
+ return (int)numrows;
+
+ return -1;
+}
+
+static struct ast_config *config_mysql(const char *database, const char *table, const char *file, struct ast_config *cfg)
+{
+ MYSQL_RES *result;
+ MYSQL_ROW row;
+ my_ulonglong num_rows;
+ struct ast_config *new;
+ struct ast_variable *cur_v, *new_v;
+ struct ast_category *cur_cat, *new_cat;
+ char sql[250] = "";
+ char last[80] = "";
+ int cat_started = 0;
+ int var_started = 0;
+ int last_cat_metric = 0;
+
+ last[0] = '\0';
+
+ if(!file || !strcmp(file, RES_CONFIG_MYSQL_CONF)) {
+ ast_log(LOG_WARNING, "MySQL RealTime: Cannot configure myself.\n");
+ return NULL;
+ }
+
+ snprintf(sql, sizeof(sql), "SELECT category, var_name, var_val, cat_metric FROM %s WHERE filename='%s' and commented=0 ORDER BY filename, cat_metric desc, var_metric asc, category, var_name, var_val, id", table, file);
+
+ ast_log(LOG_DEBUG, "MySQL RealTime: Static SQL: %s\n", sql);
+
+ /* We now have our complete statement; Lets connect to the server and execute it. */
+ ast_mutex_lock(&mysql_lock);
+ if(!mysql_reconnect(database)) {
+ ast_mutex_unlock(&mysql_lock);
+ return NULL;
+ }
+
+ if(mysql_real_query(&mysql, sql, strlen(sql))) {
+ ast_log(LOG_WARNING, "MySQL RealTime: Failed to query database. Check debug for more info.\n");
+ ast_log(LOG_DEBUG, "MySQL RealTime: Query: %s\n", sql);
+ ast_log(LOG_DEBUG, "MySQL RealTime: Query Failed because: %s\n", mysql_error(&mysql));
+ ast_mutex_unlock(&mysql_lock);
+ return NULL;
+ }
+
+ if((result = mysql_store_result(&mysql))) {
+ num_rows = mysql_num_rows(result);
+ ast_log(LOG_DEBUG, "MySQL RealTime: Found %llu rows.\n", num_rows);
+
+ /* There might exist a better way to access the column names other than counting,
+ but I believe that would require another loop that we don't need. */
+
+ while((row = mysql_fetch_row(result))) {
+ if(!strcmp(row[1], "#include")) {
+ if (!ast_config_internal_load(row[2], cfg)) {
+ mysql_free_result(result);
+ ast_mutex_unlock(&mysql_lock);
+ return NULL;
+ }
+ continue;
+ }
+
+ if(strcmp(last, row[0]) || last_cat_metric != atoi(row[3])) {
+ cur_cat = ast_category_new(row[0]);
+ if (!cur_cat) {
+ ast_log(LOG_WARNING, "Out of memory!\n");
+ break;
+ }
+ strcpy(last, row[0]);
+ last_cat_metric = atoi(row[3]);
+ ast_category_append(cfg, cur_cat);
+ }
+ new_v = ast_variable_new(row[1], row[2]);
+ ast_variable_append(cur_cat, new_v);
+ }
+ } else {
+ ast_log(LOG_WARNING, "MySQL RealTime: Could not find config '%s' in database.\n", file);
+ }
+
+ mysql_free_result(result);
+ ast_mutex_unlock(&mysql_lock);
+
+ return cfg;
+}
+
+static struct ast_config_engine mysql_engine = {
+ .name = "mysql",
+ .load_func = config_mysql,
+ .realtime_func = realtime_mysql,
+ .realtime_multi_func = realtime_multi_mysql,
+ .update_func = update_mysql
+};
+
+int load_module (void)
+{
+ parse_config();
+
+ ast_mutex_lock(&mysql_lock);
+
+ if(!mysql_reconnect(NULL)) {
+ ast_log(LOG_WARNING, "MySQL RealTime: Couldn't establish connection. Check debug.\n");
+ ast_log(LOG_DEBUG, "MySQL RealTime: Cannot Connect: %s\n", mysql_error(&mysql));
+ }
+
+ ast_config_engine_register(&mysql_engine);
+ if(option_verbose) {
+ ast_verbose("MySQL RealTime driver loaded.\n");
+ }
+ ast_cli_register(&cli_realtime_mysql_status);
+
+ ast_mutex_unlock(&mysql_lock);
+
+ return 0;
+}
+
+int unload_module (void)
+{
+ /* Aquire control before doing anything to the module itself. */
+ ast_mutex_lock(&mysql_lock);
+
+ mysql_close(&mysql);
+ ast_cli_unregister(&cli_realtime_mysql_status);
+ ast_config_engine_deregister(&mysql_engine);
+ if(option_verbose) {
+ ast_verbose("MySQL RealTime unloaded.\n");
+ }
+
+ STANDARD_HANGUP_LOCALUSERS;
+
+ /* Unlock so something else can destroy the lock. */
+ ast_mutex_unlock(&mysql_lock);
+
+ return 0;
+}
+
+int reload (void)
+{
+ /* Aquire control before doing anything to the module itself. */
+ ast_mutex_lock(&mysql_lock);
+
+ mysql_close(&mysql);
+ connected = 0;
+ parse_config();
+
+ if(!mysql_reconnect(NULL)) {
+ ast_log(LOG_WARNING, "MySQL RealTime: Couldn't establish connection. Check debug.\n");
+ ast_log(LOG_DEBUG, "MySQL RealTime: Cannot Connect: %s\n", mysql_error(&mysql));
+ }
+
+ ast_verbose(VERBOSE_PREFIX_2 "MySQL RealTime reloaded.\n");
+
+ /* Done reloading. Release lock so others can now use driver. */
+ ast_mutex_unlock(&mysql_lock);
+
+ return 0;
+}
+
+int parse_config (void)
+{
+ struct ast_config *config;
+ char *s;
+
+ config = ast_config_load(RES_CONFIG_MYSQL_CONF);
+
+ if(config) {
+ if(!(s=ast_variable_retrieve(config, "general", "dbuser"))) {
+ ast_log(LOG_WARNING, "MySQL RealTime: No database user found, using 'asterisk' as default.\n");
+ strncpy(dbuser, "asterisk", sizeof(dbuser) - 1);
+ } else {
+ strncpy(dbuser, s, sizeof(dbuser) - 1);
+ }
+
+ if(!(s=ast_variable_retrieve(config, "general", "dbpass"))) {
+ ast_log(LOG_WARNING, "MySQL RealTime: No database password found, using 'asterisk' as default.\n");
+ strncpy(dbpass, "asterisk", sizeof(dbpass) - 1);
+ } else {
+ strncpy(dbpass, s, sizeof(dbpass) - 1);
+ }
+
+ if(!(s=ast_variable_retrieve(config, "general", "dbhost"))) {
+ ast_log(LOG_WARNING, "MySQL RealTime: No database host found, using localhost via socket.\n");
+ dbhost[0] = '\0';
+ } else {
+ strncpy(dbhost, s, sizeof(dbhost) - 1);
+ }
+
+ if(!(s=ast_variable_retrieve(config, "general", "dbname"))) {
+ ast_log(LOG_WARNING, "MySQL RealTime: No database name found, using 'asterisk' as default.\n");
+ strncpy(dbname, "asterisk", sizeof(dbname) - 1);
+ } else {
+ strncpy(dbname, s, sizeof(dbname) - 1);
+ }
+
+ if(!(s=ast_variable_retrieve(config, "general", "dbport"))) {
+ ast_log(LOG_WARNING, "MySQL RealTime: No database port found, using 3306 as default.\n");
+ dbport = 3306;
+ } else {
+ dbport = atoi(s);
+ }
+
+ if(dbhost && !(s=ast_variable_retrieve(config, "general", "dbsock"))) {
+ ast_log(LOG_WARNING, "MySQL RealTime: No database socket found, using '/tmp/mysql.sock' as default.\n");
+ strncpy(dbsock, "/tmp/mysql.sock", sizeof(dbsock) - 1);
+ } else {
+ strncpy(dbsock, s, sizeof(dbsock) - 1);
+ }
+ }
+ ast_config_destroy(config);
+
+ if(dbhost) {
+ ast_log(LOG_DEBUG, "MySQL RealTime Host: %s\n", dbhost);
+ ast_log(LOG_DEBUG, "MySQL RealTime Port: %i\n", dbport);
+ } else {
+ ast_log(LOG_DEBUG, "MySQL RealTime Socket: %s\n", dbsock);
+ }
+ ast_log(LOG_DEBUG, "MySQL RealTime User: %s\n", dbuser);
+ ast_log(LOG_DEBUG, "MySQL RealTime Password: %s\n", dbpass);
+
+ return 1;
+}
+
+char *description (void)
+{
+ return res_config_mysql_desc;
+}
+
+int usecount (void)
+{
+ /* Try and get a lock. If unsuccessful, than that means another thread is using the mysql object. */
+ if(ast_mutex_trylock(&mysql_lock)) {
+ ast_log(LOG_DEBUG, "MySQL RealTime: Module usage count is 1.\n");
+ return 1;
+ }
+ ast_mutex_unlock(&mysql_lock);
+ return 0;
+}
+
+char *key ()
+{
+ return ASTERISK_GPL_KEY;
+}
+
+static int mysql_reconnect(const char *database)
+{
+ char my_database[50];
+
+ if(!database || ast_strlen_zero(database))
+ ast_copy_string(my_database, dbname, sizeof(my_database));
+ else
+ ast_copy_string(my_database, database, sizeof(my_database));
+
+ /* mutex lock should have been locked before calling this function. */
+
+ if((!connected) && (dbhost || dbsock) && dbuser && dbpass && my_database) {
+ if(!mysql_init(&mysql)) {
+ ast_log(LOG_WARNING, "MySQL RealTime: Insufficient memory to allocate MySQL resource.\n");
+ connected = 0;
+ return 0;
+ }
+ if(mysql_real_connect(&mysql, dbhost, dbuser, dbpass, my_database, dbport, dbsock, 0)) {
+ ast_log(LOG_DEBUG, "MySQL RealTime: Successfully connected to database.\n");
+ connected = 1;
+ connect_time = time(NULL);
+ return 1;
+ } else {
+ ast_log(LOG_ERROR, "MySQL RealTime: Failed to connect database server %s on %s. Check debug for more info.\n", dbname, dbhost);
+ ast_log(LOG_DEBUG, "MySQL RealTime: Cannot Connect: %s\n", mysql_error(&mysql));
+ connected = 0;
+ return 0;
+ }
+ } else {
+ if(mysql_ping(&mysql) != 0) {
+ connected = 0;
+ ast_log(LOG_ERROR, "MySQL RealTime: Failed to reconnect. Check debug for more info.\n");
+ ast_log(LOG_DEBUG, "MySQL RealTime: Server Error: %s\n", mysql_error(&mysql));
+ return 0;
+ }
+
+ connected = 1;
+
+ if(mysql_select_db(&mysql, my_database) != 0) {
+ ast_log(LOG_WARNING, "MySQL RealTime: Unable to select database: %s. Still Connected.\n", my_database);
+ ast_log(LOG_DEBUG, "MySQL RealTime: Database Select Failed: %s\n", mysql_error(&mysql));
+ return 0;
+ }
+
+ ast_log(LOG_DEBUG, "MySQL RealTime: Everything is fine.\n");
+ return 1;
+ }
+}
+
+static int realtime_mysql_status(int fd, int argc, char **argv)
+{
+ char status[256], status2[100] = "";
+ int ctime = time(NULL) - connect_time;
+
+ if(mysql_reconnect(NULL)) {
+ if(dbhost) {
+ snprintf(status, 255, "Connected to %s@%s, port %d", dbname, dbhost, dbport);
+ } else if(dbsock) {
+ snprintf(status, 255, "Connected to %s on socket file %s", dbname, dbsock);
+ } else {
+ snprintf(status, 255, "Connected to %s@%s", dbname, dbhost);
+ }
+
+ if(dbuser && *dbuser) {
+ snprintf(status2, 99, " with username %s", dbuser);
+ }
+
+ if (ctime > 31536000) {
+ ast_cli(fd, "%s%s for %d years, %d days, %d hours, %d minutes, %d seconds.\n", status, status2, ctime / 31536000, (ctime % 31536000) / 86400, (ctime % 86400) / 3600, (ctime % 3600) / 60, ctime % 60);
+ } else if (ctime > 86400) {
+ ast_cli(fd, "%s%s for %d days, %d hours, %d minutes, %d seconds.\n", status, status2, ctime / 86400, (ctime % 86400) / 3600, (ctime % 3600) / 60, ctime % 60);
+ } else if (ctime > 3600) {
+ ast_cli(fd, "%s%s for %d hours, %d minutes, %d seconds.\n", status, status2, ctime / 3600, (ctime % 3600) / 60, ctime % 60);
+ } else if (ctime > 60) {
+ ast_cli(fd, "%s%s for %d minutes, %d seconds.\n", status, status2, ctime / 60, ctime % 60);
+ } else {
+ ast_cli(fd, "%s%s for %d seconds.\n", status, status2, ctime);
+ }
+
+ return RESULT_SUCCESS;
+ } else {
+ return RESULT_FAILURE;
+ }
+}

View File

@ -1,21 +0,0 @@
diff -ruN asterisk-1.2.1-old/codecs/ilbc/Makefile asterisk-1.2.1-new/codecs/ilbc/Makefile
--- asterisk-1.2.1-old/codecs/ilbc/Makefile 2005-11-29 19:24:39.000000000 +0100
+++ asterisk-1.2.1-new/codecs/ilbc/Makefile 2005-12-16 19:24:36.000000000 +0100
@@ -1,5 +1,5 @@
ARCH=$(PROC)
-CFLAGS+=-Wall -O3 -funroll-loops
+CFLAGS+=-Wall $(OPTIMIZE) -funroll-loops
ifneq (${OSARCH},CYGWIN)
CFLAGS += -fPIC
endif
@@ -15,8 +15,8 @@
$(LIB): $(OBJS)
- ar cr $(LIB) $(OBJS)
- ranlib $(LIB)
+ $(AR) cr $(LIB) $(OBJS)
+ $(RANLIB) $(LIB)
clean:
rm -f $(LIB) *.o

View File

@ -1,11 +0,0 @@
--- asterisk-1.2.1/Makefile.orig 2005-12-09 10:22:06.000000000 +0100
+++ asterisk-1.2.1/Makefile 2005-12-09 10:28:46.000000000 +0100
@@ -322,8 +322,6 @@
ifneq ($(wildcard .svn),)
ASTERISKVERSIONNUM=999999
ASTERISKVERSION=SVN-$(shell build_tools/make_svn_branch_name)
- else
- ASTERISKVERSIONNUM=000000
endif
endif

View File

@ -1,25 +0,0 @@
#menu "atftp............................. TFTP implementation"
config BR2_COMPILE_ATFTP
tristate
default n
depends BR2_PACKAGE_ATFTP || BR2_PACKAGE_ATFTPD
select BR2_PACKAGE_LIBREADLINE
config BR2_PACKAGE_ATFTP
prompt "atftp............................. TFTP client"
tristate
default m if CONFIG_DEVEL
select BR2_COMPILE_ATFTP
help
TFTP client
config BR2_PACKAGE_ATFTPD
prompt "atftpd............................ TFTP server"
tristate
default m if CONFIG_DEVEL
select BR2_COMPILE_ATFTP
help
TFTP server
#endmenu

View File

@ -1,71 +0,0 @@
# $Id$
include $(TOPDIR)/rules.mk
PKG_NAME:=atftp
PKG_VERSION:=0.7
PKG_RELEASE:=1
PKG_MD5SUM:=3b27365772d918050b2251d98a9c7c82
PKG_SOURCE_URL:=ftp://ftp.mamalinux.com/pub/atftp/
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_CAT:=zcat
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
include $(TOPDIR)/package/rules.mk
$(eval $(call PKG_template,ATFTP,atftp,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
$(eval $(call PKG_template,ATFTPD,atftpd,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
$(PKG_BUILD_DIR)/.configured:
(cd $(PKG_BUILD_DIR); rm -rf config.{cache,status} ; \
$(TARGET_CONFIGURE_OPTS) \
CFLAGS="$(TARGET_CFLAGS)" \
CPPFLAGS="-I$(STAGING_DIR)/usr/include" \
LDFLAGS="-L$(STAGING_DIR)/usr/lib" \
./configure \
--target=$(GNU_TARGET_NAME) \
--host=$(GNU_TARGET_NAME) \
--build=$(GNU_HOST_NAME) \
--program-prefix="" \
--program-suffix="" \
--prefix=/usr \
--exec-prefix=/usr \
--bindir=/usr/bin \
--datadir=/usr/share \
--includedir=/usr/include \
--infodir=/usr/share/info \
--libdir=/usr/lib \
--libexecdir=/usr/lib \
--localstatedir=/var \
--mandir=/usr/share/man \
--sbindir=/usr/sbin \
--sysconfdir=/etc \
$(DISABLE_LARGEFILE) \
$(DISABLE_NLS) \
);
touch $@
$(PKG_BUILD_DIR)/.built:
rm -rf $(PKG_INSTALL_DIR)
mkdir -p $(PKG_INSTALL_DIR)
$(MAKE) -C $(PKG_BUILD_DIR) \
$(TARGET_CONFIGURE_OPTS) \
CFLAGS="$(TARGET_CFLAGS) -Wall -D_REENTRANT" \
DESTDIR=$(PKG_INSTALL_DIR) \
all install
touch $@
$(IPKG_ATFTP):
install -d -m0755 $(IDIR_ATFTP)/usr/bin
$(CP) $(PKG_BUILD_DIR)/atftp $(IDIR_ATFTP)/usr/bin
$(RSTRIP) $(IDIR_ATFTP)
$(IPKG_BUILD) $(IDIR_ATFTP) $(PACKAGE_DIR)
$(IPKG_ATFTPD):
install -d -m0755 $(IDIR_ATFTPD)/usr/sbin
$(CP) $(PKG_BUILD_DIR)/atftpd $(IDIR_ATFTPD)/usr/sbin
$(RSTRIP) $(IDIR_ATFTPD)
$(IPKG_BUILD) $(IDIR_ATFTPD) $(PACKAGE_DIR)

View File

@ -1,5 +0,0 @@
Package: atftp
Priority: optional
Section: net
Description: tftp client
Depends: libreadline, libncurses

View File

@ -1,5 +0,0 @@
Package: atftpd
Priority: optional
Section: net
Description: tftp server
Depends: libreadline, libpcre

View File

@ -1,8 +0,0 @@
#!/bin/sh
grep -q '^tftp[[:space:]]*69/tcp' ${IPKG_INSTROOT}/etc/services 2>/dev/null
if [ $? -ne 0 ]; then
echo "tftp 69/tcp" >>${IPKG_INSTROOT}/etc/services
echo "tftp 69/udp" >>${IPKG_INSTROOT}/etc/services
echo "tftp-mcast 1758/tcp" >>${IPKG_INSTROOT}/etc/services
echo "tftp-mcast 1758/udp" >>${IPKG_INSTROOT}/etc/services
fi

View File

@ -1,20 +0,0 @@
diff -Nur netkit-tftp-0.17/MCONFIG netkit-tftp-0.17.patched/MCONFIG
--- netkit-tftp-0.17/MCONFIG 1970-01-01 01:00:00.000000000 +0100
+++ netkit-tftp-0.17.patched/MCONFIG 2005-06-19 21:16:52.422687029 +0200
@@ -0,0 +1,16 @@
+# Generated by configure (confgen version 2) on Sun Jun 19 21:13:24 CEST 2005
+#
+
+BINDIR=/usr/bin
+SBINDIR=/usr/sbin
+MANDIR=/usr/man
+BINMODE=755
+DAEMONMODE=755
+MANMODE=644
+PREFIX=/usr
+EXECPREFIX=/usr
+INSTALLROOT=
+CC=
+CFLAGS=
+LDFLAGS=
+LIBS=

View File

@ -1,77 +0,0 @@
diff -urN atftp.old/tftp.c atftp.dev/tftp.c
--- atftp.old/tftp.c 2004-03-16 00:55:56.000000000 +0100
+++ atftp.dev/tftp.c 2006-03-22 10:18:54.000000000 +0100
@@ -409,7 +409,7 @@
int set_peer(int argc, char **argv)
{
struct hostent *host; /* for host name lookup */
- struct servent *sp; /* server entry for tftp service */
+ int port = htons(69);
/* sanity check */
if ((argc < 2) || (argc > 3))
@@ -418,13 +418,6 @@
return ERR;
}
- /* get the server entry */
- sp = getservbyname("tftp", "udp");
- if (sp == 0) {
- fprintf(stderr, "tftp: udp/tftp, unknown service.\n");
- return ERR;
- }
-
/* look up the host */
host = gethostbyname(argv[1]);
/* if valid, update s_inn structure */
@@ -437,7 +430,7 @@
Strncpy(data.hostname, host->h_name,
sizeof(data.hostname));
data.hostname[sizeof(data.hostname)-1] = 0;
- data.sa_peer.sin_port = sp->s_port;
+ data.sa_peer.sin_port = port;
}
else
{
@@ -448,17 +441,17 @@
/* get the server port */
if (argc == 3)
{
- sp->s_port = htons(atoi(argv[2]));
- if (sp->s_port < 0)
+ port = htons(atoi(argv[2]));
+ if (port < 0)
{
fprintf(stderr, "%s: bad port number.\n", argv[2]);
data.connected = 0;
return ERR;
}
- data.sa_peer.sin_port = sp->s_port;
+ data.sa_peer.sin_port = port;
}
/* copy port number to data structure */
- data.port = ntohs(sp->s_port);
+ data.port = ntohs(port);
data.connected = 1;
return OK;
diff -urN atftp.old/tftpd.c atftp.dev/tftpd.c
--- atftp.old/tftpd.c 2004-02-27 03:05:26.000000000 +0100
+++ atftp.dev/tftpd.c 2006-03-22 10:23:20.000000000 +0100
@@ -230,14 +230,8 @@
/* find the port */
if (tftpd_port == 0)
- {
- if ((serv = getservbyname("tftp", "udp")) == NULL)
- {
- logger(LOG_ERR, "atftpd: udp/tftp, unknown service");
- exit(1);
- }
- tftpd_port = ntohs(serv->s_port);
- }
+ tftpd_port = htons(69);
+
/* initialise sockaddr_in structure */
memset(&sa, 0, sizeof(sa));
sa.sin_family = AF_INET;

View File

@ -1,117 +0,0 @@
diff -urN atftp.old/tftp.c atftp.dev/tftp.c
--- atftp.old/tftp.c 2006-03-25 16:41:49.000000000 +0100
+++ atftp.dev/tftp.c 2006-03-25 18:10:04.000000000 +0100
@@ -967,6 +967,7 @@
{ "tftp-timeout", 1, NULL, 'T'},
{ "mode", 1, NULL, 'M'},
{ "option", 1, NULL, 'O'},
+ { "retry", 1, NULL, 'R'},
#if 1
{ "timeout", 1, NULL, 't'},
{ "blksize", 1, NULL, 'b'},
@@ -986,11 +987,16 @@
};
/* Support old argument until 0.8 */
- while ((c = getopt_long(argc, argv, /*"gpl:r:Vh"*/ "gpl:r:Vht:b:sm",
+ while ((c = getopt_long(argc, argv, /*"gpl:r:Vh"*/ "gpl:r:Vht:b:smR:",
options, &option_index)) != EOF)
{
switch (c)
{
+ case 'R':
+ snprintf(string, sizeof(string), "option retry %s", optarg);
+ make_arg(string, &ac, &av);
+ process_cmd(ac, av);
+ break;
case 'g':
interactive = 0;
if ((action == PUT) || (action == MGET))
diff -urN atftp.old/tftp_def.c atftp.dev/tftp_def.c
--- atftp.old/tftp_def.c 2004-02-13 04:16:09.000000000 +0100
+++ atftp.dev/tftp_def.c 2006-03-25 18:10:04.000000000 +0100
@@ -37,6 +37,7 @@
{ "timeout", "5", 0, 1 }, /* 2348, 2349, 2090. */
{ "blksize", "512", 0, 1 }, /* This is the default option */
{ "multicast", "", 0, 1 }, /* structure */
+ { "retry", "5", 0, 1 },
{ "", "", 0, 0}
};
diff -urN atftp.old/tftp_def.h atftp.dev/tftp_def.h
--- atftp.old/tftp_def.h 2004-02-13 04:16:09.000000000 +0100
+++ atftp.dev/tftp_def.h 2006-03-25 17:19:15.000000000 +0100
@@ -40,7 +40,8 @@
#define OPT_TIMEOUT 3
#define OPT_BLKSIZE 4
#define OPT_MULTICAST 5
-#define OPT_NUMBER 7
+#define OPT_RETRY 6
+#define OPT_NUMBER 8
#define OPT_SIZE 12
#define VAL_SIZE MAXLEN
diff -urN atftp.old/tftp_file.c atftp.dev/tftp_file.c
--- atftp.old/tftp_file.c 2004-02-13 04:16:09.000000000 +0100
+++ atftp.dev/tftp_file.c 2006-03-25 18:10:04.000000000 +0100
@@ -123,6 +123,7 @@
struct tftphdr *tftphdr = (struct tftphdr *)data->data_buffer;
FILE *fp = NULL; /* the local file pointer */
int number_of_timeout = 0;
+ int num_retry = atoi(data->tftp_options[OPT_RETRY].value);
int convert = 0; /* if true, do netascii convertion */
int oacks = 0; /* count OACK for improved error checking */
@@ -141,7 +142,7 @@
int prev_block_number = 0; /* needed to support netascii convertion */
int temp = 0;
-
+
data->file_size = 0;
tftp_cancel = 0;
from.sin_addr.s_addr = 0;
@@ -288,7 +289,7 @@
case GET_TIMEOUT:
number_of_timeout++;
fprintf(stderr, "timeout: retrying...\n");
- if (number_of_timeout > NB_OF_RETRY)
+ if ((num_retry > 0) && (number_of_timeout > num_retry))
state = S_ABORT;
else
state = timeout_state;
@@ -325,7 +326,7 @@
number_of_timeout++;
fprintf(stderr, "tftp: packet discard <%s:%d>.\n",
inet_ntoa(from.sin_addr), ntohs(from.sin_port));
- if (number_of_timeout > NB_OF_RETRY)
+ if ((num_retry > 0) && (number_of_timeout > num_retry))
state = S_ABORT;
break;
case ERR:
@@ -614,6 +615,7 @@
struct tftphdr *tftphdr = (struct tftphdr *)data->data_buffer;
FILE *fp; /* the local file pointer */
int number_of_timeout = 0;
+ int num_retry = atoi(data->tftp_options[OPT_RETRY].value);
struct stat file_stat;
int convert = 0; /* if true, do netascii convertion */
char string[MAXLEN];
@@ -751,7 +753,7 @@
case GET_TIMEOUT:
number_of_timeout++;
fprintf(stderr, "timeout: retrying...\n");
- if (number_of_timeout > NB_OF_RETRY)
+ if ((num_retry > 0) && (number_of_timeout > num_retry))
state = S_ABORT;
else
state = timeout_state;
@@ -797,7 +799,7 @@
number_of_timeout++;
fprintf(stderr, "tftp: packet discard <%s:%d>.\n",
inet_ntoa(from.sin_addr), ntohs(from.sin_port));
- if (number_of_timeout > NB_OF_RETRY)
+ if ((num_retry > 0) && (number_of_timeout > num_retry))
state = S_ABORT;
break;
case ERR:

View File

@ -1,9 +0,0 @@
config BR2_PACKAGE_AUTOSSH
prompt "autossh........................... Auto handle ssh tunnels"
tristate
default m if CONFIG_DEVEL
help
autossh is a program to start a copy of ssh and monitor it,
restarting it as necessary should it die or stop passing traffic.
http://www.harding.motd.ca/autossh/

View File

@ -1,39 +0,0 @@
# $Id$
#
# Adjust SSH below to suit.
#
include $(TOPDIR)/rules.mk
PKG_NAME:=autossh
PKG_VERSION:=1.3
PKG_RELEASE:=1
PKG_MD5SUM:=0e7ec62eeca5d1b197f3ef2d0f0d417f
PKG_SOURCE_URL:=http://www.harding.motd.ca/autossh
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tgz
PKG_CAT:=zcat
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
VER=1.3
SSH=/usr/bin/ssh
include $(TOPDIR)/package/rules.mk
$(eval $(call PKG_template,AUTOSSH,$(PKG_NAME),$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
$(PKG_BUILD_DIR)/.configured:
cp $(PKG_BUILD_DIR)/Makefile.linux $(PKG_BUILD_DIR)/Makefile
touch $@
$(PKG_BUILD_DIR)/.built:
$(MAKE) -C $(PKG_BUILD_DIR) \
CC=$(TARGET_CC) CFLAGS="$(TARGET_CFLAGS) -Wall -D\"SSH_PATH=\\\"$(SSH)\\\"\" -D\"VER=\\\"$(PKG_VERSION)\\\"\"" \
BINDIR=/usr/bin MANDIR=/usr/man
touch $@
$(IPKG_AUTOSSH):
mkdir -p $(IDIR_AUTOSSH)/usr/bin
cp $(PKG_BUILD_DIR)/$(PKG_NAME) $(IDIR_AUTOSSH)/usr/bin/
$(RSTRIP) $(IDIR_AUTOSSH)
$(IPKG_BUILD) $(IDIR_AUTOSSH) $(PACKAGE_DIR)

View File

@ -1,5 +0,0 @@
Package: autossh
Priority: optional
Section: net
Depends: openssh-client
Description: Autossh client

View File

@ -1,64 +0,0 @@
menu "avahi............................. An mDNS/DNS-SD (aka RendezVous/Bonjour/ZeroConf) implementation"
config BR2_COMPILE_AVAHI
tristate
default n
depends BR2_PACKAGE_AVAHI_DAEMON || BR2_PACKAGE_AVAHI_DNSCONFD || BR2_PACKAGE_LIBAVAHI
config BR2_PACKAGE_AVAHI_DAEMON
prompt "avahi-daemon.................... An mDNS/DNS-SD (aka RendezVous/Bonjour/ZeroConf) implementation (daemon)"
tristate
default m if CONFIG_DEVEL
select BR2_COMPILE_AVAHI
select BR2_PACKAGE_LIBAVAHI
select BR2_PACKAGE_LIBDAEMON
help
Avahi is a system which facilitates service discovery on a local network --
this means that you can plug your laptop or computer into a network and
instantly be able to view other people who you can chat with, find printers
to print to or find files being shared. This kind of technology is already
found in MacOS X (branded 'Rendezvous', 'Bonjour' and sometimes 'ZeroConf')
and is very convenient.
http://www.freedesktop.org/Software/Avahi
This package contains an mDNS/DNS-SD daemon.
config BR2_PACKAGE_AVAHI_DNSCONFD
prompt "avahi-dnsconfd................ An Unicast DNS server from mDNS/DNS-SD configuration daemon"
tristate
default m if CONFIG_DEVEL
select BR2_COMPILE_AVAHI
depends BR2_PACKAGE_AVAHI_DAEMON
help
Avahi is a system which facilitates service discovery on a local network --
this means that you can plug your laptop or computer into a network and
instantly be able to view other people who you can chat with, find printers
to print to or find files being shared. This kind of technology is already
found in MacOS X (branded 'Rendezvous', 'Bonjour' and sometimes 'ZeroConf')
and is very convenient.
http://www.freedesktop.org/Software/Avahi
This package contains an Unicast DNS server from mDNS/DNS-SD configuration
daemon, which may be used to configure conventional DNS servers using mDNS
in a DHCP-like fashion. Especially useful on IPv6.
config BR2_PACKAGE_LIBAVAHI
prompt "libavahi........................ An mDNS/DNS-SD (aka RendezVous/Bonjour/ZeroConf) implementation (library)"
tristate
default m if CONFIG_DEVEL
select BR2_COMPILE_AVAHI
help
Avahi is a system which facilitates service discovery on a local network --
this means that you can plug your laptop or computer into a network and
instantly be able to view other people who you can chat with, find printers
to print to or find files being shared. This kind of technology is already
found in MacOS X (branded 'Rendezvous', 'Bonjour' and sometimes 'ZeroConf')
and is very convenient.
http://www.freedesktop.org/Software/Avahi
This package contains the mDNS/DNS-SD shared libraries, used by other programs.
endmenu

View File

@ -1,154 +0,0 @@
# $Id$
include $(TOPDIR)/rules.mk
PKG_NAME:=avahi
PKG_VERSION:=0.6.1
PKG_RELEASE:=1
PKG_MD5SUM:=330613902c59bd597f140a8254e9f4ec
PKG_SOURCE_URL:=http://www.freedesktop.org/~lennart/
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_CAT:=zcat
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
include $(TOPDIR)/package/rules.mk
$(eval $(call PKG_template,AVAHI_DAEMON,avahi-daemon,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
$(eval $(call PKG_template,AVAHI_DNSCONFD,avahi-dnsconfd,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
$(eval $(call PKG_template,LIBAVAHI,libavahi,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
$(PKG_BUILD_DIR)/.configured:
(cd $(PKG_BUILD_DIR); rm -rf config.{cache,status} ; \
$(TARGET_CONFIGURE_OPTS) \
CFLAGS="$(TARGET_CFLAGS) -DNDEBUG" \
CPPFLAGS="-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include" \
LDFLAGS="-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib" \
PKG_CONFIG_PATH="$(STAGING_DIR)/usr/lib/pkgconfig" \
ac_cv_func_malloc_0_nonnull=yes \
ac_cv_func_realloc_0_nonnull=yes \
./configure \
--target=$(GNU_TARGET_NAME) \
--host=$(GNU_TARGET_NAME) \
--build=$(GNU_HOST_NAME) \
--program-prefix="" \
--program-suffix="" \
--prefix=/usr \
--exec-prefix=/usr \
--bindir=/usr/bin \
--datadir=/usr/share \
--includedir=/usr/include \
--infodir=/usr/share/info \
--libdir=/usr/lib \
--libexecdir=/usr/lib \
--localstatedir=/var \
--mandir=/usr/share/man \
--sbindir=/usr/sbin \
--sysconfdir=/etc \
$(DISABLE_LARGEFILE) \
$(DISABLE_NLS) \
--enable-shared \
--enable-static \
--disable-rpath \
--with-gnu-ld \
--disable-glib \
--disable-qt3 \
--disable-qt4 \
--disable-gtk \
--disable-dbus \
--enable-expat \
--enable-libdaemon \
--disable-python \
--disable-pygtk \
--disable-python-dbus \
--disable-mono \
--disable-monodoc \
--disable-doxygen-doc \
--disable-doxygen-dot \
--disable-doxygen-man \
--disable-doxygen-rtf \
--disable-doxygen-xml \
--disable-doxygen-chm \
--disable-doxygen-chi \
--disable-doxygen-html \
--disable-doxygen-ps \
--disable-doxygen-pdf \
--disable-xmltoman \
--with-distro=none \
--with-avahi-user=nobody \
--with-avahi-group=nogroup \
);
touch $@
$(PKG_BUILD_DIR)/.built:
rm -rf $(PKG_INSTALL_DIR)
mkdir -p $(PKG_INSTALL_DIR)
$(MAKE) -C $(PKG_BUILD_DIR) \
DESTDIR="$(PKG_INSTALL_DIR)" \
all install
touch $@
$(IPKG_AVAHI_DAEMON):
install -d -m0755 $(IDIR_AVAHI_DAEMON)/etc/avahi
install -m0644 ./files/avahi-daemon.conf $(IDIR_AVAHI_DAEMON)/etc/avahi/
install -d -m0755 $(IDIR_AVAHI_DAEMON)/etc/avahi/services
install -m0644 ./files/service-http $(IDIR_AVAHI_DAEMON)/etc/avahi/services/http.service
install -m0644 ./files/service-ssh $(IDIR_AVAHI_DAEMON)/etc/avahi/services/ssh.service
install -d -m0755 $(IDIR_AVAHI_DAEMON)/etc/init.d
install -m0755 ./files/avahi-daemon.init $(IDIR_AVAHI_DAEMON)/etc/init.d/avahi-daemon
install -d -m0755 $(IDIR_AVAHI_DAEMON)/usr/sbin
$(CP) $(PKG_INSTALL_DIR)/usr/sbin/avahi-daemon $(IDIR_AVAHI_DAEMON)/usr/sbin/
$(RSTRIP) $(IDIR_AVAHI_DAEMON)
$(IPKG_BUILD) $(IDIR_AVAHI_DAEMON) $(PACKAGE_DIR)
$(IPKG_AVAHI_DNSCONFD):
install -d -m0755 $(IDIR_AVAHI_DNSCONFD)/etc/avahi
$(CP) $(PKG_INSTALL_DIR)/etc/avahi/avahi-dnsconfd.action $(IDIR_AVAHI_DNSCONFD)/etc/avahi/
install -d -m0755 $(IDIR_AVAHI_DNSCONFD)/usr/sbin
$(CP) $(PKG_INSTALL_DIR)/usr/sbin/avahi-dnsconfd $(IDIR_AVAHI_DNSCONFD)/usr/sbin/
$(RSTRIP) $(IDIR_AVAHI_DNSCONFD)
$(IPKG_BUILD) $(IDIR_AVAHI_DNSCONFD) $(PACKAGE_DIR)
$(IPKG_LIBAVAHI):
install -d -m0755 $(IDIR_LIBAVAHI)/usr/lib
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libavahi-common.so.* $(IDIR_LIBAVAHI)/usr/lib/
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libavahi-core.so.* $(IDIR_LIBAVAHI)/usr/lib/
$(RSTRIP) $(IDIR_LIBAVAHI)
$(IPKG_BUILD) $(IDIR_LIBAVAHI) $(PACKAGE_DIR)
$(STAGING_DIR)/usr/lib/avahi.so: $(PKG_BUILD_DIR)/.built
mkdir -p $(STAGING_DIR)/usr/include
$(CP) $(PKG_INSTALL_DIR)/usr/include/avahi-common $(STAGING_DIR)/usr/include/
$(CP) $(PKG_INSTALL_DIR)/usr/include/avahi-core $(STAGING_DIR)/usr/include/
mkdir -p $(STAGING_DIR)/usr/lib
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libavahi-common.a $(STAGING_DIR)/usr/lib/
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libavahi-common.so* $(STAGING_DIR)/usr/lib/
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libavahi-core.a $(STAGING_DIR)/usr/lib/
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libavahi-core.so* $(STAGING_DIR)/usr/lib/
mkdir -p $(STAGING_DIR)/usr/lib/pkgconfig
$(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/avahi-core.pc $(STAGING_DIR)/usr/lib/pkgconfig/
$(SED) 's,-I$${includedir},,g' $(STAGING_DIR)/usr/lib/pkgconfig/avahi-core.pc
$(SED) 's,-L$${libdir},,g' $(STAGING_DIR)/usr/lib/pkgconfig/avahi-core.pc
touch $@
install-dev: $(STAGING_DIR)/usr/lib/avahi.so
uninstall-dev:
rm -rf \
$(STAGING_DIR)/usr/include/avahi-common \
$(STAGING_DIR)/usr/include/avahi-core \
$(STAGING_DIR)/usr/lib/libavahi-common.a \
$(STAGING_DIR)/usr/lib/libavahi-common.so* \
$(STAGING_DIR)/usr/lib/libavahi-core.a \
$(STAGING_DIR)/usr/lib/libavahi-core.so* \
$(STAGING_DIR)/usr/lib/pkgconfig/avahi-core.pc \
compile-targets: install-dev
clean-targets: uninstall-dev
mostlyclean:
-$(MAKE) -C $(PKG_BUILD_DIR) clean
rm -f $(PKG_BUILD_DIR)/.built

View File

@ -1,29 +0,0 @@
[server]
#host-name=foo
#domain-name=local
use-ipv4=yes
use-ipv6=no
check-response-ttl=no
use-iff-running=no
enable-dbus=no
[publish]
publish-addresses=yes
publish-hinfo=yes
publish-workstation=no
publish-domain=yes
#publish-dns-servers=192.168.1.1
#publish-resolv-conf-dns-servers=yes
[reflector]
enable-reflector=no
reflect-ipv=no
[rlimits]
#rlimit-as=
rlimit-core=0
rlimit-data=4194304
rlimit-fsize=0
rlimit-nofile=30
rlimit-stack=4194304
rlimit-nproc=1

View File

@ -1,25 +0,0 @@
#!/bin/sh
BIN=avahi-daemon
DEFAULT=/etc/default/$BIN
OPTIONS="-D"
RUN_D=/var/run/$BIN
[ -f $DEFAULT ] && . $DEFAULT
case $1 in
start)
mkdir -p $RUN_D
$BIN $OPTIONS
;;
stop)
$BIN -k
;;
reload)
$BIN -r
;;
*)
echo "usage: $0 (start|stop|reload)"
exit 1
esac
exit $?

View File

@ -1,10 +0,0 @@
<?xml version="1.0" standalone='no'?><!--*-nxml-*-->
<!DOCTYPE service-group SYSTEM "avahi-service.dtd">
<service-group>
<name replace-wildcards="yes">Web Server on %h</name>
<service>
<type>_http._tcp</type>
<port>80</port>
<txt-record>path=/index.html</txt-record>
</service>
</service-group>

View File

@ -1,9 +0,0 @@
<?xml version="1.0" standalone='no'?><!--*-nxml-*-->
<!DOCTYPE service-group SYSTEM "avahi-service.dtd">
<service-group>
<name replace-wildcards="yes">Secure Shell on %h</name>
<service>
<type>_ssh._tcp</type>
<port>22</port>
</service>
</service-group>

View File

@ -1,3 +0,0 @@
/etc/avahi/avahi-daemon.conf
/etc/avahi/services/http.service
/etc/avahi/services/ssh.service

View File

@ -1,5 +0,0 @@
Package: avahi-daemon
Priority: optional
Section: net
Depends: libavahi, libdaemon, libexpat
Description: an mDNS/DNS-SD (aka RendezVous/Bonjour/ZeroConf) implementation (daemon)

View File

@ -1,5 +0,0 @@
Package: avahi-dnsconfd
Priority: optional
Section: net
Depends: libavahi, libdaemon, avahi-daemon
Description: an Unicast DNS server from mDNS/DNS-SD configuration daemon

View File

@ -1,4 +0,0 @@
Package: libavahi
Priority: optional
Section: libs
Description: an DNS-SD over mDNS (aka RendezVous/Bonjour/ZeroConf) implementation (library)

Some files were not shown because too many files have changed in this diff Show More