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
)
18 IPKG_LIBNET
:=$(PACKAGE_DIR
)/$(PKG_NAME
)_
$(PKG_VERSION
)-$(PKG_RELEASE
)_
$(ARCH
).ipk
19 IDIR_LIBNET
:=$(PKG_BUILD_DIR
)/ipkg
/$(PKG_NAME
)
20 INFO_LIBNET
:=$(IPKG_STATE_DIR
)/info/$(PKG_NAME
).list
22 $(DL_DIR
)/$(PKG_SOURCE
):
23 $(SCRIPT_DIR
)/download.pl
$(DL_DIR
) $(PKG_SOURCE
) $(PKG_MD5SUM
) $(PKG_SOURCE_URL
)
25 $(PKG_BUILD_DIR
)/.prepared
: $(DL_DIR
)/$(PKG_SOURCE
)
26 $(PKG_CAT
) $(DL_DIR
)/$(PKG_SOURCE
) |
tar -C
$(BUILD_DIR
) $(TAR_OPTIONS
) -
27 $(PATCH
) $(PKG_BUILD_DIR
) .
/patches
28 touch
$(PKG_BUILD_DIR
)/.prepared
30 $(PKG_BUILD_DIR
)/.configured
: $(PKG_BUILD_DIR
)/.prepared
31 (cd
$(PKG_BUILD_DIR
); rm -rf config.cache config.status
; \
37 $(TARGET_CONFIGURE_OPTS
) \
38 CFLAGS
="$(TARGET_CFLAGS)" \
39 CPPFLAGS
="-I$(STAGING_DIR)/usr/include" \
40 LDFLAGS
="-L$(STAGING_DIR)/usr/lib" \
41 ac_libnet_have_pf_packet
=yes \
42 ac_cv_lbl_unaligned_fail
=no \
43 ac_cv_libnet_endianess
=lil \
45 --target
=$(GNU_TARGET_NAME
) \
46 --host
=$(GNU_TARGET_NAME
) \
47 --build
=$(GNU_HOST_NAME
) \
53 --datadir=/usr
/share \
54 --includedir=/usr
/include \
55 --infodir=/usr
/share
/info \
57 --libexecdir
=/usr
/lib \
58 --localstatedir
=/var \
59 --mandir=/usr
/share
/man \
63 $(DISABLE_LARGEFILE
) \
66 --with-pf_packet
=yes \
68 touch
$(PKG_BUILD_DIR
)/.configured
70 $(PKG_BUILD_DIR
)/.built
: $(PKG_BUILD_DIR
)/.configured
71 $(MAKE
) -C
$(PKG_BUILD_DIR
) \
72 $(TARGET_CONFIGURE_OPTS
) \
73 CFLAGS
="$(TARGET_CFLAGS)"
74 touch
$(PKG_BUILD_DIR
)/.built
76 $(STAGING_DIR
)/usr
/lib
/libnet.so
: $(PKG_BUILD_DIR
)/.built
77 $(MAKE
) -C
$(PKG_BUILD_DIR
) \
78 DESTDIR
="$(STAGING_DIR)" \
80 rm -rf
$(STAGING_DIR
)/usr
/lib
/libnet.la
82 $(IPKG_LIBNET
): $(STAGING_DIR
)/usr
/lib
/libnet.so
83 $(SCRIPT_DIR
)/make-ipkg-dir.sh
$(IDIR_LIBNET
) .
/ipkg
/$(PKG_NAME
).control
$(PKG_VERSION
)-$(PKG_RELEASE
) $(ARCH
)
84 mkdir
-p
$(IDIR_LIBNET
)/usr
/lib
85 cp
-fpR
$(STAGING_DIR
)/usr
/lib
/libnet.so.
* $(IDIR_LIBNET
)/usr
/lib
/
86 $(STRIP
) $(IDIR_LIBNET
)/usr
/lib
/lib
*.so
*
87 mkdir
-p
$(PACKAGE_DIR
)
88 $(IPKG_BUILD
) $(IDIR_LIBNET
) $(PACKAGE_DIR
)
90 $(INFO_LIBNET
): $(IPKG_LIBNET
)
91 $(IPKG
) install $(IPKG_LIBNET
)
93 source
: $(DL_DIR
)/$(PKG_SOURCE
)
94 prepare
: $(PKG_BUILD_DIR
)/.prepared
95 compile
: $(IPKG_LIBNET
)
96 install: $(INFO_LIBNET
)
99 -$(MAKE
) -C
$(PKG_BUILD_DIR
) \
100 DESTDIR
="$(STAGING_DIR)" \
102 rm -rf
$(PKG_BUILD_DIR
) $(IPKG_LIBNET
)