[OpenWrt-Devel] [PATCH] ZNC: Update to 0.096, fix build and minor changes.
Several small fixes for ZNC: * Update to current 0.096, include new module * Fix build to not link modules against libstdc++ * Move root check to after module load, to remove the 30 second pause on start. * Add the possibility to directly use hashed passwords. * Make the sample config more verbose for easier adaption. Signed-off-by: Jonas Gorski jonas.gorski+open...@gmail.com --- net/znc/Makefile | 13 -- net/znc/files/znc.conf | 10 - net/znc/files/znc.init | 11 +- .../patches/001-move_rootcheck_after_config.patch | 43 4 files changed, 70 insertions(+), 7 deletions(-) create mode 100644 net/znc/patches/001-move_rootcheck_after_config.patch diff --git a/net/znc/Makefile b/net/znc/Makefile index caa635c..d139947 100644 --- a/net/znc/Makefile +++ b/net/znc/Makefile @@ -8,12 +8,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=znc -PKG_VERSION:=0.094 -PKG_RELEASE:=2 +PKG_VERSION:=0.096 +PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=...@sf/znc -PKG_MD5SUM:=db101f7a7756285d824b59e3b33e3ad5 +PKG_MD5SUM:=38eec4f1911a68b4d2fc704170e7cbf6 PKG_BUILD_PARALLEL:=1 @@ -45,11 +45,11 @@ endef CONFIGURE_VARS += \ - CXX=$(STAGING_DIR)/host/bin/g++-uc + CXX=$(STAGING_DIR)/host/bin/g++-uc \ CXXFLAGS=$(TARGET_CFLAGS) -fno-builtin -fno-rtti -nostdinc++ \ CPPFLAGS=-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include \ LDFLAGS=-nodefaultlibs -L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib \ - LIBS=-luClibc++ -lm -lssl $(LIBGCC_S) -lc + LIBS=-luClibc++ -lm -lssl -lcrypto $(LIBGCC_S) -lc CONFIGURE_ARGS += \ --disable-c-ares \ @@ -192,6 +192,9 @@ $(eval $(call module,autovoice,Autovoices everyone who joins some channel., \ $(eval $(call module,block-motd,This module blocks the server's Message of the \ Day.,extra/)) +$(eval $(call module,clearbufferonmsg,This module keeps the buffer until the \ + next message from the client.,extra/)) + $(eval $(call module,ctcpflood,This module tries to block ctcp floods.,extra/)) $(eval $(call module,fakeonline,This module fakes the online status of \ diff --git a/net/znc/files/znc.conf b/net/znc/files/znc.conf index ea7f460..f7eceb1 100644 --- a/net/znc/files/znc.conf +++ b/net/znc/files/znc.conf @@ -1,15 +1,23 @@ config znc # where to listen for connections list listener '192.168.1.1 1234' + # load global modules (You need to install them first): + # list module 'fail2ban' config user 'sampleUser' + # Use either a plain text password or use the full sha256#... line. + # You can generate one with 'znc -s'. option password 'changeme' option nick 'sampleUser' option altnick 'userSample' option ident'openwrt' option realname 'John Doe' + # This adds support for channels in znc configuration: # list channel'#chan optional_password' - # list of allowed servers + # list of allowed servers: list server 'chat.freenode.net 6667' + + # load user modules ('module [params...]'): + # list module 'simple_away -timer 10 disconnected' diff --git a/net/znc/files/znc.init b/net/znc/files/znc.init index 35aba1c..856b646 100644 --- a/net/znc/files/znc.init +++ b/net/znc/files/znc.init @@ -67,7 +67,16 @@ add_user() { config_get vhost $user vhost echo User $user $ZNC_CONFIG - echo Pass = plain#$password $ZNC_CONFIG + + case $password in + md5#* | sha256#* | plain#*) + echo Pass = $password $ZNC_CONFIG + ;; + *) + echo Pass = plain#$password $ZNC_CONFIG + ;; + esac + echo Nick = $nick $ZNC_CONFIG echo AltNick = ${altnick:-$nick_} $ZNC_CONFIG echo Ident = ${ident:-$nick} $ZNC_CONFIG diff --git a/net/znc/patches/001-move_rootcheck_after_config.patch b/net/znc/patches/001-move_rootcheck_after_config.patch new file mode 100644 index 000..6e401ac --- /dev/null +++ b/net/znc/patches/001-move_rootcheck_after_config.patch @@ -0,0 +1,43 @@ +--- znc-0.094/main.cpp.orig2010-10-25 02:30:18.0 +0200 znc-0.094/main.cpp 2010-10-25 02:52:03.0 +0200 +@@ -194,19 +194,6 @@ + } + #endif + +- if (isRoot()) { +- CUtils::PrintError(You are running ZNC as root! Don't do that! There are not many valid); +- CUtils::PrintError(reasons for this and it can, in theory, cause great damage!); +- if (!bAllowRoot) { +- delete pZNC; +- return 1; +- } +- CUtils::PrintError(You have been warned.); +- CUtils::PrintError(Hit CTRL+C now if you don't want to run ZNC as root.); +- CUtils::PrintError(ZNC will start in 30
Re: [OpenWrt-Devel] [PATCH] ZNC: Update to 0.096, fix build and minor changes.
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Committed in r24548 - thanks! -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk0GZz8ACgkQdputYINPTPPhjACfXQPNl/7vWvLPctHlBMkn/mQi FqMAn1l9VgZnvEOKD2nVUIqubtX3TxLQ =W5XY -END PGP SIGNATURE- ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH] contribute Open-Source VoIP projects
Hi all, I would like to contribute my Open-Source VoIP projects to the OpenWRT project .. the code has been running fine on my ASUS WL-500Gp for some time now, so I hope that it is mature enough for other people to also use it. The following projects are part of this patch: * baresip -- Modular SIP User-Agent * restund -- Modular STUN/TURN Server * libre-- Shared library with SIP/SDP,RTP/RTCP,STUN/TURN/ICE etc. Your comments are welcome .. Signed-off-by: Alfred E. Heggestad a...@db.org --- diff '--exclude=.svn' -Naur package-orig//baresip/files/baresip.init package//baresip/files/baresip.init --- package-orig//baresip/files/baresip.init1970-01-01 01:00:00.0 +0100 +++ package//baresip/files/baresip.init 2010-11-12 19:29:38.0 +0100 @@ -0,0 +1,19 @@ +#!/bin/sh /etc/rc.common +# +# Copyright (C) 2010 Alfred E. Heggestad +# + +START=92 +BIN=baresip +DEFAULT=/etc/default/$BIN +OPTIONS=-d + +start() { + [ -f $DEFAULT ] . $DEFAULT + $BIN $OPTIONS +} + +stop() { + killall $BIN +} + diff '--exclude=.svn' -Naur package-orig//baresip/Makefile package//baresip/Makefile --- package-orig//baresip/Makefile 1970-01-01 01:00:00.0 +0100 +++ package//baresip/Makefile 2010-12-06 02:34:06.0 +0100 @@ -0,0 +1,79 @@ +# +# Makefile +# +# Copyright (C) 2010 Alfred E. Heggestad +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=baresip +PKG_VERSION:=0.1.0 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://www.creytiv.com/pub/ +#PKG_MD5SUM:=ee345fe605ffcfce843dae4aed81122b + +include $(INCLUDE_DIR)/package.mk + +EXTRA_DEPS := + +ifneq ($(CONFIG_PACKAGE_libgsm),) + PKG_MAKE_OPTS += USE_GSM=1 + EXTRA_DEPS+= +libgsm +else + PKG_MAKE_OPTS += USE_GSM= +endif + +ifneq ($(CONFIG_PACKAGE_libspeex),) + PKG_MAKE_OPTS += USE_SPEEX=1 USE_SPEEX_AEC=1 USE_SPEEX_PP=1 USE_SPEEX_RESAMP=1 + EXTRA_DEPS+= +libspeex +else + PKG_MAKE_OPTS += USE_SPEEX= USE_SPEEX_AEC= USE_SPEEX_PP= USE_SPEEX_RESAMP= +endif + + +define Package/baresip + SECTION:=utils + CATEGORY:=Utilities + DEPENDS:=+libre +libpthread $(EXTRA_DEPS) + TITLE:=baresip Barebone SIP useragent + URL:=http://www.creytiv.com/ +endef + + +# Optional feature +ifneq ($(CONFIG_PACKAGE_libsrtp),) + PKG_MAKE_OPTS += USE_SRTP=1 +else + PKG_MAKE_OPTS += USE_SRTP= +endif + +define Build/Compile + $(MAKE) -C $(PKG_BUILD_DIR) \ + MOD_AUTODETECT= \ + USE_G711=1 USE_L16=1 \ + USE_STDIO=1 USE_CONS=1 USE_EVDEV=1 \ + USE_OSS=1 \ + CC=$(TARGET_CC) \ + DESTDIR=$(PKG_INSTALL_DIR) \ + EXTRA_CFLAGS=$(TARGET_CFLAGS) -DOPENWRT \ + $(PKG_MAKE_OPTS) \ + SYSROOT=$(TOOLCHAIN_DIR)/usr \ + SYSROOT_ALT=$(STAGING_DIR)/usr \ + RELEASE=1 \ + all install +endef + +define Package/baresip/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/baresip $(1)/usr/bin/ + $(INSTALL_DIR) $(1)/usr/lib/baresip/modules + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/baresip/modules/*.so $(1)/usr/lib/baresip/modules/. + $(INSTALL_DIR) $(1)/usr/share/baresip + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/share/baresip/* $(1)/usr/share/baresip/. + $(INSTALL_DIR) $(1)/etc/init.d + $(INSTALL_BIN) ./files/baresip.init $(1)/etc/init.d/baresip +endef + +$(eval $(call BuildPackage,baresip)) diff '--exclude=.svn' -Naur package-orig//re/Makefile package//re/Makefile --- package-orig//re/Makefile 1970-01-01 01:00:00.0 +0100 +++ package//re/Makefile2010-12-06 02:27:31.0 +0100 @@ -0,0 +1,63 @@ +# +# Makefile +# +# Copyright (C) 2010 Alfred E. Heggestad +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=re +PKG_VERSION:=0.1.0 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://www.creytiv.com/pub +#PKG_MD5SUM:=734892c8ca5e7e835828048a1289a0cc + +include $(INCLUDE_DIR)/package.mk + +define Package/libre + SECTION:=libs + CATEGORY:=Libraries + DEPENDS:=+libopenssl +libpthread + TITLE:=Generic library for real-time communications with async IO support + URL:=http://www.creytiv.com/ +endef + +define Package/libre/description + Generic library for real-time communications with async IO support. +endef + +TARGET_CFLAGS += $(FPIC) + +define Build/Compile + $(MAKE) -C $(PKG_BUILD_DIR) \ + CC=$(TARGET_CC) \ + EXTRA_CFLAGS=$(TARGET_CFLAGS) -DOPENWRT \ + EXTRA_LFLAGS=-lm \ + DESTDIR=$(PKG_INSTALL_DIR) \ + SYSROOT=$(TOOLCHAIN_DIR)/usr \ + SYSROOT_ALT=$(STAGING_DIR)/usr \ + RELEASE=1 \ + all install +endef + +define Build/InstallDev + mkdir -p $(1)/usr/include + $(CP) $(PKG_INSTALL_DIR)/usr/include/re $(1)/usr/include/ + mkdir -p $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libre.{a,so*}
Re: [OpenWrt-Devel] [PATCH] contribute Open-Source VoIP projects
This patch appears to place your packes under package, they should be package/net and package/lib please fix and resubmit this so we can apply it to the test tree On Mon, Dec 13, 2010 at 7:10 PM, Alfred E. Heggestad a...@db.org wrote: Hi all, I would like to contribute my Open-Source VoIP projects to the OpenWRT project .. the code has been running fine on my ASUS WL-500Gp for some time now, so I hope that it is mature enough for other people to also use it. The following projects are part of this patch: * baresip -- Modular SIP User-Agent * restund -- Modular STUN/TURN Server * libre-- Shared library with SIP/SDP,RTP/RTCP,STUN/TURN/ICE etc. Your comments are welcome .. Signed-off-by: Alfred E. Heggestad a...@db.org --- diff '--exclude=.svn' -Naur package-orig//baresip/files/baresip.init package//baresip/files/baresip.init --- package-orig//baresip/files/baresip.init1970-01-01 01:00:00.0 +0100 +++ package//baresip/files/baresip.init 2010-11-12 19:29:38.0 +0100 @@ -0,0 +1,19 @@ +#!/bin/sh /etc/rc.common +# +# Copyright (C) 2010 Alfred E. Heggestad +# + +START=92 +BIN=baresip +DEFAULT=/etc/default/$BIN +OPTIONS=-d + +start() { + [ -f $DEFAULT ] . $DEFAULT + $BIN $OPTIONS +} + +stop() { + killall $BIN +} + diff '--exclude=.svn' -Naur package-orig//baresip/Makefile package//baresip/Makefile --- package-orig//baresip/Makefile 1970-01-01 01:00:00.0 +0100 +++ package//baresip/Makefile 2010-12-06 02:34:06.0 +0100 @@ -0,0 +1,79 @@ +# +# Makefile +# +# Copyright (C) 2010 Alfred E. Heggestad +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=baresip +PKG_VERSION:=0.1.0 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://www.creytiv.com/pub/ +#PKG_MD5SUM:=ee345fe605ffcfce843dae4aed81122b + +include $(INCLUDE_DIR)/package.mk + +EXTRA_DEPS := + +ifneq ($(CONFIG_PACKAGE_libgsm),) + PKG_MAKE_OPTS += USE_GSM=1 + EXTRA_DEPS+= +libgsm +else + PKG_MAKE_OPTS += USE_GSM= +endif + +ifneq ($(CONFIG_PACKAGE_libspeex),) + PKG_MAKE_OPTS += USE_SPEEX=1 USE_SPEEX_AEC=1 USE_SPEEX_PP=1 USE_SPEEX_RESAMP=1 + EXTRA_DEPS+= +libspeex +else + PKG_MAKE_OPTS += USE_SPEEX= USE_SPEEX_AEC= USE_SPEEX_PP= USE_SPEEX_RESAMP= +endif + + +define Package/baresip + SECTION:=utils + CATEGORY:=Utilities + DEPENDS:=+libre +libpthread $(EXTRA_DEPS) + TITLE:=baresip Barebone SIP useragent + URL:=http://www.creytiv.com/ +endef + + +# Optional feature +ifneq ($(CONFIG_PACKAGE_libsrtp),) + PKG_MAKE_OPTS += USE_SRTP=1 +else + PKG_MAKE_OPTS += USE_SRTP= +endif + +define Build/Compile + $(MAKE) -C $(PKG_BUILD_DIR) \ + MOD_AUTODETECT= \ + USE_G711=1 USE_L16=1 \ + USE_STDIO=1 USE_CONS=1 USE_EVDEV=1 \ + USE_OSS=1 \ + CC=$(TARGET_CC) \ + DESTDIR=$(PKG_INSTALL_DIR) \ + EXTRA_CFLAGS=$(TARGET_CFLAGS) -DOPENWRT \ + $(PKG_MAKE_OPTS) \ + SYSROOT=$(TOOLCHAIN_DIR)/usr \ + SYSROOT_ALT=$(STAGING_DIR)/usr \ + RELEASE=1 \ + all install +endef + +define Package/baresip/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/baresip $(1)/usr/bin/ + $(INSTALL_DIR) $(1)/usr/lib/baresip/modules + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/baresip/modules/*.so $(1)/usr/lib/baresip/modules/. + $(INSTALL_DIR) $(1)/usr/share/baresip + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/share/baresip/* $(1)/usr/share/baresip/. + $(INSTALL_DIR) $(1)/etc/init.d + $(INSTALL_BIN) ./files/baresip.init $(1)/etc/init.d/baresip +endef + +$(eval $(call BuildPackage,baresip)) diff '--exclude=.svn' -Naur package-orig//re/Makefile package//re/Makefile --- package-orig//re/Makefile 1970-01-01 01:00:00.0 +0100 +++ package//re/Makefile2010-12-06 02:27:31.0 +0100 @@ -0,0 +1,63 @@ +# +# Makefile +# +# Copyright (C) 2010 Alfred E. Heggestad +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=re +PKG_VERSION:=0.1.0 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://www.creytiv.com/pub +#PKG_MD5SUM:=734892c8ca5e7e835828048a1289a0cc + +include $(INCLUDE_DIR)/package.mk + +define Package/libre + SECTION:=libs + CATEGORY:=Libraries + DEPENDS:=+libopenssl +libpthread + TITLE:=Generic library for real-time communications with async IO support + URL:=http://www.creytiv.com/ +endef + +define Package/libre/description + Generic library for real-time communications with async IO support. +endef + +TARGET_CFLAGS += $(FPIC) + +define Build/Compile + $(MAKE) -C $(PKG_BUILD_DIR) \ + CC=$(TARGET_CC) \ + EXTRA_CFLAGS=$(TARGET_CFLAGS) -DOPENWRT \ + EXTRA_LFLAGS=-lm \ +
Re: [OpenWrt-Devel] [PATCH] contribute Open-Source VoIP projects
Hi, Alfred: Can you describe these packages or point to some documentation on them? They sound interesting. marc - Marc Abrams 408-550-6272 On Mon, Dec 13, 2010 at 4:10 PM, Alfred E. Heggestad a...@db.org wrote: Hi all, I would like to contribute my Open-Source VoIP projects to the OpenWRT project .. the code has been running fine on my ASUS WL-500Gp for some time now, so I hope that it is mature enough for other people to also use it. The following projects are part of this patch: * baresip -- Modular SIP User-Agent * restund -- Modular STUN/TURN Server * libre-- Shared library with SIP/SDP,RTP/RTCP,STUN/TURN/ICE etc. Your comments are welcome .. Signed-off-by: Alfred E. Heggestad a...@db.org --- diff '--exclude=.svn' -Naur package-orig//baresip/files/baresip.init package//baresip/files/baresip.init --- package-orig//baresip/files/baresip.init1970-01-01 01:00:00.0 +0100 +++ package//baresip/files/baresip.init 2010-11-12 19:29:38.0 +0100 @@ -0,0 +1,19 @@ +#!/bin/sh /etc/rc.common +# +# Copyright (C) 2010 Alfred E. Heggestad +# + +START=92 +BIN=baresip +DEFAULT=/etc/default/$BIN +OPTIONS=-d + +start() { + [ -f $DEFAULT ] . $DEFAULT + $BIN $OPTIONS +} + +stop() { + killall $BIN +} + diff '--exclude=.svn' -Naur package-orig//baresip/Makefile package//baresip/Makefile --- package-orig//baresip/Makefile 1970-01-01 01:00:00.0 +0100 +++ package//baresip/Makefile 2010-12-06 02:34:06.0 +0100 @@ -0,0 +1,79 @@ +# +# Makefile +# +# Copyright (C) 2010 Alfred E. Heggestad +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=baresip +PKG_VERSION:=0.1.0 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://www.creytiv.com/pub/ +#PKG_MD5SUM:=ee345fe605ffcfce843dae4aed81122b + +include $(INCLUDE_DIR)/package.mk + +EXTRA_DEPS := + +ifneq ($(CONFIG_PACKAGE_libgsm),) + PKG_MAKE_OPTS += USE_GSM=1 + EXTRA_DEPS+= +libgsm +else + PKG_MAKE_OPTS += USE_GSM= +endif + +ifneq ($(CONFIG_PACKAGE_libspeex),) + PKG_MAKE_OPTS += USE_SPEEX=1 USE_SPEEX_AEC=1 USE_SPEEX_PP=1 USE_SPEEX_RESAMP=1 + EXTRA_DEPS+= +libspeex +else + PKG_MAKE_OPTS += USE_SPEEX= USE_SPEEX_AEC= USE_SPEEX_PP= USE_SPEEX_RESAMP= +endif + + +define Package/baresip + SECTION:=utils + CATEGORY:=Utilities + DEPENDS:=+libre +libpthread $(EXTRA_DEPS) + TITLE:=baresip Barebone SIP useragent + URL:=http://www.creytiv.com/ +endef + + +# Optional feature +ifneq ($(CONFIG_PACKAGE_libsrtp),) + PKG_MAKE_OPTS += USE_SRTP=1 +else + PKG_MAKE_OPTS += USE_SRTP= +endif + +define Build/Compile + $(MAKE) -C $(PKG_BUILD_DIR) \ + MOD_AUTODETECT= \ + USE_G711=1 USE_L16=1 \ + USE_STDIO=1 USE_CONS=1 USE_EVDEV=1 \ + USE_OSS=1 \ + CC=$(TARGET_CC) \ + DESTDIR=$(PKG_INSTALL_DIR) \ + EXTRA_CFLAGS=$(TARGET_CFLAGS) -DOPENWRT \ + $(PKG_MAKE_OPTS) \ + SYSROOT=$(TOOLCHAIN_DIR)/usr \ + SYSROOT_ALT=$(STAGING_DIR)/usr \ + RELEASE=1 \ + all install +endef + +define Package/baresip/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/baresip $(1)/usr/bin/ + $(INSTALL_DIR) $(1)/usr/lib/baresip/modules + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/baresip/modules/*.so $(1)/usr/lib/baresip/modules/. + $(INSTALL_DIR) $(1)/usr/share/baresip + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/share/baresip/* $(1)/usr/share/baresip/. + $(INSTALL_DIR) $(1)/etc/init.d + $(INSTALL_BIN) ./files/baresip.init $(1)/etc/init.d/baresip +endef + +$(eval $(call BuildPackage,baresip)) diff '--exclude=.svn' -Naur package-orig//re/Makefile package//re/Makefile --- package-orig//re/Makefile 1970-01-01 01:00:00.0 +0100 +++ package//re/Makefile2010-12-06 02:27:31.0 +0100 @@ -0,0 +1,63 @@ +# +# Makefile +# +# Copyright (C) 2010 Alfred E. Heggestad +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=re +PKG_VERSION:=0.1.0 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://www.creytiv.com/pub +#PKG_MD5SUM:=734892c8ca5e7e835828048a1289a0cc + +include $(INCLUDE_DIR)/package.mk + +define Package/libre + SECTION:=libs + CATEGORY:=Libraries + DEPENDS:=+libopenssl +libpthread + TITLE:=Generic library for real-time communications with async IO support + URL:=http://www.creytiv.com/ +endef + +define Package/libre/description + Generic library for real-time communications with async IO support. +endef + +TARGET_CFLAGS += $(FPIC) + +define Build/Compile + $(MAKE) -C $(PKG_BUILD_DIR) \ + CC=$(TARGET_CC) \ + EXTRA_CFLAGS=$(TARGET_CFLAGS) -DOPENWRT \ +
Re: [OpenWrt-Devel] [PATCH] contribute Open-Source VoIP projects
On 12/14/10 1:22 AM, Outback Dingo wrote: This patch appears to place your packes under package, they should be package/net and package/lib please fix and resubmit this so we can apply it to the test tree Hi, many thanks for your reply .. I have updated the patch as requested, please find it inline: On Mon, Dec 13, 2010 at 7:10 PM, Alfred E. Heggestad a...@db.org mailto:a...@db.org wrote: Hi all, I would like to contribute my Open-Source VoIP projects to the OpenWRT project .. the code has been running fine on my ASUS WL-500Gp for some time now, so I hope that it is mature enough for other people to also use it. The following projects are part of this patch: * baresip -- Modular SIP User-Agent * restund -- Modular STUN/TURN Server * libre-- Shared library with SIP/SDP,RTP/RTCP,STUN/TURN/ICE etc. Your comments are welcome .. Signed-off-by: Alfred E. Heggestad a...@db.org mailto:a...@db.org --- diff '--exclude=.svn' -Naur package-orig/libs/re/Makefile package/libs/re/Makefile --- package-orig/libs/re/Makefile 1970-01-01 01:00:00.0 +0100 +++ package/libs/re/Makefile2010-12-06 02:27:31.0 +0100 @@ -0,0 +1,63 @@ +# +# Makefile +# +# Copyright (C) 2010 Alfred E. Heggestad +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=re +PKG_VERSION:=0.1.0 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://www.creytiv.com/pub +#PKG_MD5SUM:=734892c8ca5e7e835828048a1289a0cc + +include $(INCLUDE_DIR)/package.mk + +define Package/libre + SECTION:=libs + CATEGORY:=Libraries + DEPENDS:=+libopenssl +libpthread + TITLE:=Generic library for real-time communications with async IO support + URL:=http://www.creytiv.com/ +endef + +define Package/libre/description + Generic library for real-time communications with async IO support. +endef + +TARGET_CFLAGS += $(FPIC) + +define Build/Compile + $(MAKE) -C $(PKG_BUILD_DIR) \ + CC=$(TARGET_CC) \ + EXTRA_CFLAGS=$(TARGET_CFLAGS) -DOPENWRT \ + EXTRA_LFLAGS=-lm \ + DESTDIR=$(PKG_INSTALL_DIR) \ + SYSROOT=$(TOOLCHAIN_DIR)/usr \ + SYSROOT_ALT=$(STAGING_DIR)/usr \ + RELEASE=1 \ + all install +endef + +define Build/InstallDev + mkdir -p $(1)/usr/include + $(CP) $(PKG_INSTALL_DIR)/usr/include/re $(1)/usr/include/ + mkdir -p $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libre.{a,so*} $(1)/usr/lib/ +endef + +define Build/UninstallDev + rm -rf \ + $(STAGING_DIR)/usr/include/re \ + $(STAGING_DIR)/usr/lib/libre.{a,so*} +endef + +define Package/libre/install + $(INSTALL_DIR) $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libre.so* $(1)/usr/lib/ +endef + +$(eval $(call BuildPackage,libre)) diff '--exclude=.svn' -Naur package-orig/net/baresip/files/baresip.init package/net/baresip/files/baresip.init --- package-orig/net/baresip/files/baresip.init 1970-01-01 01:00:00.0 +0100 +++ package/net/baresip/files/baresip.init 2010-11-12 19:29:38.0 +0100 @@ -0,0 +1,19 @@ +#!/bin/sh /etc/rc.common +# +# Copyright (C) 2010 Alfred E. Heggestad +# + +START=92 +BIN=baresip +DEFAULT=/etc/default/$BIN +OPTIONS=-d + +start() { + [ -f $DEFAULT ] . $DEFAULT + $BIN $OPTIONS +} + +stop() { + killall $BIN +} + diff '--exclude=.svn' -Naur package-orig/net/baresip/Makefile package/net/baresip/Makefile --- package-orig/net/baresip/Makefile 1970-01-01 01:00:00.0 +0100 +++ package/net/baresip/Makefile2010-12-06 02:34:06.0 +0100 @@ -0,0 +1,79 @@ +# +# Makefile +# +# Copyright (C) 2010 Alfred E. Heggestad +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=baresip +PKG_VERSION:=0.1.0 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://www.creytiv.com/pub/ +#PKG_MD5SUM:=ee345fe605ffcfce843dae4aed81122b + +include $(INCLUDE_DIR)/package.mk + +EXTRA_DEPS := + +ifneq ($(CONFIG_PACKAGE_libgsm),) + PKG_MAKE_OPTS += USE_GSM=1 + EXTRA_DEPS+= +libgsm +else + PKG_MAKE_OPTS += USE_GSM= +endif + +ifneq ($(CONFIG_PACKAGE_libspeex),) + PKG_MAKE_OPTS += USE_SPEEX=1 USE_SPEEX_AEC=1 USE_SPEEX_PP=1 USE_SPEEX_RESAMP=1 + EXTRA_DEPS+= +libspeex +else + PKG_MAKE_OPTS += USE_SPEEX= USE_SPEEX_AEC= USE_SPEEX_PP= USE_SPEEX_RESAMP= +endif + + +define Package/baresip + SECTION:=utils + CATEGORY:=Utilities + DEPENDS:=+libre +libpthread $(EXTRA_DEPS) + TITLE:=baresip Barebone SIP useragent + URL:=http://www.creytiv.com/ +endef + + +# Optional feature +ifneq ($(CONFIG_PACKAGE_libsrtp),) + PKG_MAKE_OPTS += USE_SRTP=1 +else + PKG_MAKE_OPTS += USE_SRTP= +endif + +define Build/Compile + $(MAKE) -C $(PKG_BUILD_DIR) \ + MOD_AUTODETECT= \ + USE_G711=1 USE_L16=1 \ + USE_STDIO=1 USE_CONS=1 USE_EVDEV=1 \ + USE_OSS=1 \ + CC=$(TARGET_CC) \ +
Re: [OpenWrt-Devel] [PATCH] contribute Open-Source VoIP projects
Hi Alfred I also see $(INSTALL_CONF) $(PKG_BUILD_DIR)/etc/restund.conf $(1)/etc/ of which i dont see in the patch.. On Mon, Dec 13, 2010 at 7:38 PM, Alfred E. Heggestad a...@db.org wrote: On 12/14/10 1:22 AM, Outback Dingo wrote: This patch appears to place your packes under package, they should be package/net and package/lib please fix and resubmit this so we can apply it to the test tree Hi, many thanks for your reply .. I have updated the patch as requested, please find it inline: On Mon, Dec 13, 2010 at 7:10 PM, Alfred E. Heggestad a...@db.org mailto: a...@db.org wrote: Hi all, I would like to contribute my Open-Source VoIP projects to the OpenWRT project .. the code has been running fine on my ASUS WL-500Gp for some time now, so I hope that it is mature enough for other people to also use it. The following projects are part of this patch: * baresip -- Modular SIP User-Agent * restund -- Modular STUN/TURN Server * libre-- Shared library with SIP/SDP,RTP/RTCP,STUN/TURN/ICE etc. Your comments are welcome .. Signed-off-by: Alfred E. Heggestad a...@db.org mailto:a...@db.org --- diff '--exclude=.svn' -Naur package-orig/libs/re/Makefile package/libs/re/Makefile --- package-orig/libs/re/Makefile 1970-01-01 01:00:00.0 +0100 +++ package/libs/re/Makefile2010-12-06 02:27:31.0 +0100 @@ -0,0 +1,63 @@ +# +# Makefile +# +# Copyright (C) 2010 Alfred E. Heggestad +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=re +PKG_VERSION:=0.1.0 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://www.creytiv.com/pub +#PKG_MD5SUM:=734892c8ca5e7e835828048a1289a0cc + +include $(INCLUDE_DIR)/package.mk + +define Package/libre + SECTION:=libs + CATEGORY:=Libraries + DEPENDS:=+libopenssl +libpthread + TITLE:=Generic library for real-time communications with async IO support + URL:=http://www.creytiv.com/ +endef + +define Package/libre/description + Generic library for real-time communications with async IO support. +endef + +TARGET_CFLAGS += $(FPIC) + +define Build/Compile + $(MAKE) -C $(PKG_BUILD_DIR) \ + CC=$(TARGET_CC) \ + EXTRA_CFLAGS=$(TARGET_CFLAGS) -DOPENWRT \ + EXTRA_LFLAGS=-lm \ + DESTDIR=$(PKG_INSTALL_DIR) \ + SYSROOT=$(TOOLCHAIN_DIR)/usr \ + SYSROOT_ALT=$(STAGING_DIR)/usr \ + RELEASE=1 \ + all install +endef + +define Build/InstallDev + mkdir -p $(1)/usr/include + $(CP) $(PKG_INSTALL_DIR)/usr/include/re $(1)/usr/include/ + mkdir -p $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libre.{a,so*} $(1)/usr/lib/ +endef + +define Build/UninstallDev + rm -rf \ + $(STAGING_DIR)/usr/include/re \ + $(STAGING_DIR)/usr/lib/libre.{a,so*} +endef + +define Package/libre/install + $(INSTALL_DIR) $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libre.so* $(1)/usr/lib/ +endef + +$(eval $(call BuildPackage,libre)) diff '--exclude=.svn' -Naur package-orig/net/baresip/files/baresip.init package/net/baresip/files/baresip.init --- package-orig/net/baresip/files/baresip.init 1970-01-01 01:00:00.0 +0100 +++ package/net/baresip/files/baresip.init 2010-11-12 19:29:38.0 +0100 @@ -0,0 +1,19 @@ +#!/bin/sh /etc/rc.common +# +# Copyright (C) 2010 Alfred E. Heggestad +# + +START=92 +BIN=baresip +DEFAULT=/etc/default/$BIN +OPTIONS=-d + +start() { + [ -f $DEFAULT ] . $DEFAULT + $BIN $OPTIONS +} + +stop() { + killall $BIN +} + diff '--exclude=.svn' -Naur package-orig/net/baresip/Makefile package/net/baresip/Makefile --- package-orig/net/baresip/Makefile 1970-01-01 01:00:00.0 +0100 +++ package/net/baresip/Makefile2010-12-06 02:34:06.0 +0100 @@ -0,0 +1,79 @@ +# +# Makefile +# +# Copyright (C) 2010 Alfred E. Heggestad +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=baresip +PKG_VERSION:=0.1.0 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://www.creytiv.com/pub/ +#PKG_MD5SUM:=ee345fe605ffcfce843dae4aed81122b + +include $(INCLUDE_DIR)/package.mk + +EXTRA_DEPS := + +ifneq ($(CONFIG_PACKAGE_libgsm),) + PKG_MAKE_OPTS += USE_GSM=1 + EXTRA_DEPS+= +libgsm +else + PKG_MAKE_OPTS += USE_GSM= +endif + +ifneq ($(CONFIG_PACKAGE_libspeex),) + PKG_MAKE_OPTS += USE_SPEEX=1 USE_SPEEX_AEC=1 USE_SPEEX_PP=1 USE_SPEEX_RESAMP=1 + EXTRA_DEPS+= +libspeex +else + PKG_MAKE_OPTS += USE_SPEEX= USE_SPEEX_AEC= USE_SPEEX_PP= USE_SPEEX_RESAMP= +endif + + +define Package/baresip + SECTION:=utils + CATEGORY:=Utilities + DEPENDS:=+libre +libpthread $(EXTRA_DEPS) + TITLE:=baresip Barebone SIP useragent + URL:=http://www.creytiv.com/ +endef + + +# Optional feature +ifneq
Re: [OpenWrt-Devel] [PATCH] contribute Open-Source VoIP projects
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi. I also see $(INSTALL_CONF) $(PKG_BUILD_DIR)/etc/restund.conf $(1)/etc/ of which i dont see in the patch.. Its from the source tarball, not ./files, so downloaded during build. ~ Jow -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk0GySoACgkQdputYINPTPMOCwCgju38vO7UTq+K1jkljp1fLGkP FUMAnjybOmTJzP/2BHlV+kPV2eaETAF4 =Sgtl -END PGP SIGNATURE- ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH] contribute Open-Source VoIP projects
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hey, the patch looks clean so far but I don't like the idea of conditional compilation. For the initial version its okay to always mandate libspeex etc. and make it a static DEPENDS:=... . In a later version you should maybe look into providing a full and mini variant of your package, or even better, make the code parts requiring speex etc. loadable libraries. Of course I cannot judge how much effort this would be, but maybe consider it. ~ Jow -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk0GyyQACgkQdputYINPTPOlPgCfcpcHQ5g19xklfuZJee2wibLQ 1XUAnioIcW3k395VrgMXtz4EmSTcvVb7 =Q6dK -END PGP SIGNATURE- ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel