change lzo to liblzo
[openwrt.git] / openwrt / package / libpcap / Makefile
1 # $Id$
2
3 include $(TOPDIR)/rules.mk
4
5 PKG_NAME:=libpcap
6 PKG_VERSION:=0.8.3
7 PKG_RELEASE:=1
8 PKG_MD5SUM:=56a9d4615d8354fcfe8cff8c8443c77b
9
10 PKG_SOURCE_URL:= \
11 http://www.tcpdump.org/release \
12 http://nthill.free.fr/openwrt/sources/$(PKG_NAME)/
13 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
14 PKG_CAT:=zcat
15
16 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)/$(PKG_NAME)-$(PKG_VERSION)
17 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
18
19 include $(TOPDIR)/package/rules.mk
20
21 $(eval $(call PKG_template,LIBPCAP,libpcap,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
22
23 $(PKG_BUILD_DIR)/.configured: $(PKG_BUILD_DIR)/.prepared
24 (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status} ; \
25 $(TARGET_CONFIGURE_OPTS) \
26 CFLAGS="$(TARGET_CFLAGS)" \
27 CPPFLAGS="-I$(STAGING_DIR)/usr/include" \
28 LDFLAGS="-L$(STAGING_DIR)/usr/lib" \
29 ac_cv_linux_vers=$(BR2_DEFAULT_KERNEL_HEADERS) \
30 ./configure \
31 --target=$(GNU_TARGET_NAME) \
32 --host=$(GNU_TARGET_NAME) \
33 --build=$(GNU_HOST_NAME) \
34 --program-prefix="" \
35 --program-suffix="" \
36 --prefix=/usr \
37 --exec-prefix=/usr \
38 --bindir=/usr/bin \
39 --datadir=/usr/share \
40 --includedir=/usr/include \
41 --infodir=/usr/share/info \
42 --libdir=/usr/lib \
43 --libexecdir=/usr/lib \
44 --localstatedir=/var \
45 --mandir=/usr/share/man \
46 --sbindir=/usr/sbin \
47 --sysconfdir=/etc \
48 $(DISABLE_NLS) \
49 $(DISABLE_LARGEFILE) \
50 --enable-shared \
51 --enable-static \
52 --disable-yydebug \
53 --with-build-cc=$(HOSTCC) \
54 --with-pcap=linux \
55 );
56 touch $(PKG_BUILD_DIR)/.configured
57
58 $(PKG_BUILD_DIR)/.built: $(PKG_BUILD_DIR)/.configured
59 $(MAKE) -C $(PKG_BUILD_DIR) \
60 CCOPT="$(TARGET_CFLAGS)"
61 mkdir -p $(PKG_INSTALL_DIR)
62 $(MAKE) -C $(PKG_BUILD_DIR) \
63 DESTDIR="$(PKG_INSTALL_DIR)" \
64 install
65 touch $(PKG_BUILD_DIR)/.built
66
67 $(IPKG_LIBPCAP):
68 install -m0755 -d $(IDIR_LIBPCAP)/usr/lib
69 cp -fpR $(PKG_INSTALL_DIR)/usr/lib/libpcap.so.* $(IDIR_LIBPCAP)/usr/lib/
70 $(RSTRIP) $(IDIR_LIBPCAP)
71 $(IPKG_BUILD) $(IDIR_LIBPCAP) $(PACKAGE_DIR)
72
73 $(STAGING_DIR)/usr/lib/libpcap.so: $(PKG_BUILD_DIR)/.built
74 mkdir -p $(STAGING_DIR)/usr/include
75 cp -fpR $(PKG_INSTALL_DIR)/usr/include/pcap* $(STAGING_DIR)/usr/include/
76 mkdir -p $(STAGING_DIR)/usr/lib
77 cp -fpR $(PKG_INSTALL_DIR)/usr/lib/libpcap.{a,so*} $(STAGING_DIR)/usr/lib/
78 touch $(STAGING_DIR)/usr/lib/libpcap.so
79
80 install-dev: $(STAGING_DIR)/usr/lib/libpcap.so
81
82 uninstall-dev:
83 rm -rf $(STAGING_DIR)/usr/include/pcap*
84 rm -rf $(STAGING_DIR)/usr/lib/libpcap.{a,so*}
85
86 compile: install-dev
87 clean: uninstall-dev
This page took 0.043847 seconds and 5 git commands to generate.