ath79: do not build TP-Link tiny images by default
[oweals/openwrt.git] / package / libs / libpcap / Makefile
1 #
2 # Copyright (C) 2006-2013 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:=libpcap
11 PKG_VERSION:=1.9.1
12 PKG_RELEASE:=2
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15 PKG_SOURCE_URL:=http://www.us.tcpdump.org/release/ \
16         http://www.tcpdump.org/release/
17 PKG_HASH:=635237637c5b619bcceba91900666b64d56ecb7be63f298f601ec786ce087094
18
19 PKG_MAINTAINER:=Felix Fietkau <nbd@nbd.name>
20
21 CMAKE_INSTALL:=1
22 PKG_ASLR_PIE_REGULAR:=1
23 PKG_BUILD_PARALLEL:=1
24
25 PKG_LICENSE:=BSD-3-Clause
26 PKG_LICENSE_FILES:=LICENSE
27
28 include $(INCLUDE_DIR)/package.mk
29 include $(INCLUDE_DIR)/cmake.mk
30
31 define Package/libpcap
32   SECTION:=libs
33   CATEGORY:=Libraries
34   TITLE:=Low-level packet capture library
35   URL:=http://www.tcpdump.org/
36   MENU:=1
37   ABI_VERSION:=1
38 endef
39
40 define Package/libpcap/description
41 This package contains a system-independent library for user-level network packet
42 capture.
43 endef
44
45 define Package/libpcap/config
46         source "$(SOURCE)/Config.in"
47 endef
48
49 CMAKE_OPTIONS += \
50         -DBUILD_SHARED_LIBS=ON \
51         -DBUILD_WITH_LIBNL=OFF \
52
53 # grep 'option(DISABLE_' CMakeLists.txt | cut -f2 -d'(' | cut -f1 -d' ' | sort --unique
54 CMAKE_OPTIONS += \
55         -DDISABLE_DAG=ON \
56         -DDISABLE_DBUS=ON \
57         -DDISABLE_NETMAP=ON \
58         -DDISABLE_RDMA=ON \
59         -DDISABLE_SEPTEL=ON \
60         -DDISABLE_SNF=ON \
61         -DDISABLE_TC=ON \
62
63 # Debugging options
64 CMAKE_OPTIONS += \
65         -DBDEBUG=OFF \
66         -DYYDEBUG=OFF \
67
68 CMAKE_OPTIONS += $(if $(CONFIG_PCAP_HAS_USB)       ,,-DDISABLE_USB=ON)
69 CMAKE_OPTIONS += $(if $(CONFIG_PCAP_HAS_BT)        ,,-DDISABLE_BLUETOOTH=ON)
70 CMAKE_OPTIONS += $(if $(CONFIG_PCAP_HAS_NETFILTER) ,,-DPCAP_SUPPORT_NETFILTER=OFF)
71
72 CMAKE_OPTIONS += $(if $(CONFIG_IPV6),-DINET6=ON,-DINET6=OFF)
73
74 define Package/libpcap/install
75         $(INSTALL_DIR) $(1)/usr/lib
76         $(CP) $(PKG_INSTALL_DIR)/usr/lib/libpcap.so.* $(1)/usr/lib/
77 endef
78
79 $(eval $(call BuildPackage,libpcap))