[packages] restund, baresip, libre: update to v0.2.0
[openwrt/svn-archive/archive.git] / net / baresip / Makefile
1 #
2 # Makefile
3 #
4 # Copyright (C) 2010 Alfred E. Heggestad
5 #
6
7 include $(TOPDIR)/rules.mk
8
9 PKG_NAME:=baresip
10 PKG_VERSION:=0.2.0
11 PKG_RELEASE:=1
12
13 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
14 PKG_SOURCE_URL:=http://www.creytiv.com/pub/
15 PKG_MD5SUM:=c4e160463b2bfb2e326e916089da1c4f
16
17 include $(INCLUDE_DIR)/package.mk
18
19 EXTRA_DEPS :=
20
21
22 BARESIP_MODULES :=
23
24
25 define Package/baresip/config
26 source "$(SOURCE)/Config.in"
27 endef
28
29
30 ifneq ($(CONFIG_BARESIP_MODULE_ALSA),)
31 BARESIP_MODULES += USE_ALSA=1
32 endif
33 ifneq ($(CONFIG_BARESIP_MODULE_AVCODEC),)
34 BARESIP_MODULES += USE_FFMPEG=1 USE_FFMPEG_AVFORMAT=
35 endif
36 ifneq ($(CONFIG_BARESIP_MODULE_G711),)
37 BARESIP_MODULES += USE_G711=1
38 endif
39 ifneq ($(CONFIG_BARESIP_MODULE_G722),)
40 BARESIP_MODULES += USE_G722=1
41 endif
42 ifneq ($(CONFIG_BARESIP_MODULE_OSS),)
43 BARESIP_MODULES += USE_OSS=1
44 endif
45 ifneq ($(CONFIG_BARESIP_MODULE_SDL),)
46 BARESIP_MODULES += USE_SDL=1
47 endif
48 ifneq ($(CONFIG_BARESIP_MODULE_SPEEX),)
49 BARESIP_MODULES += USE_SPEEX=1
50 endif
51 ifneq ($(CONFIG_BARESIP_MODULE_V4L),)
52 BARESIP_MODULES += USE_V4L=1
53 endif
54 ifneq ($(CONFIG_BARESIP_MODULE_V4L2),)
55 BARESIP_MODULES += USE_V4L2=1
56 endif
57
58
59 define Package/baresip
60 SECTION:=net
61 CATEGORY:=Network
62 SUBMENU:=Telephony
63 DEPENDS:=+libre +libpthread $(EXTRA_DEPS)
64 TITLE:=baresip Barebone SIP useragent
65 URL:=http://www.creytiv.com/
66 endef
67
68 define Build/Compile
69 $(MAKE) -C $(PKG_BUILD_DIR) \
70 LIBRE_MK=../re-$(PKG_VERSION)/mk/re.mk \
71 LIBRE_INC=../re-$(PKG_VERSION)/include \
72 LIBRE_SO=$(STAGING_DIR)/usr/lib/libre.so \
73 MOD_AUTODETECT= \
74 USE_STDIO=1 USE_CONS=1 USE_EVDEV=1 \
75 $(BARESIP_MODULES) \
76 CC="$(TARGET_CC)" \
77 DESTDIR="$(PKG_INSTALL_DIR)" \
78 EXTRA_CFLAGS="$(TARGET_CFLAGS) -DOPENWRT" \
79 $(PKG_MAKE_OPTS) \
80 SYSROOT="$(TOOLCHAIN_DIR)" \
81 SYSROOT_ALT="$(STAGING_DIR)/usr" \
82 RELEASE=1 \
83 all install
84 endef
85
86 define Package/baresip/install
87 $(INSTALL_DIR) $(1)/usr/bin
88 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/baresip $(1)/usr/bin/
89 $(INSTALL_DIR) $(1)/usr/lib/baresip/modules
90 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/baresip/modules/*.so $(1)/usr/lib/baresip/modules/.
91 $(INSTALL_DIR) $(1)/usr/share/baresip
92 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/share/baresip/* $(1)/usr/share/baresip/.
93 $(INSTALL_DIR) $(1)/etc/init.d
94 $(INSTALL_BIN) ./files/baresip.init $(1)/etc/init.d/baresip
95 endef
96
97 $(eval $(call BuildPackage,baresip))