Merge pull request #4320 from TouchStar/gpsd-fix-darwinbuild
[feed/packages.git] / libs / libndpi / Makefile
1 #
2 # Copyright (C) 2017 OpenWrt.org
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:=libndpi
11 PKG_VERSION:=1.8
12 PKG_RELEASE:=1
13 PKG_MAINTAINER:=Banglang Huang <banglang.huang@foxmail.com>
14
15 PKG_SOURCE_PROTO:=git
16 PKG_SOURCE_URL:=https://github.com/ntop/nDPI.git
17 PKG_SOURCE_VERSION:=6450ae256cfd7a6006d39df4a29de32f2f6fb7eb
18
19 PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
20 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
21 PKG_LICENSE:=LGPLv3
22
23 PKG_INSTALL:=1
24 PKG_FIXUP:=autoreconf
25
26 include $(INCLUDE_DIR)/package.mk
27
28 define Package/libndpi
29 SECTION:=libs
30 CATEGORY:=Libraries
31 TITLE:=Library for deep-packet inspection
32 URL:=https://github.com/ntop/nDPI
33 DEPENDS:=+libpcap +libjson-c
34 endef
35
36 define Package/libndpi/description
37 nDPI is an open source LGPLv3 library for deep-packet inspection.
38 Based on OpenDPI it includes ntop extensions.
39 endef
40
41 define Build/Configure
42 ( cd $(PKG_BUILD_DIR); ./autogen.sh )
43 $(call Build/Configure/Default)
44 endef
45
46 define Build/InstallDev
47 $(INSTALL_DIR) $(1)/usr/include/
48 $(CP) \
49 $(PKG_INSTALL_DIR)/usr/include/libndpi-1.8.0/libndpi \
50 $(1)/usr/include/
51
52 $(INSTALL_DIR) $(1)/usr/lib
53 $(CP) \
54 $(PKG_INSTALL_DIR)/usr/lib/libndpi.so* \
55 $(1)/usr/lib/
56
57 $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
58 $(CP) \
59 $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libndpi.pc \
60 $(1)/usr/lib/pkgconfig/
61 endef
62
63 define Package/libndpi/install
64 $(INSTALL_DIR) $(1)/usr/lib/
65 $(CP) \
66 $(PKG_INSTALL_DIR)/usr/lib/libndpi.so* \
67 $(1)/usr/lib/
68 $(INSTALL_DIR) $(1)/usr/bin/
69 $(CP) \
70 $(PKG_INSTALL_DIR)/usr/bin/ndpiReader \
71 $(1)/usr/bin/
72 endef
73
74 $(eval $(call BuildPackage,libndpi))