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