Merge pull request #534 from micmac1/fs_rename
[feed/telephony.git] / net / freeswitch-mod-bcg729 / Makefile
1 #
2 # Copyright (C) 2017 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 PKG_NAME:=freeswitch-mod-bcg729
11
12 PKG_VERSION:=20170629
13 PKG_RELEASE:=1
14 PKG_MAINTAINER:=Sebastian Kemper <sebastian_ml@gmx.net>
15
16 PKG_LICENSE:=MPL-1.1
17 PKG_LICENSE_FILES:=LICENSE
18
19 PKG_SOURCE:=freeswitch-mod-bcg729-$(PKG_VERSION).tar.xz
20 PKG_SOURCE_URL:=https://github.com/xadhoom/mod_bcg729.git
21 PKG_SOURCE_PROTO:=git
22 PKG_SOURCE_SUBDIR:=freeswitch-mod-bcg729-$(PKG_VERSION)
23 PKG_SOURCE_VERSION:=686eb06d4a395d94c364efff4b63579af76ebec7
24 PKG_MIRROR_HASH:=efc9421223bba3ba7dd127531aa6887c39ed42d5fb8c0b0c67b15f3c98134b0a
25
26 include $(INCLUDE_DIR)/package.mk
27
28 BCG729_MOD_DIR:=/usr/lib/freeswitch/mod
29
30 BCG729_CFLAGS:=\
31 $(FPIC) \
32 $(TARGET_CFLAGS) \
33 -fno-exceptions \
34 -Wall \
35 -std=c99 \
36 -pedantic
37
38 BCG729_INCLUDES:= \
39 $(TARGET_CPPFLAGS) \
40 -I$(STAGING_DIR)/usr/include/bcg729 \
41 -I$(STAGING_DIR)/usr/include/freeswitch
42
43 BCG729_LDFLAGS:=-lm -Wl,-shared -lbcg729 -Wl,-Bdynamic
44
45 define Package/freeswitch-mod-bcg729
46 TITLE:=bcg729 module
47 SUBMENU:=Telephony
48 SECTION:=net
49 CATEGORY:=Network
50 URL:=https://github.com/xadhoom/mod_bcg729
51 DEPENDS:=freeswitch +bcg729
52 endef
53
54 define Package/freeswitch-mod-bcg729/description
55 FreeSWITCH G.729 module using the opensource bcg729 implementation by
56 Belledonne Communications.
57 endef
58
59 define Package/freeswitch-mod-bcg729/install
60 $(INSTALL_DIR) $(1)$(BCG729_MOD_DIR)
61 $(INSTALL_BIN) $(PKG_BUILD_DIR)/mod_bcg729.so $(1)$(BCG729_MOD_DIR)
62 endef
63
64 define Build/Compile
65 cd $(PKG_BUILD_DIR) && \
66 $(TARGET_CC) \
67 $(BCG729_CFLAGS) \
68 $(BCG729_INCLUDES) \
69 -c mod_bcg729.c && \
70 $(TARGET_CC) \
71 $(BCG729_CFLAGS) \
72 $(BCG729_INCLUDES) \
73 -shared \
74 -Xlinker \
75 -x \
76 -o mod_bcg729.so \
77 mod_bcg729.o \
78 $(BCG729_LDFLAGS)
79 endef
80
81 $(eval $(call BuildPackage,freeswitch-mod-bcg729))