get rid of $Id$ - it has never helped us and it has broken too many patches ;)
[openwrt.git] / package / libpcap / Makefile
1 #
2 # Copyright (C) 2006 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:=0.9.8
12 PKG_RELEASE:=1
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15 PKG_SOURCE_URL:=http://www.tcpdump.org/release/
16 PKG_MD5SUM:=5208f24d0328ee7c20b52c43eaa9aa0e
17
18 include $(INCLUDE_DIR)/package.mk
19
20 define Package/libpcap
21 SECTION:=libs
22 CATEGORY:=Libraries
23 TITLE:=Low-level packet capture library
24 URL:=http://www.tcpdump.org/
25 endef
26
27 define Package/libpcap/description
28 This package contains a system-independent library for user-level network
29 packet capture.
30 endef
31
32 TARGET_CFLAGS += \
33 -ffunction-sections -fdata-sections
34
35 CONFIGURE_ARGS += \
36 --enable-shared \
37 --enable-static \
38 --disable-yydebug \
39 --enable-ipv6 \
40 --with-build-cc="$(HOSTCC)" \
41 --with-pcap=linux
42
43 define Build/Compile
44 $(MAKE) -C $(PKG_BUILD_DIR) \
45 CCOPT="$(TARGET_CFLAGS) -I$(BUILD_DIR)/linux/include" \
46 DESTDIR="$(PKG_INSTALL_DIR)" \
47 all install
48 endef
49
50 define Build/InstallDev
51 mkdir -p $(1)/usr/include
52 $(CP) $(PKG_INSTALL_DIR)/usr/include/pcap{,-bpf,-namedb}.h \
53 $(1)/usr/include/
54 mkdir -p $(1)/usr/lib
55 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libpcap.{a,so*} \
56 $(1)/usr/lib/
57 endef
58
59 define Package/libpcap/install
60 $(INSTALL_DIR) $(1)/usr/lib
61 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libpcap.so.* $(1)/usr/lib/
62 endef
63
64 $(eval $(call BuildPackage,libpcap))
This page took 0.051922 seconds and 5 git commands to generate.