wireshark.mk
2.96 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
################################################################################
#
# wireshark
#
################################################################################
WIRESHARK_VERSION = 2.0.5
WIRESHARK_SOURCE = wireshark-$(WIRESHARK_VERSION).tar.bz2
WIRESHARK_SITE = http://www.wireshark.org/download/src/all-versions
WIRESHARK_LICENSE = wireshark license
WIRESHARK_LICENSE_FILES = COPYING
WIRESHARK_DEPENDENCIES = host-pkgconf libpcap libglib2
WIRESHARK_CONF_ENV = \
PCAP_CONFIG=$(STAGING_DIR)/usr/bin/pcap-config
# patch touching configure.ac
WIRESHARK_AUTORECONF = YES
# wireshark adds -I$includedir to CFLAGS, causing host/target headers mixup.
# Work around it by pointing includedir at staging
WIRESHARK_CONF_OPTS = \
--without-krb5 \
--disable-usr-local \
--enable-static=no \
--with-libsmi=no \
--with-lua=no \
--with-pcap=$(STAGING_DIR)/usr \
--includedir=$(STAGING_DIR)/usr/include
# wireshark GUI options
ifeq ($(BR2_PACKAGE_LIBGTK3),y)
WIRESHARK_CONF_OPTS += --with-gtk3=yes
WIRESHARK_DEPENDENCIES += libgtk3
else ifeq ($(BR2_PACKAGE_LIBGTK2),y)
WIRESHARK_CONF_OPTS += --with-gtk2=yes
WIRESHARK_DEPENDECIES += libgtk2
else
WIRESHARK_CONF_OPTS += --with-gtk3=no --with-gtk2=no
endif
# Qt4 needs accessibility, we don't support it
ifeq ($(BR2_PACKAGE_QT5BASE_WIDGETS),y)
WIRESHARK_CONF_OPTS += --with-qt=5
WIRESHARK_DEPENDENCIES += qt5base
# Seems it expects wrappers and passes a -qt=X parameter for version
WIRESHARK_MAKE_OPTS += \
MOC="$(HOST_DIR)/usr/bin/moc" \
RCC="$(HOST_DIR)/usr/bin/rcc" \
UIC="$(HOST_DIR)/usr/bin/uic"
else
WIRESHARK_CONF_OPTS += --with-qt=no
endif
# No GUI at all
ifeq ($(BR2_PACKAGE_LIBGTK2)$(BR2_PACKAGE_LIBGTK3)$(BR2_PACKAGE_QT5BASE_WIDGETS),)
WIRESHARK_CONF_OPTS += --disable-wireshark
endif
ifeq ($(BR2_PACKAGE_C_ARES),y)
WIRESHARK_CONF_OPTS += --with-c-ares=$(STAGING_DIR)/usr
WIRESHARK_DEPENDENCIES += c-ares
else
WIRESHARK_CONF_OPTS += --without-c-ares
endif
ifeq ($(BR2_PACKAGE_GEOIP),y)
WIRESHARK_CONF_OPTS += --with-geoip=$(STAGING_DIR)/usr
WIRESHARK_DEPENDENCIES += geoip
else
WIRESHARK_CONF_OPTS += --without-geoip
endif
ifeq ($(BR2_PACKAGE_GNUTLS),y)
WIRESHARK_CONF_OPTS += --with-gnutls=yes
WIRESHARK_DEPENDENCIES += gnutls
else
WIRESHARK_CONF_OPTS += --with-gnutls=no
endif
ifeq ($(BR2_PACKAGE_LIBGCRYPT),y)
WIRESHARK_CONF_ENV = LIBGCRYPT_CONFIG=$(STAGING_DIR)/usr/bin/libgcrypt-config
WIRESHARK_CONF_OPTS += --with-gcrypt=yes
WIRESHARK_DEPENDENCIES += libgcrypt
else
WIRESHARK_CONF_OPTS += --with-gcrypt=no
endif
ifeq ($(BR2_PACKAGE_LIBNL),y)
WIRESHARK_CONF_OPTS += --with-libnl
WIRESHARK_DEPENDENCIES += libnl
else
WIRESHARK_CONF_OPTS += --without-libnl
endif
ifeq ($(BR2_PACKAGE_SBC),y)
WIRESHARK_CONF_OPTS += --with-sbc=yes
WIRESHARK_DEPENDENCIES += sbc
else
WIRESHARK_CONF_OPTS += --with-sbc=no
endif
define WIRESHARK_REMOVE_DOCS
find $(TARGET_DIR)/usr/share/wireshark -name '*.txt' -print0 \
-o -name '*.html' -print0 | xargs -0 rm -f
endef
WIRESHARK_POST_INSTALL_TARGET_HOOKS += WIRESHARK_REMOVE_DOCS
$(eval $(autotools-package))