3 include $(TOPDIR
)/rules.mk
8 PKG_MD5SUM
:=ddf53f0f484184390e8c2a1bd0853667
11 http
://www.packetfactory.net
/libnet
/dist/deprecated
/ \
12 http
://nthill.free.fr
/openwrt
/sources
/$(PKG_NAME
)/
13 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.gz
16 PKG_BUILD_DIR
:=$(BUILD_DIR
)/Libnet-
$(PKG_VERSION
)
17 PKG_INSTALL_DIR
:=$(PKG_BUILD_DIR
)/ipkg-install
19 include $(TOPDIR
)/package
/rules.mk
21 $(eval
$(call PKG_template
,LIBNET
,libnet
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
23 $(PKG_BUILD_DIR
)/.configured
: $(PKG_BUILD_DIR
)/.prepared
24 (cd
$(PKG_BUILD_DIR
); rm -rf config.
{cache
,status
} ; \
30 $(TARGET_CONFIGURE_OPTS
) \
31 CFLAGS
="$(TARGET_CFLAGS)" \
32 CPPFLAGS
="-I$(STAGING_DIR)/usr/include" \
33 LDFLAGS
="-L$(STAGING_DIR)/usr/lib" \
34 ac_libnet_have_pf_packet
=yes \
35 ac_cv_lbl_unaligned_fail
=no \
36 ac_cv_libnet_endianess
=lil \
38 --target
=$(GNU_TARGET_NAME
) \
39 --host
=$(GNU_TARGET_NAME
) \
40 --build
=$(GNU_HOST_NAME
) \
46 --datadir=/usr
/share \
47 --includedir=/usr
/include \
48 --infodir=/usr
/share
/info \
50 --libexecdir
=/usr
/lib \
51 --localstatedir
=/var \
52 --mandir=/usr
/share
/man \
56 $(DISABLE_LARGEFILE
) \
59 --with-pf_packet
=yes \
61 touch
$(PKG_BUILD_DIR
)/.configured
63 $(PKG_BUILD_DIR
)/.built
: $(PKG_BUILD_DIR
)/.configured
64 $(MAKE
) -C
$(PKG_BUILD_DIR
) \
65 $(TARGET_CONFIGURE_OPTS
) \
66 CFLAGS
="$(TARGET_CFLAGS)"
67 mkdir
-p
$(PKG_INSTALL_DIR
)
68 $(MAKE
) -C
$(PKG_BUILD_DIR
) \
69 DESTDIR
="$(PKG_INSTALL_DIR)" \
71 touch
$(PKG_BUILD_DIR
)/.built
73 $(IPKG_LIBNET
): $(STAGING_DIR
)/usr
/lib
/libnet.so
74 install -m0755
-d
$(IDIR_LIBNET
)/usr
/lib
75 cp
-fpR
$(PKG_INSTALL_DIR
)/usr
/lib
/libnet.so.
* $(IDIR_LIBNET
)/usr
/lib
/
76 $(RSTRIP
) $(IDIR_LIBNET
)
77 $(IPKG_BUILD
) $(IDIR_LIBNET
) $(PACKAGE_DIR
)
79 $(STAGING_DIR
)/usr
/lib
/libnet.so
: $(PKG_BUILD_DIR
)/.built
80 mkdir
-p
$(STAGING_DIR
)/usr
/bin
81 cp
-fpR
$(PKG_INSTALL_DIR
)/usr
/bin
/libnet-config
$(STAGING_DIR
)/usr
/bin
/
82 mkdir
-p
$(STAGING_DIR
)/usr
/include
83 cp
-fpR
$(PKG_INSTALL_DIR
)/usr
/include/libnet
* $(STAGING_DIR
)/usr
/include/
84 mkdir
-p
$(STAGING_DIR
)/usr
/lib
85 cp
-fpR
$(PKG_INSTALL_DIR
)/usr
/lib
/libnet.
{a
,so
*} $(STAGING_DIR
)/usr
/lib
/
86 touch
$(STAGING_DIR
)/usr
/lib
/libnet.so
88 install-dev
: $(STAGING_DIR
)/usr
/lib
/libnet.so
91 rm -rf
$(STAGING_DIR
)/usr
/bin
/libnet-config
92 rm -rf
$(STAGING_DIR
)/usr
/include/libnet
*
93 rm -rf
$(STAGING_DIR
)/usr
/lib
/libnet.
{a
,so
*}