Fix aiccu init-script
[openwrt.git] / openwrt / package / libnet / Makefile
1 # $Id$
2
3 include $(TOPDIR)/rules.mk
4
5 PKG_NAME:=libnet
6 PKG_VERSION:=1.0.2a
7 PKG_RELEASE:=7
8 PKG_MD5SUM:=ddf53f0f484184390e8c2a1bd0853667
9
10 PKG_SOURCE_URL:=\
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
14 PKG_CAT:=zcat
15
16 PKG_BUILD_DIR:=$(BUILD_DIR)/Libnet-$(PKG_VERSION)
17 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
18
19 include $(TOPDIR)/package/rules.mk
20
21 $(eval $(call PKG_template,LIBNET,libnet,$(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 touch configure.in; \
26 touch include.m4; \
27 touch aclocal.m4; \
28 touch Makefile.in; \
29 touch configure; \
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 \
37 ./configure \
38 --target=$(GNU_TARGET_NAME) \
39 --host=$(GNU_TARGET_NAME) \
40 --build=$(GNU_HOST_NAME) \
41 --program-prefix="" \
42 --program-suffix="" \
43 --prefix=/usr \
44 --exec-prefix=/usr \
45 --bindir=/usr/bin \
46 --datadir=/usr/share \
47 --includedir=/usr/include \
48 --infodir=/usr/share/info \
49 --libdir=/usr/lib \
50 --libexecdir=/usr/lib \
51 --localstatedir=/var \
52 --mandir=/usr/share/man \
53 --sbindir=/usr/sbin \
54 --sysconfdir=/etc \
55 $(DISABLE_NLS) \
56 $(DISABLE_LARGEFILE) \
57 --enable-shared \
58 --enable-static \
59 --with-pf_packet=yes \
60 );
61 touch $(PKG_BUILD_DIR)/.configured
62
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)" \
70 install
71 touch $(PKG_BUILD_DIR)/.built
72
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)
78
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
87
88 install-dev: $(STAGING_DIR)/usr/lib/libnet.so
89
90 uninstall-dev:
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*}
94
95 compile: install-dev
96 clean: uninstall-dev
This page took 0.048593 seconds and 5 git commands to generate.