3 include $(TOPDIR
)/rules.mk
5 PKG_NAME
:= dhcp-forwarder
8 PKG_MD5SUM
:= e7f876e615ebc3f96418f6477b4451e2
10 PKG_SOURCE_URL
:= http
://savannah.nongnu.org
/download
/dhcp-fwd
/ \
11 http
://nthill.free.fr
/openwrt
/sources
/$(PKG_NAME
)/
12 PKG_SOURCE
:= $(PKG_NAME
)-$(PKG_VERSION
).
tar.bz2
13 PKG_BUILD_DIR
:= $(BUILD_DIR
)/$(PKG_NAME
)-$(PKG_VERSION
)
15 PKG_IPK
:= $(PACKAGE_DIR
)/$(PKG_NAME
)_
$(PKG_VERSION
)-$(PKG_RELEASE
)_
$(ARCH
).ipk
16 PKG_IPK_DIR
:= $(PKG_BUILD_DIR
)/ipkg
17 PKG_INSTALL_DIR
:=$(PKG_BUILD_DIR
)/ipkg-install
19 $(DL_DIR
)/$(PKG_SOURCE
):
20 $(SCRIPT_DIR
)/download.pl
$(DL_DIR
) $(PKG_SOURCE
) $(PKG_MD5SUM
) $(PKG_SOURCE_URL
)
22 $(PKG_BUILD_DIR
)/.unpacked
: $(DL_DIR
)/$(PKG_SOURCE
)
23 $(PKG_CAT
) $(DL_DIR
)/$(PKG_SOURCE
) |
tar -C
$(BUILD_DIR
) $(TAR_OPTIONS
) -
24 touch
$(PKG_BUILD_DIR
)/.unpacked
26 $(PKG_BUILD_DIR
)/.configured
: $(PKG_BUILD_DIR
)/.unpacked
27 (cd
$(PKG_BUILD_DIR
); rm -rf config.cache
; \
28 $(TARGET_CONFIGURE_OPTS
) \
29 CFLAGS
="$(TARGET_CFLAGS)" \
30 ac_cv_func_malloc_0_nonnull
="yes" \
32 --target
=$(GNU_TARGET_NAME
) \
33 --host
=$(GNU_TARGET_NAME
) \
34 --build
=$(GNU_HOST_NAME
) \
40 --datadir=/usr
/share \
41 --includedir=/usr
/include \
42 --infodir=/usr
/share
/info \
44 --libexecdir
=/usr
/lib \
45 --localstatedir
=/var \
46 --mandir=/usr
/share
/man \
49 $(DISABLE_LARGEFILE
) \
52 touch
$(PKG_BUILD_DIR
)/.configured
54 $(PKG_BUILD_DIR
)/.built
: $(PKG_BUILD_DIR
)/.configured
55 $(MAKE
) -C
$(PKG_BUILD_DIR
) \
56 cfg_filename
="/etc/dhcp-fwd.conf"
57 touch
$(PKG_BUILD_DIR
)/.built
59 $(PKG_INSTALL_DIR
)/usr
/sbin
/dhcp-fwd
: $(PKG_BUILD_DIR
)/.built
60 mkdir
-p
$(PKG_INSTALL_DIR
)
61 $(MAKE
) -C
$(PKG_BUILD_DIR
) \
62 DESTDIR
="$(PKG_INSTALL_DIR)" \
65 $(PKG_IPK
): $(PKG_INSTALL_DIR
)/usr
/sbin
/dhcp-fwd
66 $(SCRIPT_DIR
)/make-ipkg-dir.sh
$(PKG_IPK_DIR
) $(PKG_NAME
).control
$(PKG_VERSION
)-$(PKG_RELEASE
) $(ARCH
)
67 cp
-fp
$(PKG_NAME
).conffiles
$(PKG_IPK_DIR
)/CONTROL
/conffiles
68 chmod
0644 $(PKG_IPK_DIR
)/CONTROL
/conffiles
69 mkdir
-p
$(PKG_IPK_DIR
)/etc
70 cp
-fp
$(PKG_BUILD_DIR
)/contrib
/dhcp-fwd.conf
$(PKG_IPK_DIR
)/etc
/
71 chmod
0644 $(PKG_IPK_DIR
)/etc
/dhcp-fwd.conf
72 mkdir
-p
$(PKG_IPK_DIR
)/etc
/init.d
73 cp
-fp
$(PKG_NAME
).init
$(PKG_IPK_DIR
)/etc
/init.d
/dhcp-fwd
74 chmod
0755 $(PKG_IPK_DIR
)/etc
/init.d
/dhcp-fwd
75 mkdir
-p
$(PKG_IPK_DIR
)/usr
/bin
76 cp
-fp
$(PKG_INSTALL_DIR
)/usr
/sbin
/dhcp-fwd
$(PKG_IPK_DIR
)/usr
/bin
/
77 $(STRIP
) $(PKG_IPK_DIR
)/usr
/bin
/*
78 $(IPKG_BUILD
) $(PKG_IPK_DIR
) $(PACKAGE_DIR
)
80 $(IPKG_STATE_DIR
)/info/$(PKG_NAME
).list
: $(PKG_IPK
)
81 $(IPKG
) install $(PKG_IPK
)
83 source
: $(DL_DIR
)/$(PKG_SOURCE
)
84 prepare
: $(PKG_BUILD_DIR
)/.unpacked
86 install: $(IPKG_STATE_DIR
)/info/$(PKG_NAME
).list
89 rm -rf
$(PKG_BUILD_DIR
)