Merge pull request #868 from neheb/4
[feed/telephony.git] / libs / bcg729 / Makefile
1 #
2 # Copyright (C) 2006-2018 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:=bcg729
11 PKG_VERSION:=1.1.1
12 PKG_RELEASE:=1
13
14 PKG_SOURCE_URL_FILE:=$(PKG_VERSION).tar.gz
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_SOURCE_URL_FILE)
16 PKG_SOURCE_URL:=https://github.com/BelledonneCommunications/$(PKG_NAME)/archive
17 PKG_HASH:=68599a850535d1b182932b3f86558ac8a76d4b899a548183b062956c5fdc916d
18
19 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
20 CMAKE_INSTALL:=1
21
22 PKG_LICENSE:=GPL-3.0-or-later
23 PKG_LICENSE_FILES:=LICENSE.txt
24 PKG_MAINTAINER:=Alex Samorukov <samm@os2.kiev.ua>
25
26 include $(INCLUDE_DIR)/package.mk
27 include $(INCLUDE_DIR)/cmake.mk
28
29 define Package/bcg729
30 SUBMENU:=Telephony
31 SECTION:=libs
32 CATEGORY:=Libraries
33 TITLE:=Software G729A encoder and decoder library written in C
34 URL:=http://www.linphone.org/technical-corner/bcg729.html
35 endef
36
37 define Package/bcg729/description
38 Bcg729 is a software G729A encoder and decoder library written in C, developed
39 by Belledonne Communications, the company supporting the Linphone project.
40 It was written from scratch and is NOT a derivative work of ITU reference
41 source code in any kind.
42 endef
43
44 # Otherwise OpenWrt's CPPFLAGS are ignored
45 TARGET_CFLAGS += $(TARGET_CPPFLAGS)
46
47 CMAKE_OPTIONS += \
48 -DCMAKE_VERBOSE_MAKEFILE=TRUE \
49 -DENABLE_SHARED=YES \
50 -DENABLE_STATIC=NO \
51 -DENABLE_TESTS=NO
52
53 define Build/InstallDev
54 $(INSTALL_DIR) $(1)/usr/include/bcg729
55 $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/include/bcg729/*.h \
56 $(1)/usr/include/bcg729
57 $(INSTALL_DIR) $(1)/usr/lib/{cmake/Bcg729,pkgconfig}
58 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libbcg729.so* $(1)/usr/lib
59 $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/lib$(PKG_NAME).pc \
60 $(1)/usr/lib/pkgconfig
61 $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/Bcg729/cmake/*.cmake \
62 $(1)/usr/lib/cmake/Bcg729
63 endef
64
65 define Package/bcg729/install
66 $(INSTALL_DIR) $(1)/usr/lib
67 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libbcg729.so* $(1)/usr/lib/
68 endef
69
70 $(eval $(call BuildPackage,bcg729))