summaryrefslogtreecommitdiffstats
path: root/package/owsip/Makefile
diff options
context:
space:
mode:
authorblogic <blogic@3c298f89-4303-0410-b956-a3cf2f4a3e73>2012-02-14 15:05:52 +0000
committerblogic <blogic@3c298f89-4303-0410-b956-a3cf2f4a3e73>2012-02-14 15:05:52 +0000
commitdecfe8e3f5f428d34cae5735af6919ee39f81508 (patch)
tree7bc1d6f51e1ddad34e5fdd0fc8cf830354848426 /package/owsip/Makefile
parentf8d8046b51814c906bfca0722b84cda5a9fafc0b (diff)
[lantiq] add a simple sip client
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@30519 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/owsip/Makefile')
-rw-r--r--package/owsip/Makefile72
1 files changed, 72 insertions, 0 deletions
diff --git a/package/owsip/Makefile b/package/owsip/Makefile
new file mode 100644
index 000000000..d36036b9d
--- /dev/null
+++ b/package/owsip/Makefile
@@ -0,0 +1,72 @@
+#
+# Copyright (C) 2012 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+OWSIP_VERSION=2012-02-14
+OWSIP_RELEASE=1
+
+PKG_NAME:=owsip
+PKG_VERSION:=$(OWSIP_VERSION)$(if $(OWSIP_RELEASE),.$(OWSIP_RELEASE))
+PKG_RELEASE:=1
+PKG_REV:=da53a53db28b47ca1714ffba72d0df5bea357706
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=git://nbd.name/owsip.git
+PKG_SOURCE_SUBDIR:=owsip-$(PKG_VERSION)
+PKG_SOURCE_VERSION:=$(PKG_REV)
+PKG_SOURCE_PROTO:=git
+PKG_MIRROR_MD5SUM:=74b0ab930321c4f85f220ff3852e210a
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/owsip-template
+ SUBMENU:=Telephony
+ SECTION:=net
+ CATEGORY:=Network
+ TITLE:=owsip using $(2)
+ VARIANT:=$(1)
+ DEPENDS:=+librt +libuci +libubox +pjsip-$(1) $(3)
+endef
+
+Package/owsip-oss=$(call Package/owsip-template,oss,OSS,BROKEN)
+Package/owsip-ltq-tapi=$(call Package/owsip-template,ltq-tapi,Lantiq VMMC,@TARGET_lantiq +kmod-ltq-kpi2udp)
+
+define Package/owsip-$(BUILD_VARIANT)/description
+ OpenWrt sip daemon - $(BUILD_VARIANT)
+endef
+
+USE_LOCAL=$(shell ls ./src/ 2>/dev/null >/dev/null && echo 1)
+ifneq ($(USE_LOCAL),)
+define Build/Prepare
+ $(CP) ./src/* $(PKG_BUILD_DIR)/
+endef
+endif
+
+EXTRA_CFLAGS=-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include \
+ -I$(STAGING_DIR)/usr/pjsip-$(BUILD_VARIANT)/include
+EXTRA_LDFLAGS=-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/usr/pjsip-$(BUILD_VARIANT)/lib
+
+define Build/Compile
+ PKG_CONFIG_PATH=$(STAGING_DIR)/usr/pjsip-$(BUILD_VARIANT)/lib/pkgconfig \
+ BACKEND=$(BUILD_VARIANT) CFLAGS="$(EXTRA_CFLAGS)" LDFLAGS="$(EXTRA_LDFLAGS)" $(MAKE) -C $(PKG_BUILD_DIR) $(TARGET_CONFIGURE_OPTS)
+endef
+
+define Package/owsip-$(BUILD_VARIANT)/conffiles
+/etc/config/telephony.conf
+endef
+
+define Package/owsip-$(BUILD_VARIANT)/install
+ $(INSTALL_DIR) $(1)/usr/bin $(1)/etc/init.d $(1)/etc/config $(1)/etc/uci-defaults
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/owsip_ua $(1)/usr/bin
+ $(INSTALL_BIN) ./files/telephony.init $(1)/etc/init.d/telephony
+ $(INSTALL_DATA) ./files/telephony.conf $(1)/etc/config/telephony
+ $(INSTALL_DATA) ./files/telephony.defaults $(1)/etc/uci-defaults/telephony
+endef
+
+$(eval $(call BuildPackage,owsip-oss))
+$(eval $(call BuildPackage,owsip-ltq-tapi))