add missing base-files for rb532
[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 Package/libpcap/install
73 install -m0755 -d $(1)/usr/lib
74 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libpcap.so.* $(1)/usr/lib/
75 endef
76
77 define Build/InstallDev
78 mkdir -p $(STAGING_DIR)/usr/include
79 $(CP) $(PKG_INSTALL_DIR)/usr/include/pcap.h \
80 $(PKG_INSTALL_DIR)/usr/include/pcap-bpf.h \
81 $(PKG_INSTALL_DIR)/usr/include/pcap-namedb.h \
82 $(STAGING_DIR)/usr/include/
83 mkdir -p $(STAGING_DIR)/usr/lib
84 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libpcap.a \
85 $(PKG_INSTALL_DIR)/usr/lib/libpcap.so* \
86 $(STAGING_DIR)/usr/lib/
87 endef
88
89 define Build/UninstallDev
90 rm -rf $(STAGING_DIR)/usr/include/pcap.h \
91 $(STAGING_DIR)/usr/include/pcap-bpf.h \
92 $(STAGING_DIR)/usr/include/pcap-namedb.h \
93 $(STAGING_DIR)/usr/lib/libpcap.a \
94 $(STAGING_DIR)/usr/lib/libpcap.so*
95 endef
96
97 $(eval $(call BuildPackage,libpcap))
This page took 0.050283 seconds and 5 git commands to generate.