2 # Copyright (C) 2017 Banglang Huang
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
8 include $(TOPDIR
)/rules.mk
9 include $(INCLUDE_DIR
)/kernel.mk
15 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.gz
16 PKG_SOURCE_URL
:=https
://codeload.github.com
/ntop
/PF_RING
/tar.gz
/$(PKG_VERSION
)?
17 PKG_HASH
:=2756a45ab250da11850160beb62aa879075aedfb49bf8f323b404f02b0c36670
18 PKG_BUILD_DIR
:=$(KERNEL_BUILD_DIR
)/PF_RING-
$(PKG_VERSION
)
20 PKG_MAINTAINER
:=Banglang Huang
<banglang.huang@foxmail.com
>
22 PKG_FIXUP
:=patch-libtool
26 include $(INCLUDE_DIR
)/package.mk
28 CONFIGURE_PATH
:=userland
29 MAKE_PATH
:=userland
/lib
31 define Package
/libpfring
34 TITLE
:=Library for PR_RING
(package process framework
)
35 URL
:=https
://github.com
/ntop
/pf_ring
36 DEPENDS
:=+kmod-pf-ring
+libpcap
+libpthread
37 LICENSE
:=LGPL-2.1
-or-later
38 LICENSE_FILES
:=LICENSE
41 define Package
/libpfring
/description
42 PF_RING is a high speed packet capture library that turns a commodity PC into an efficient and cheap
43 network measurement box suitable for both packet and active traffic analysis and manipulation.
44 Moreover
, PF_RING opens totally new markets
as it enables the creation of efficient application such
as
45 traffic balancers or packet filters in a matter of lines of codes.
48 define KernelPackage
/pf-ring
49 SUBMENU
:=Network Support
50 TITLE
:=PF_RING Kernel driver
51 FILES
:=$(PKG_BUILD_DIR
)/kernel
/pf_ring.ko
52 AUTOLOAD
:=$(call AutoLoad
,90,pf_ring
,1)
53 LICENSE
:=GPL-2.0
-or-later
56 define KernelPackage
/pf-ring
/description
57 Kernel module for libpf-ring package
62 ac_cv_lib_nl_3_nl_socket_alloc
=no
65 $(MAKE
) -C
"$(LINUX_DIR)" \
66 KERNEL_DIR
="$(LINUX_DIR)" \
67 ARCH
="$(LINUX_KARCH)" \
68 CROSS_COMPILE
="$(TARGET_CROSS)" \
69 M
="$(PKG_BUILD_DIR)/kernel" \
70 EXTRA_CFLAGS
="$(EXTRA_CFLAGS) -I$(PKG_BUILD_DIR)/kernel" \
72 $(call Build
/Compile
/Default
)
75 define Build
/InstallDev
76 $(INSTALL_DIR
) $(1)/usr
/include/
77 $(CP
) $(PKG_INSTALL_DIR
)/usr
/include/* $(1)/usr
/include/
79 $(INSTALL_DIR
) $(1)/usr
/lib
80 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libpfring.so
* $(1)/usr
/lib
/
83 define Package
/libpfring
/install
84 $(INSTALL_DIR
) $(1)/usr
/lib
/
85 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libpfring.so
* $(1)/usr
/lib
/
86 $(LN
) libpfring.so
$(1)/usr
/lib
/libpfring.so
.1
89 $(eval
$(call BuildPackage
,libpfring
))
90 $(eval
$(call KernelPackage
,pf-ring
))