2006-09-14 06:51:48 +00:00
|
|
|
#
|
|
|
|
# Copyright (C) 2006 OpenWrt.org
|
|
|
|
#
|
|
|
|
# This is free software, licensed under the GNU General Public License v2.
|
|
|
|
# See /LICENSE for more information.
|
|
|
|
#
|
|
|
|
# $Id$
|
|
|
|
|
|
|
|
include $(TOPDIR)/rules.mk
|
|
|
|
|
|
|
|
PKG_NAME:=libnet
|
|
|
|
PKG_VERSION:=1.1.2.1
|
|
|
|
PKG_RELEASE:=1
|
|
|
|
|
|
|
|
PKG_SOURCE:=$(PKG_NAME).tar.gz
|
|
|
|
PKG_SOURCE_URL:=http://www.packetfactory.net/libnet/dist/
|
|
|
|
PKG_MD5SUM:=be845c41170d72c7db524f3411b50256
|
|
|
|
PKG_CAT:=zcat
|
|
|
|
|
2006-10-03 17:33:08 +00:00
|
|
|
PKG_BUILD_DIR:=$(BUILD_DIR)/libnet
|
2006-09-14 06:51:48 +00:00
|
|
|
PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
|
|
|
|
|
|
|
|
include $(INCLUDE_DIR)/package.mk
|
|
|
|
|
2006-09-14 13:06:21 +00:00
|
|
|
define Package/libnet1
|
2006-09-14 06:51:48 +00:00
|
|
|
SECTION:=libs
|
|
|
|
CATEGORY:=Libraries
|
|
|
|
DEPENDS:=+libpcap
|
2006-10-03 17:33:08 +00:00
|
|
|
TITLE:=Low-level packet creation library (v1.1.x)
|
2006-09-14 06:51:48 +00:00
|
|
|
URL:=http://www.packetfactory.net/libnet/
|
|
|
|
endef
|
|
|
|
|
|
|
|
ENDIANESS:=lil
|
2006-10-04 02:26:30 +00:00
|
|
|
ifeq ($(CONFIG_BIG_ENDIAN),y)
|
2006-10-03 17:33:08 +00:00
|
|
|
ENDIANESS:=big
|
2006-09-14 06:51:48 +00:00
|
|
|
endif
|
|
|
|
|
2007-04-01 16:48:05 +00:00
|
|
|
CONFIGURE_ARGS += \
|
|
|
|
--enable-shared \
|
|
|
|
--enable-static \
|
|
|
|
--with-pf_packet=yes
|
|
|
|
|
|
|
|
CONFIGURE_VARS += \
|
|
|
|
ac_cv_libnet_endianess=$(ENDIANESS) \
|
|
|
|
ac_libnet_have_pf_packet=yes \
|
|
|
|
LL_INT_TYPE=linux
|
|
|
|
|
2006-09-14 06:51:48 +00:00
|
|
|
define Build/Configure
|
2006-11-05 20:12:42 +00:00
|
|
|
(cd $(PKG_BUILD_DIR); touch \
|
|
|
|
configure.in \
|
|
|
|
include.m4 \
|
|
|
|
aclocal.m4 \
|
|
|
|
Makefile.in \
|
|
|
|
configure \
|
|
|
|
);
|
2007-04-01 16:48:05 +00:00
|
|
|
$(call Build/Configure/Default)
|
2006-09-14 06:51:48 +00:00
|
|
|
endef
|
|
|
|
|
|
|
|
define Build/Compile
|
2007-04-01 16:48:05 +00:00
|
|
|
# pass CFLAGS again to override -O2 set by configure
|
2006-09-14 06:51:48 +00:00
|
|
|
$(MAKE) -C $(PKG_BUILD_DIR) \
|
2007-04-01 16:48:05 +00:00
|
|
|
CFLAGS="$(TARGET_CFLAGS)" \
|
2006-09-14 06:51:48 +00:00
|
|
|
DESTDIR="$(PKG_INSTALL_DIR)" \
|
|
|
|
all install
|
|
|
|
endef
|
|
|
|
|
|
|
|
define Build/InstallDev
|
2006-10-03 17:33:08 +00:00
|
|
|
mkdir -p $(STAGING_DIR)/usr/lib/libnet-1.1.x/bin
|
|
|
|
$(CP) $(PKG_INSTALL_DIR)/usr/bin/libnet-config $(STAGING_DIR)/usr/lib/libnet-1.1.x/bin/
|
|
|
|
mkdir -p $(STAGING_DIR)/usr/lib/libnet-1.1.x/include
|
|
|
|
$(CP) $(PKG_INSTALL_DIR)/usr/include/libnet* $(STAGING_DIR)/usr/lib/libnet-1.1.x/include/
|
|
|
|
mkdir -p $(STAGING_DIR)/usr/lib/libnet-1.1.x/lib
|
|
|
|
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libnet.{a,so*} $(STAGING_DIR)/usr/lib/libnet-1.1.x/lib/
|
2006-09-14 06:51:48 +00:00
|
|
|
endef
|
|
|
|
|
|
|
|
define Build/UninstallDev
|
2006-10-03 17:33:08 +00:00
|
|
|
rm -rf $(STAGING_DIR)/usr/lib/libnet-1.1.x
|
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/libnet1/install
|
2006-11-23 00:29:07 +00:00
|
|
|
$(INSTALL_DIR) $(1)/usr/lib
|
2006-10-03 17:33:08 +00:00
|
|
|
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libnet.so.* $(1)/usr/lib/
|
2006-09-14 06:51:48 +00:00
|
|
|
endef
|
|
|
|
|
2006-09-14 13:06:21 +00:00
|
|
|
$(eval $(call BuildPackage,libnet1))
|