libpfring: fix kmod dependency
[feed/packages.git] / libs / libpfring / Makefile
1 #
2 # Copyright (C) 2017 Banglang Huang
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:=libpfring
11 PKG_VERSION:=7.2.0
12 PKG_RELEASE:=1
13 PKG_MAINTAINER:=Banglang Huang <banglang.huang@foxmail.com>
14
15 PKG_LICENSE:=LGPL-2.1
16
17 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
18 PKG_SOURCE_URL:=https://codeload.github.com/ntop/PF_RING/tar.gz/$(PKG_VERSION)?
19 PKG_HASH:=5d349ac37a6ece5966bf606a6f131d628b98d88654c2f502d3c4b8bbf6ef9796
20
21 PKG_BUILD_DIR:=$(BUILD_DIR)/PF_RING-$(PKG_VERSION)
22
23 PKG_INSTALL:=1
24 PKG_FIXUP:=patch-libtool
25
26 include $(INCLUDE_DIR)/package.mk
27
28 CONFIGURE_PATH:=userland
29 MAKE_PATH:=userland/lib
30
31 define Package/libpfring
32 SECTION:=libs
33 CATEGORY:=Libraries
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 endef
38
39 define Package/libpfring/description
40 PF_RING is a high speed packet capture library that turns a commodity PC into an efficient and cheap
41 network measurement box suitable for both packet and active traffic analysis and manipulation.
42 Moreover, PF_RING opens totally new markets as it enables the creation of efficient application such as
43 traffic balancers or packet filters in a matter of lines of codes.
44 endef
45
46 define Build/InstallDev
47 $(INSTALL_DIR) $(1)/usr/include/
48 $(CP) \
49 $(PKG_INSTALL_DIR)/usr/include/* \
50 $(1)/usr/include/
51
52 $(INSTALL_DIR) $(1)/usr/lib
53 $(CP) \
54 $(PKG_INSTALL_DIR)/usr/lib/libpfring.so* \
55 $(1)/usr/lib/
56 endef
57
58 CONFIGURE_VARS += \
59 MACHINE="$(ARCH)"
60
61 define Package/libpfring/install
62 $(INSTALL_DIR) $(1)/usr/lib/
63 $(CP) \
64 $(PKG_INSTALL_DIR)/usr/lib/libpfring.so* \
65 $(1)/usr/lib/
66 $(LN) libpfring.so $(1)/usr/lib/libpfring.so.1
67 endef
68
69 $(eval $(call BuildPackage,libpfring))