libctb: new package
authorSebastian Kemper <[email protected]>
Tue, 2 Jan 2018 10:11:16 +0000 (11:11 +0100)
committerSebastian Kemper <[email protected]>
Tue, 2 Jan 2018 10:11:27 +0000 (11:11 +0100)
libctb is a dependency of mod_gsmopen in FreeSWITCH.

Signed-off-by: Sebastian Kemper <[email protected]>
libs/libctb/Makefile [new file with mode: 0644]

diff --git a/libs/libctb/Makefile b/libs/libctb/Makefile
new file mode 100644 (file)
index 0000000..9c24fa1
--- /dev/null
@@ -0,0 +1,68 @@
+#
+# Copyright (C) 2018 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=libctb
+PKG_VERSION:=0.16
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://iftools.com/download/ctb/$(PKG_VERSION)
+PKG_HASH:=1cb0026a66cfbf8e26988f76cb861f1fbfd04f272f9b9adaf0d463d01282fc08
+
+MAKE_PATH:=build
+
+PKG_INSTALL:=1
+
+PKG_LICENSE:=LGPL
+PKG_LICENSE_FILES:=build/COPYING
+PKG_MAINTAINER:=Sebastian Kemper <[email protected]>
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/$(PKG_NAME)
+  SUBMENU:=Telephony
+  SECTION:=libs
+  CATEGORY:=Libraries
+  TITLE:=Communications toolbox - ctb
+  URL:=https://iftools.com/opensource/ctb.en.php
+  DEPENDS:=+libstdcpp
+endef
+
+define Package/$(PKG_NAME)/description
+Multiplatform library for different interfaces.
+endef
+
+MAKE_FLAGS += \
+       DEBUG=0 \
+       GPIB=0 \
+       prefix=/usr
+
+define Build/InstallDev
+       $(INSTALL_DIR) $(1)/usr/include/ctb-$(PKG_VERSION)/linux
+       $(INSTALL_DATA) \
+               $(PKG_INSTALL_DIR)/usr/include/ctb-$(PKG_VERSION)/*.h \
+               $(PKG_BUILD_DIR)/include/ctb-$(PKG_VERSION)/kbhit.h \
+               $(1)/usr/include/ctb-$(PKG_VERSION)
+       $(INSTALL_DATA) \
+               $(PKG_INSTALL_DIR)/usr/include/ctb-$(PKG_VERSION)/linux/*.h \
+               $(1)/usr/include/ctb-$(PKG_VERSION)/linux
+       $(INSTALL_DIR) $(1)/usr/lib
+       $(INSTALL_BIN) \
+               $(PKG_INSTALL_DIR)/usr/lib/$(PKG_NAME)-$(PKG_VERSION).so \
+               $(1)/usr/lib
+endef
+
+define Package/$(PKG_NAME)/install
+       $(INSTALL_DIR) $(1)/usr/lib
+       $(INSTALL_BIN) \
+               $(PKG_INSTALL_DIR)/usr/lib/$(PKG_NAME)-$(PKG_VERSION).so \
+               $(1)/usr/lib
+endef
+
+$(eval $(call BuildPackage,$(PKG_NAME)))