2 # Copyright (C) 2017 Steven Hessing
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
8 include $(TOPDIR
)/rules.mk
15 PKG_SOURCE_VERSION
:=v
$(PKG_VERSION
)
16 PKG_SOURCE_URL
:=https
://github.com
/mfontanini
/libtins
17 PKG_MIRROR_HASH
:=85c5a15beca56552ba3f33e10f2a82ee4c47be2b3334d163304362188a37b13a
19 PKG_MAINTAINER
:= Steven Hessing
<steven.hessing@gmail.com
>
20 PKG_LICENSE
:=BSD-2-Clause
21 PKG_LICENSE_FILES
:=LICENSE
24 PKG_BUILD_FLAGS
:=gc-sections lto
26 include $(INCLUDE_DIR
)/package.mk
27 include $(INCLUDE_DIR
)/cmake.mk
29 define Package
/libtins
33 URL
:=https
://libtins.github.io
/
34 DEPENDS
:=+libstdcpp
+LIBTINS_ENABLE_PCAP
:libpcap
+LIBTINS_ENABLE_WPA2
:libopenssl
38 define Package
/libtins
/config
39 source
"$(SOURCE)/Config.in"
42 define Package
/libtins
/description
43 libtins is a high-level
, multiplatform C
++ network packet sniffing and crafting library.
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
)
57 TARGET_LDFLAGS
+= -Wl
,--as-needed
59 define Package
/libtins
/install
60 $(INSTALL_DIR
) $(1)/usr
/lib
61 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libtins.so.
* $(1)/usr
/lib
/
64 $(eval
$(call BuildPackage
,libtins
))