2017-07-21 17:37:50 +00:00
|
|
|
#
|
|
|
|
# Copyright (C) 2017 Steven Hessing
|
|
|
|
#
|
|
|
|
# This is free software, licensed under the GNU General Public License v2.
|
|
|
|
# See /LICENSE for more information.
|
|
|
|
#
|
|
|
|
|
|
|
|
include $(TOPDIR)/rules.mk
|
|
|
|
|
|
|
|
PKG_NAME:=libtins
|
2022-11-04 03:42:02 +00:00
|
|
|
PKG_VERSION:=4.4
|
2023-07-01 18:31:23 +00:00
|
|
|
PKG_RELEASE:=4
|
2017-07-21 17:37:50 +00:00
|
|
|
|
2018-07-31 05:30:32 +00:00
|
|
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
|
|
|
PKG_SOURCE_URL:=https://codeload.github.com/mfontanini/libtins/tar.gz/v$(PKG_VERSION)?
|
2022-11-04 03:42:02 +00:00
|
|
|
PKG_HASH:=ff0121b4ec070407e29720c801b7e1a972042300d37560a62c57abadc9635634
|
2017-07-21 17:37:50 +00:00
|
|
|
|
2019-10-22 17:11:39 +00:00
|
|
|
PKG_MAINTAINER:= Steven Hessing <steven.hessing@gmail.com>
|
2017-07-21 17:37:50 +00:00
|
|
|
PKG_LICENSE:=BSD-2-Clause
|
|
|
|
PKG_LICENSE_FILES:=LICENSE
|
|
|
|
|
|
|
|
CMAKE_INSTALL:=1
|
2023-03-23 08:27:01 +00:00
|
|
|
PKG_BUILD_FLAGS:=gc-sections lto
|
2019-10-22 17:11:39 +00:00
|
|
|
|
2017-07-21 17:37:50 +00:00
|
|
|
include $(INCLUDE_DIR)/package.mk
|
2021-06-10 23:27:06 +00:00
|
|
|
include $(INCLUDE_DIR)/cmake.mk
|
2018-07-31 05:30:32 +00:00
|
|
|
|
2017-07-21 17:37:50 +00:00
|
|
|
define Package/libtins
|
2019-10-22 17:11:39 +00:00
|
|
|
SECTION:=net
|
|
|
|
CATEGORY:=Libraries
|
|
|
|
TITLE:=libtins
|
|
|
|
URL:=https://libtins.github.io/
|
2020-02-09 19:48:43 +00:00
|
|
|
DEPENDS:=+libstdcpp +LIBTINS_ENABLE_PCAP:libpcap +LIBTINS_ENABLE_WPA2:libopenssl
|
|
|
|
MENU:=1
|
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/libtins/config
|
|
|
|
source "$(SOURCE)/Config.in"
|
2017-07-21 17:37:50 +00:00
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/libtins/description
|
2019-10-22 17:11:39 +00:00
|
|
|
libtins is a high-level, multiplatform C++ network packet sniffing and crafting library.
|
2017-07-21 17:37:50 +00:00
|
|
|
endef
|
|
|
|
|
2019-10-22 17:11:39 +00:00
|
|
|
CMAKE_OPTIONS += \
|
|
|
|
-D_RUN_RESULT_VAR=FORCE \
|
|
|
|
-DLIBTINS_BUILD_EXAMPLES=OFF \
|
|
|
|
-DLIBTINS_BUILD_TESTS=OFF \
|
2020-02-09 19:48:43 +00:00
|
|
|
-DLIBTINS_ENABLE_ACK_TRACKER=$(if $(CONFIG_LIBTINS_ENABLE_ACK_TRACKER),ON,OFF) \
|
|
|
|
-DLIBTINS_ENABLE_CXX11=$(if $(CONFIG_LIBTINS_ENABLE_CXX11),ON,OFF) \
|
|
|
|
-DLIBTINS_ENABLE_DOT11=$(if $(CONFIG_LIBTINS_ENABLE_DOT11),ON,OFF) \
|
|
|
|
-DLIBTINS_ENABLE_PCAP=$(if $(CONFIG_LIBTINS_ENABLE_PCAP),ON,OFF) \
|
|
|
|
-DLIBTINS_ENABLE_TCP_STREAM_CUSTOM_DATA=$(if $(CONFIG_LIBTINS_ENABLE_TCP_STREAM_CUSTOM_DATA),ON,OFF) \
|
|
|
|
-DLIBTINS_ENABLE_WPA2=$(if $(CONFIG_LIBTINS_ENABLE_WPA2),ON,OFF)
|
2019-10-22 17:11:39 +00:00
|
|
|
|
2023-03-23 08:09:13 +00:00
|
|
|
TARGET_LDFLAGS += -Wl,--as-needed
|
2019-10-22 17:11:39 +00:00
|
|
|
|
2017-07-21 17:37:50 +00:00
|
|
|
define Package/libtins/install
|
2019-06-20 13:25:59 +00:00
|
|
|
$(INSTALL_DIR) $(1)/usr/lib
|
|
|
|
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libtins.so.* $(1)/usr/lib/
|
2017-07-21 17:37:50 +00:00
|
|
|
endef
|
|
|
|
|
|
|
|
$(eval $(call BuildPackage,libtins))
|