ar71xx: image: add MkuImage{Gzip,Lzma}/initramfs helpers
[openwrt.git] / package / owsip / Makefile
1 #
2 # Copyright (C) 2012 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7
8 include $(TOPDIR)/rules.mk
9
10 OWSIP_VERSION=2012-02-14
11 OWSIP_RELEASE=1
12
13 PKG_NAME:=owsip
14 PKG_VERSION:=$(OWSIP_VERSION)$(if $(OWSIP_RELEASE),.$(OWSIP_RELEASE))
15 PKG_RELEASE:=1
16 PKG_REV:=da53a53db28b47ca1714ffba72d0df5bea357706
17
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)
22 PKG_SOURCE_PROTO:=git
23 PKG_MIRROR_MD5SUM:=74b0ab930321c4f85f220ff3852e210a
24
25 include $(INCLUDE_DIR)/package.mk
26
27 define Package/owsip-template
28 SUBMENU:=Telephony
29 SECTION:=net
30 CATEGORY:=Network
31 TITLE:=owsip using $(2)
32 VARIANT:=$(1)
33 DEPENDS:=+librt +libuci +libubox +pjsip-$(1) $(3)
34 endef
35
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)
38
39 define Package/owsip-$(BUILD_VARIANT)/description
40 OpenWrt sip daemon - $(BUILD_VARIANT)
41 endef
42
43 USE_LOCAL=$(shell ls ./src/ 2>/dev/null >/dev/null && echo 1)
44 ifneq ($(USE_LOCAL),)
45 define Build/Prepare
46 $(CP) ./src/* $(PKG_BUILD_DIR)/
47 endef
48 endif
49
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
53
54 define Build/Compile
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)
57 endef
58
59 define Package/owsip-$(BUILD_VARIANT)/conffiles
60 /etc/config/telephony.conf
61 endef
62
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
69 endef
70
71 $(eval $(call BuildPackage,owsip-oss))
72 $(eval $(call BuildPackage,owsip-ltq-tapi))
This page took 0.044742 seconds and 5 git commands to generate.