update openswan to 2.4.7, fix 2.6.19 build
[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 # $Id$
8
9 include $(TOPDIR)/rules.mk
10
11 PKG_NAME:=libpcap
12 PKG_VERSION:=0.9.4
13 PKG_RELEASE:=1
14
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
16 PKG_SOURCE_URL:=http://www.tcpdump.org/release/
17 PKG_MD5SUM:=79025766e8027df154cb1f32de8a7974
18 PKG_CAT:=zcat
19
20 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)/$(PKG_NAME)-$(PKG_VERSION)
21 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
22
23 include $(INCLUDE_DIR)/package.mk
24
25 define Package/libpcap
26 SECTION:=libs
27 CATEGORY:=Libraries
28 TITLE:=Low-level packet capture library
29 DESCRIPTION:=\
30 This package contains a system-independent library for user-level \\\
31 network packet capture.
32 URL:=http://www.tcpdump.org/
33 endef
34
35 define Build/Configure
36 (cd $(PKG_BUILD_DIR); rm -f config.cache; \
37 $(TARGET_CONFIGURE_OPTS) \
38 CFLAGS="$(TARGET_CFLAGS)" \
39 CPPFLAGS="-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include" \
40 LDFLAGS="-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib" \
41 ./configure \
42 --target=$(GNU_TARGET_NAME) \
43 --host=$(GNU_TARGET_NAME) \
44 --build=$(GNU_HOST_NAME) \
45 --program-prefix="" \
46 --program-suffix="" \
47 --prefix=/usr \
48 --exec-prefix=/usr \
49 --bindir=/usr/bin \
50 --datadir=/usr/share \
51 --includedir=/usr/include \
52 --infodir=/usr/share/info \
53 --libdir=/usr/lib \
54 --libexecdir=/usr/lib \
55 --localstatedir=/var \
56 --mandir=/usr/share/man \
57 --sbindir=/usr/sbin \
58 --sysconfdir=/etc \
59 $(DISABLE_NLS) \
60 $(DISABLE_LARGEFILE) \
61 --enable-shared \
62 --enable-static \
63 --disable-yydebug \
64 --enable-ipv6 \
65 --with-build-cc="$(HOSTCC)" \
66 --with-pcap=linux \
67 );
68 endef
69
70 define Build/Compile
71 $(MAKE) -C $(PKG_BUILD_DIR) \
72 CCOPT="$(TARGET_CFLAGS) -I$(BUILD_DIR)/linux/include" \
73 DESTDIR="$(PKG_INSTALL_DIR)" \
74 all install
75 endef
76
77 define Build/InstallDev
78 mkdir -p $(STAGING_DIR)/usr/include
79 $(CP) $(PKG_INSTALL_DIR)/usr/include/pcap{,-bpf,-namedb}.h \
80 $(STAGING_DIR)/usr/include/
81 mkdir -p $(STAGING_DIR)/usr/lib
82 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libpcap.{a,so*} \
83 $(STAGING_DIR)/usr/lib/
84 endef
85
86 define Build/UninstallDev
87 rm -rf $(STAGING_DIR)/usr/include/pcap{,-bpf,-named}.h \
88 $(STAGING_DIR)/usr/lib/libpcap.{a,so*}
89 endef
90
91 define Package/libpcap/install
92 $(INSTALL_DIR) $(1)/usr/lib
93 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libpcap.so.* $(1)/usr/lib/
94 endef
95
96 $(eval $(call BuildPackage,libpcap))
This page took 0.047342 seconds and 5 git commands to generate.