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