From: Felix Fietkau Date: Fri, 25 Mar 2005 18:44:22 +0000 (+0000) Subject: add sip express router X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=ea648f99a3ec8b06add9dd0a76568b34187c2167;p=openwrt%2Fsvn-archive%2Farchive.git add sip express router SVN-Revision: 455 --- diff --git a/openwrt/package/Config.in b/openwrt/package/Config.in index 67b1a620e6..24d03a4001 100644 --- a/openwrt/package/Config.in +++ b/openwrt/package/Config.in @@ -30,6 +30,7 @@ source "package/cifsmount/Config.in" source "package/ez-ipupdate/Config.in" source "package/portmap/Config.in" source "package/nfs-server/Config.in" +source "package/ser/Config.in" comment "Libraries" source "package/zlib/Config.in" diff --git a/openwrt/package/Makefile b/openwrt/package/Makefile index 5009a321a4..50eacfcf81 100644 --- a/openwrt/package/Makefile +++ b/openwrt/package/Makefile @@ -31,6 +31,7 @@ package-$(BR2_PACKAGE_PORTMAP) += portmap package-$(BR2_PACKAGE_PPP) += ppp package-$(BR2_PACKAGE_PPTP) += pptp package-$(BR2_PACKAGE_PPTPD) += pptpd +package-$(BR2_PACKAGE_SER) += ser package-$(BR2_PACKAGE_STRACE) += strace package-$(BR2_PACKAGE_TCPDUMP) += tcpdump package-$(BR2_PACKAGE_ZLIB) += zlib diff --git a/openwrt/package/ser/Config.in b/openwrt/package/ser/Config.in new file mode 100644 index 0000000000..371cbcc58d --- /dev/null +++ b/openwrt/package/ser/Config.in @@ -0,0 +1,7 @@ +config BR2_PACKAGE_SER + tristate "SIP Express Router" + default m + help + SIP Express Router (ser) is a high-performance, + configurable, free SIP server. + diff --git a/openwrt/package/ser/Makefile b/openwrt/package/ser/Makefile new file mode 100644 index 0000000000..59f0d9c1f8 --- /dev/null +++ b/openwrt/package/ser/Makefile @@ -0,0 +1,65 @@ +# $Id$ + +include $(TOPDIR)/rules.mk + +PKG_NAME:=ser +PKG_VERSION:=0.9.0 +PKG_RELEASE:=1 +PKG_MD5SUM:=ae1f9b237f0006785ff22eafa1470ac4 + +PKG_SOURCE_URL:=ftp://ftp.berlios.de/pub/ser/$(PKG_VERSION)/src +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)_src.tar.gz +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) +PKG_CAT:=zcat +PKG_IPK:=$(PACKAGE_DIR)/$(PKG_NAME)_$(PKG_VERSION)-$(PKG_RELEASE)_$(ARCH).ipk +PKG_IPK_DIR:=$(PKG_BUILD_DIR)/ipkg + +SER_MODULES := sl tm rr maxfwd usrloc registrar dbtext textops + +SER_MODULE_FILES := $(foreach module,$(SER_MODULES),modules/$(module)/$(module).so) +SER_MODULES := $(patsubst %,modules/%,$(SER_MODULES)) + +$(DL_DIR)/$(PKG_SOURCE): + $(SCRIPT_DIR)/download.pl $(DL_DIR) $(PKG_SOURCE) $(PKG_MD5SUM) $(PKG_SOURCE_URL) + +$(PKG_BUILD_DIR)/.patched: $(DL_DIR)/$(PKG_SOURCE) + $(PKG_CAT) $(DL_DIR)/$(PKG_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) - + $(PATCH) $(PKG_BUILD_DIR) ./patches + touch $(PKG_BUILD_DIR)/.patched + +$(PKG_BUILD_DIR)/$(PKG_NAME): $(PKG_BUILD_DIR)/.patched + $(MAKE) -C $(PKG_BUILD_DIR) \ + CC="$(TARGET_CC)" \ + ARCH="$(ARCH)" \ + COPTS="$(TARGET_CFLAGS)" \ + modules="$(SER_MODULES)" \ + modules all + +$(PKG_IPK): $(PKG_BUILD_DIR)/$(PKG_NAME) + $(SCRIPT_DIR)/make-ipkg-dir.sh $(PKG_IPK_DIR) $(PKG_NAME).control $(PKG_VERSION)-$(PKG_RELEASE) $(ARCH) + mkdir -p $(PKG_IPK_DIR)/usr/sbin + cp -a $(PKG_BUILD_DIR)/$(PKG_NAME) $(PKG_IPK_DIR)/usr/sbin/ + -$(STRIP) $(PKG_IPK_DIR)/usr/sbin/* + cp -a $(PKG_BUILD_DIR)/scripts/sc $(PKG_IPK_DIR)/usr/sbin/serctl + mkdir -p $(PKG_IPK_DIR)/usr/lib/ser/modules + (cd $(PKG_BUILD_DIR);\ + cp -a $(SER_MODULE_FILES) $(PKG_IPK_DIR)/usr/lib/ser/modules/; \ + ) + $(STRIP) $(PKG_IPK_DIR)/usr/lib/ser/modules/* + mkdir -p $(PKG_IPK_DIR)/etc/ser + cp -a $(PKG_BUILD_DIR)/etc/ser.cfg $(PKG_IPK_DIR)/etc/ser/ + mkdir -p $(PACKAGE_DIR) + $(IPKG_BUILD) $(PKG_IPK_DIR) $(PACKAGE_DIR) + +$(IPKG_STATE_DIR)/info/$(PKG_NAME).list: $(PKG_IPK) + $(IPKG) install $(PKG_IPK) + +source: $(DL_DIR)/$(PKG_SOURCE) +prepare: $(PKG_BUILD_DIR)/.patched +compile: $(PKG_IPK) +install: $(IPKG_STATE_DIR)/info/$(PKG_NAME).list + + +clean: + rm -rf $(PKG_BUILD_DIR) + rm -f $(PKG_IPK) diff --git a/openwrt/package/ser/patches/no-libfl.patch b/openwrt/package/ser/patches/no-libfl.patch new file mode 100644 index 0000000000..4a301a029e --- /dev/null +++ b/openwrt/package/ser/patches/no-libfl.patch @@ -0,0 +1,77 @@ +diff -urN ser-0.9.0.old/Makefile.defs ser-0.9.0/Makefile.defs +--- ser-0.9.0.old/Makefile.defs 2004-12-16 18:50:40.000000000 +0100 ++++ ser-0.9.0/Makefile.defs 2005-03-25 15:24:03.000000000 +0100 +@@ -788,7 +788,7 @@ + endif + YACC_FLAGS=-d -b cfg + # on solaris add -lxnet (e.g. LIBS= -lxnet) +-LIBS= -lfl -ldl -lresolv ++LIBS= -ldl -lresolv + + + #os specific stuff +@@ -826,7 +826,7 @@ + endif + OLD_SOLARIS= $(shell echo "$(OSREL)" | \ + sed -e 's/^5\.[0-6][^0-9]*$$/yes/' ) +- LIBS+= -L/usr/local/lib -lfl -lxnet -lnsl ++ LIBS+= -L/usr/local/lib -lxnet -lnsl + ifeq ($(OLD_SOLARIS), yes) + LIBS+=-lposix4 + else +@@ -841,9 +841,9 @@ + ifneq ($(found_lock_method), yes) + DEFS+= -DUSE_PTHREAD_MUTEX # try pthread sems + found_lock_method=yes +- LIBS= -pthread -lfl #dlopen is in libc ++ LIBS= -pthread #dlopen is in libc + else +- LIBS= -lfl #dlopen is in libc ++ LIBS= #dlopen is in libc + endif + YACC=yacc + endif +@@ -858,7 +858,7 @@ + # (symbols on openbsd are prefixed by "_") + YACC=yacc + # no sched_yield on openbsd unless linking with c_r (not recommended) +- LIBS= -lfl ++ LIBS= + OPENBSD_IS_AOUT= $(shell echo "$(OSREL)" | \ + sed -e 's/^3\.[0-3][^0-9]*$$/yes/' |sed -e 's/^[0-2]\..*/yes/') + # exception: on sparc openbsd 3.2 is elf and not aout +@@ -885,7 +885,7 @@ + found_lock_method=yes + endif + YACC=yacc +- LIBS= -lfl ++ LIBS= + endif + + # OS X support, same as freebsd +@@ -899,9 +899,9 @@ + ifneq ($(found_lock_method), yes) + DEFS+= -DUSE_PTHREAD_MUTEX # try pthread sems + found_lock_method=yes +- LIBS= -pthread -lfl -lresolv #dlopen is in libc ++ LIBS= -pthread -lresolv #dlopen is in libc + else +- LIBS= -lfl -lresolv #dlopen is in libc ++ LIBS= -lresolv #dlopen is in libc + endif + LDFLAGS= # darwin doesn't like -O2 or -E + MOD_LDFLAGS= -bundle -bundle_loader ../../$(MAIN_NAME) +diff -urN ser-0.9.0.old/cfg.lex ser-0.9.0/cfg.lex +--- ser-0.9.0.old/cfg.lex 2004-11-30 17:28:23.000000000 +0100 ++++ ser-0.9.0/cfg.lex 2005-03-25 15:27:49.000000000 +0100 +@@ -90,6 +90,10 @@ + static char* addstr(struct str_buf *, char*, int); + static void count(); + ++ int yywrap(void) ++ { ++ return 1; ++ } + + %} + diff --git a/openwrt/package/ser/patches/runtime-paths.patch b/openwrt/package/ser/patches/runtime-paths.patch new file mode 100644 index 0000000000..483623e18c --- /dev/null +++ b/openwrt/package/ser/patches/runtime-paths.patch @@ -0,0 +1,119 @@ +diff -urN ser-0.9.0.old/etc/ser.cfg ser-0.9.0/etc/ser.cfg +--- ser-0.9.0.old/etc/ser.cfg 2004-11-30 17:28:24.000000000 +0100 ++++ ser-0.9.0/etc/ser.cfg 2005-03-25 17:23:32.000000000 +0100 +@@ -25,20 +25,20 @@ + # ------------------ module loading ---------------------------------- + + # Uncomment this if you want to use SQL database +-#loadmodule "/usr/local/lib/ser/modules/mysql.so" ++#loadmodule "/usr/lib/ser/modules/mysql.so" + +-loadmodule "/usr/local/lib/ser/modules/sl.so" +-loadmodule "/usr/local/lib/ser/modules/tm.so" +-loadmodule "/usr/local/lib/ser/modules/rr.so" +-loadmodule "/usr/local/lib/ser/modules/maxfwd.so" +-loadmodule "/usr/local/lib/ser/modules/usrloc.so" +-loadmodule "/usr/local/lib/ser/modules/registrar.so" +-loadmodule "/usr/local/lib/ser/modules/textops.so" ++loadmodule "/usr/lib/ser/modules/sl.so" ++loadmodule "/usr/lib/ser/modules/tm.so" ++loadmodule "/usr/lib/ser/modules/rr.so" ++loadmodule "/usr/lib/ser/modules/maxfwd.so" ++loadmodule "/usr/lib/ser/modules/usrloc.so" ++loadmodule "/usr/lib/ser/modules/registrar.so" ++loadmodule "/usr/lib/ser/modules/textops.so" + + # Uncomment this if you want digest authentication + # mysql.so must be loaded ! +-#loadmodule "/usr/local/lib/ser/modules/auth.so" +-#loadmodule "/usr/local/lib/ser/modules/auth_db.so" ++#loadmodule "/usr/lib/ser/modules/auth.so" ++#loadmodule "/usr/lib/ser/modules/auth_db.so" + + # ----------------- setting module-specific parameters --------------- + +diff -urN ser-0.9.0.old/Makefile ser-0.9.0/Makefile +--- ser-0.9.0.old/Makefile 2004-12-08 20:06:12.000000000 +0100 ++++ ser-0.9.0/Makefile 2005-03-25 17:21:35.000000000 +0100 +@@ -198,8 +198,8 @@ + # binary dist. tar.gz + .PHONY: bin + bin: +- mkdir -p tmp/ser/usr/local +- $(MAKE) install basedir=tmp/ser prefix=/usr/local ++ mkdir -p tmp/ser/usr ++ $(MAKE) install basedir=tmp/ser prefix=/usr + $(TAR) -C tmp/ser/ -zcf ../$(NAME)-$(RELEASE)_$(OS)_$(ARCH).tar.gz . + rm -rf tmp/ser + +@@ -211,9 +211,9 @@ + sunpkg: + mkdir -p tmp/ser + mkdir -p tmp/ser_sun_pkg +- $(MAKE) install basedir=tmp/ser prefix=/usr/local ++ $(MAKE) install basedir=tmp/ser prefix=/usr + (cd solaris; \ +- pkgmk -r ../tmp/ser/usr/local -o -d ../tmp/ser_sun_pkg/ -v "$(RELEASE)" ;\ ++ pkgmk -r ../tmp/ser/usr -o -d ../tmp/ser_sun_pkg/ -v "$(RELEASE)" ;\ + cd ..) + cat /dev/null > ../$(NAME)-$(RELEASE)-$(OS)-$(ARCH)-local + pkgtrans -s tmp/ser_sun_pkg/ ../$(NAME)-$(RELEASE)-$(OS)-$(ARCH)-local \ +diff -urN ser-0.9.0.old/Makefile.defs ser-0.9.0/Makefile.defs +--- ser-0.9.0.old/Makefile.defs 2005-03-25 15:28:58.000000000 +0100 ++++ ser-0.9.0/Makefile.defs 2005-03-25 17:26:09.000000000 +0100 +@@ -68,15 +68,15 @@ + # extra CC command line options (e.g -march=athlon-mp) + CC_EXTRA_OPTS ?= + # install location +-DESTDIR ?= /usr/local ++DESTDIR ?= /usr + PREFIX ?= $(DESTDIR) +-LOCALBASE ?= /usr/local ++LOCALBASE ?= /usr + prefix = $(PREFIX) + # install path is $(basedir) $(prefix) + # example: +-# creating a bin. archive in /tmp, which unpacks in /usr/local ++# creating a bin. archive in /tmp, which unpacks in /usr + # basedir=/tmp +-# prefix=/usr/local ++# prefix=/usr + + BASEDIR ?= + basedir = $(BASEDIR) +@@ -121,7 +121,7 @@ + endif + ut-prefix = bin/ + # target dirs for various stuff +-cfg-target = $(prefix)/$(cfg-dir) ++cfg-target = /$(cfg-dir) + bin-target = $(prefix)/$(bin-dir) + modules-target = $(prefix)/$(modules-dir) + doc-target = $(prefix)/$(doc-dir) +@@ -817,7 +817,7 @@ + #MOD_LDFLAGS=-g -G + endif + ifneq ($(TLS),) +- DEFS+= -I/usr/local/ssl/include ++ DEFS+= -I/usr/ssl/include + endif + YACC=yacc + +@@ -826,7 +826,7 @@ + endif + OLD_SOLARIS= $(shell echo "$(OSREL)" | \ + sed -e 's/^5\.[0-6][^0-9]*$$/yes/' ) +- LIBS+= -L/usr/local/lib -lxnet -lnsl ++ LIBS+= -L/usr/lib -lxnet -lnsl + ifeq ($(OLD_SOLARIS), yes) + LIBS+=-lposix4 + else +@@ -918,7 +918,7 @@ + + #add libssl if needed + ifneq ($(TLS),) +-LIBS+= -L/usr/local/lib -L/usr/local/ssl/lib -lssl -lcrypto ++LIBS+= -L/usr/lib -L/usr/ssl/lib -lssl -lcrypto + endif + + ifneq ($(found_lock_method), yes) diff --git a/openwrt/package/ser/ser.control b/openwrt/package/ser/ser.control new file mode 100644 index 0000000000..303bc05484 --- /dev/null +++ b/openwrt/package/ser/ser.control @@ -0,0 +1,8 @@ +Package: ser +Priority: optional +Section: net +Maintainer: Felix Fietkau +Source: buildroot internal +Description: SIP Express Router + SIP Express Router (ser) is a high-performance, + configurable, free SIP server.