treewide: refresh hashes after move to use ZSTD as default
[feed/packages.git] / libs / libtins / Makefile
1 #
2 # Copyright (C) 2017 Steven Hessing
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:=libtins
11 PKG_VERSION:=4.5
12 PKG_RELEASE:=1
13
14 PKG_SOURCE_PROTO:=git
15 PKG_SOURCE_VERSION:=v$(PKG_VERSION)
16 PKG_SOURCE_URL:=https://github.com/mfontanini/libtins
17 PKG_MIRROR_HASH:=85c5a15beca56552ba3f33e10f2a82ee4c47be2b3334d163304362188a37b13a
18
19 PKG_MAINTAINER:= Steven Hessing <steven.hessing@gmail.com>
20 PKG_LICENSE:=BSD-2-Clause
21 PKG_LICENSE_FILES:=LICENSE
22
23 CMAKE_INSTALL:=1
24 PKG_BUILD_FLAGS:=gc-sections lto
25
26 include $(INCLUDE_DIR)/package.mk
27 include $(INCLUDE_DIR)/cmake.mk
28
29 define Package/libtins
30 SECTION:=net
31 CATEGORY:=Libraries
32 TITLE:=libtins
33 URL:=https://libtins.github.io/
34 DEPENDS:=+libstdcpp +LIBTINS_ENABLE_PCAP:libpcap +LIBTINS_ENABLE_WPA2:libopenssl
35 MENU:=1
36 endef
37
38 define Package/libtins/config
39 source "$(SOURCE)/Config.in"
40 endef
41
42 define Package/libtins/description
43 libtins is a high-level, multiplatform C++ network packet sniffing and crafting library.
44 endef
45
46 CMAKE_OPTIONS += \
47 -D_RUN_RESULT_VAR=FORCE \
48 -DLIBTINS_BUILD_EXAMPLES=OFF \
49 -DLIBTINS_BUILD_TESTS=OFF \
50 -DLIBTINS_ENABLE_ACK_TRACKER=$(if $(CONFIG_LIBTINS_ENABLE_ACK_TRACKER),ON,OFF) \
51 -DLIBTINS_ENABLE_CXX11=$(if $(CONFIG_LIBTINS_ENABLE_CXX11),ON,OFF) \
52 -DLIBTINS_ENABLE_DOT11=$(if $(CONFIG_LIBTINS_ENABLE_DOT11),ON,OFF) \
53 -DLIBTINS_ENABLE_PCAP=$(if $(CONFIG_LIBTINS_ENABLE_PCAP),ON,OFF) \
54 -DLIBTINS_ENABLE_TCP_STREAM_CUSTOM_DATA=$(if $(CONFIG_LIBTINS_ENABLE_TCP_STREAM_CUSTOM_DATA),ON,OFF) \
55 -DLIBTINS_ENABLE_WPA2=$(if $(CONFIG_LIBTINS_ENABLE_WPA2),ON,OFF)
56
57 TARGET_LDFLAGS += -Wl,--as-needed
58
59 define Package/libtins/install
60 $(INSTALL_DIR) $(1)/usr/lib
61 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libtins.so.* $(1)/usr/lib/
62 endef
63
64 $(eval $(call BuildPackage,libtins))