6e2b304ce150f16d749dcccd65eb02c5681575cd
[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.1.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:=ee345fe605ffcfce843dae4aed81122b
16
17 include $(INCLUDE_DIR)/package.mk
18
19 EXTRA_DEPS :=
20
21 define Package/baresip
22 SECTION:=net
23 CATEGORY:=Network
24 SUBMENU:=Telephony
25 DEPENDS:=+libre +libpthread $(EXTRA_DEPS)
26 TITLE:=baresip Barebone SIP useragent
27 URL:=http://www.creytiv.com/
28 endef
29
30 define Build/Compile
31 $(MAKE) -C $(PKG_BUILD_DIR) \
32 LIBRE_MK=../re-$(PKG_VERSION)/mk/re.mk \
33 LIBRE_INC=../re-$(PKG_VERSION)/include \
34 LIBRE_SO=$(STAGING_DIR)/usr/lib/libre.so \
35 MOD_AUTODETECT= \
36 USE_G711=1 USE_L16=1 \
37 USE_STDIO=1 USE_CONS=1 USE_EVDEV=1 \
38 USE_OSS=1 \
39 CC="$(TARGET_CC)" \
40 DESTDIR="$(PKG_INSTALL_DIR)" \
41 EXTRA_CFLAGS="$(TARGET_CFLAGS) -DOPENWRT" \
42 $(PKG_MAKE_OPTS) \
43 SYSROOT="$(TOOLCHAIN_DIR)" \
44 SYSROOT_ALT="$(STAGING_DIR)/usr" \
45 RELEASE=1 \
46 all install
47 endef
48
49 define Package/baresip/install
50 $(INSTALL_DIR) $(1)/usr/bin
51 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/baresip $(1)/usr/bin/
52 $(INSTALL_DIR) $(1)/usr/lib/baresip/modules
53 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/baresip/modules/*.so $(1)/usr/lib/baresip/modules/.
54 $(INSTALL_DIR) $(1)/usr/share/baresip
55 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/share/baresip/* $(1)/usr/share/baresip/.
56 $(INSTALL_DIR) $(1)/etc/init.d
57 $(INSTALL_BIN) ./files/baresip.init $(1)/etc/init.d/baresip
58 endef
59
60 $(eval $(call BuildPackage,baresip))