2 # Copyright (C) 2012 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
8 include $(TOPDIR)/rules.mk
10 OWSIP_VERSION=2012-02-14
14 PKG_VERSION:=$(OWSIP_VERSION)$(if $(OWSIP_RELEASE),.$(OWSIP_RELEASE))
16 PKG_REV:=da53a53db28b47ca1714ffba72d0df5bea357706
18 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
19 PKG_SOURCE_URL:=git://nbd.name/owsip.git
20 PKG_SOURCE_SUBDIR:=owsip-$(PKG_VERSION)
21 PKG_SOURCE_VERSION:=$(PKG_REV)
23 PKG_MIRROR_MD5SUM:=74b0ab930321c4f85f220ff3852e210a
25 include $(INCLUDE_DIR)/package.mk
27 define Package/owsip-template
31 TITLE:=owsip using $(2)
33 DEPENDS:=+librt +libuci +libubox +pjsip-$(1) $(3)
36 Package/owsip-oss=$(call Package/owsip-template,oss,OSS,BROKEN)
37 Package/owsip-ltq-tapi=$(call Package/owsip-template,ltq-tapi,Lantiq VMMC,@TARGET_lantiq +kmod-ltq-kpi2udp)
39 define Package/owsip-$(BUILD_VARIANT)/description
40 OpenWrt sip daemon - $(BUILD_VARIANT)
43 USE_LOCAL=$(shell ls ./src/ 2>/dev/null >/dev/null && echo 1)
46 $(CP) ./src/* $(PKG_BUILD_DIR)/
50 EXTRA_CFLAGS=-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include \
51 -I$(STAGING_DIR)/usr/pjsip-$(BUILD_VARIANT)/include
52 EXTRA_LDFLAGS=-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/usr/pjsip-$(BUILD_VARIANT)/lib
55 PKG_CONFIG_PATH=$(STAGING_DIR)/usr/pjsip-$(BUILD_VARIANT)/lib/pkgconfig \
56 BACKEND=$(BUILD_VARIANT) CFLAGS="$(EXTRA_CFLAGS)" LDFLAGS="$(EXTRA_LDFLAGS)" $(MAKE) -C $(PKG_BUILD_DIR) $(TARGET_CONFIGURE_OPTS)
59 define Package/owsip-$(BUILD_VARIANT)/conffiles
60 /etc/config/telephony.conf
63 define Package/owsip-$(BUILD_VARIANT)/install
64 $(INSTALL_DIR) $(1)/usr/bin $(1)/etc/init.d $(1)/etc/config $(1)/etc/uci-defaults
65 $(INSTALL_BIN) $(PKG_BUILD_DIR)/owsip_ua $(1)/usr/bin
66 $(INSTALL_BIN) ./files/telephony.init $(1)/etc/init.d/telephony
67 $(INSTALL_DATA) ./files/telephony.conf $(1)/etc/config/telephony
68 $(INSTALL_DATA) ./files/telephony.defaults $(1)/etc/uci-defaults/telephony
71 $(eval $(call BuildPackage,owsip-oss))
72 $(eval $(call BuildPackage,owsip-ltq-tapi))