3 include $(TOPDIR
)/rules.mk
5 PKG_NAME
:= dhcp-forwarder
8 PKG_MD5SUM
:= e7f876e615ebc3f96418f6477b4451e2
11 http
://savannah.nongnu.org
/download
/dhcp-fwd
/ \
12 http
://nthill.free.fr
/openwrt
/sources
/$(PKG_NAME
)/
13 PKG_SOURCE
:= $(PKG_NAME
)-$(PKG_VERSION
).
tar.bz2
16 PKG_BUILD_DIR
:= $(BUILD_DIR
)/$(PKG_NAME
)-$(PKG_VERSION
)
17 PKG_INSTALL_DIR
:=$(PKG_BUILD_DIR
)/ipkg-install
19 IPKG_DHCP_FORWARDER
:=$(PACKAGE_DIR
)/$(PKG_NAME
)_
$(PKG_VERSION
)-$(PKG_RELEASE
)_
$(ARCH
).ipk
20 IDIR_DHCP_FORWARDER
:=$(PKG_BUILD_DIR
)/ipkg
/$(PKG_NAME
)
21 INFO_DHCP_FORWARDER
:=$(IPKG_STATE_DIR
)/info/$(PKG_NAME
).list
23 $(DL_DIR
)/$(PKG_SOURCE
):
24 $(SCRIPT_DIR
)/download.pl
$(DL_DIR
) $(PKG_SOURCE
) $(PKG_MD5SUM
) $(PKG_SOURCE_URL
)
26 $(PKG_BUILD_DIR
)/.prepared
: $(DL_DIR
)/$(PKG_SOURCE
)
27 rm -rf
$(PKG_BUILD_DIR
)
28 $(PKG_CAT
) $(DL_DIR
)/$(PKG_SOURCE
) |
tar -C
$(BUILD_DIR
) $(TAR_OPTIONS
) -
29 touch
$(PKG_BUILD_DIR
)/.prepared
31 $(PKG_BUILD_DIR
)/.configured
: $(PKG_BUILD_DIR
)/.prepared
32 (cd
$(PKG_BUILD_DIR
); rm -rf config.
{cache
,status
} ; \
33 $(TARGET_CONFIGURE_OPTS
) \
34 CFLAGS
="$(TARGET_CFLAGS)" \
35 ac_cv_func_malloc_0_nonnull
="yes" \
37 --target
=$(GNU_TARGET_NAME
) \
38 --host
=$(GNU_TARGET_NAME
) \
39 --build
=$(GNU_HOST_NAME
) \
45 --datadir=/usr
/share \
46 --includedir=/usr
/include \
47 --infodir=/usr
/share
/info \
49 --libexecdir
=/usr
/lib \
50 --localstatedir
=/var \
51 --mandir=/usr
/share
/man \
54 $(DISABLE_LARGEFILE
) \
57 touch
$(PKG_BUILD_DIR
)/.configured
59 $(PKG_BUILD_DIR
)/.built
: $(PKG_BUILD_DIR
)/.configured
60 $(MAKE
) -C
$(PKG_BUILD_DIR
) \
61 cfg_filename
="/etc/dhcp-fwd.conf"
62 touch
$(PKG_BUILD_DIR
)/.built
64 $(PKG_INSTALL_DIR
)/usr
/sbin
/dhcp-fwd
: $(PKG_BUILD_DIR
)/.built
65 mkdir
-p
$(PKG_INSTALL_DIR
)
66 $(MAKE
) -C
$(PKG_BUILD_DIR
) \
67 DESTDIR
="$(PKG_INSTALL_DIR)" \
70 $(IPKG_DHCP_FORWARDER
): $(PKG_INSTALL_DIR
)/usr
/sbin
/dhcp-fwd
71 $(SCRIPT_DIR
)/make-ipkg-dir.sh
$(IDIR_DHCP_FORWARDER
) .
/ipkg
/$(PKG_NAME
).control
$(PKG_VERSION
)-$(PKG_RELEASE
) $(ARCH
)
72 install -m0644 .
/ipkg
/$(PKG_NAME
).conffiles
$(IDIR_DHCP_FORWARDER
)/CONTROL
/conffiles
73 install -m0755
-d
$(IDIR_DHCP_FORWARDER
)/etc
/init.d
74 install -m0755 .
/ipkg
/$(PKG_NAME
).init
$(IDIR_DHCP_FORWARDER
)/etc
/init.d
/dhcp-fwd
75 install -m0755
-d
$(IDIR_DHCP_FORWARDER
)/etc
76 install -m0644
$(PKG_BUILD_DIR
)/contrib
/dhcp-fwd.conf
$(IDIR_DHCP_FORWARDER
)/etc
/
77 install -m0755
-d
$(IDIR_DHCP_FORWARDER
)/usr
/bin
78 cp
-fpR
$(PKG_INSTALL_DIR
)/usr
/sbin
/dhcp-fwd
$(IDIR_DHCP_FORWARDER
)/usr
/bin
/
79 $(RSTRIP
) $(IDIR_DHCP_FORWARDER
)
80 $(IPKG_BUILD
) $(IDIR_DHCP_FORWARDER
) $(PACKAGE_DIR
)
82 $(INFO_DHCP_FORWARDER
): $(IPKG_DHCP_FORWARDER
)
83 $(IPKG
) install $(IPKG_DHCP_FORWARDER
)
85 source
: $(DL_DIR
)/$(PKG_SOURCE
)
86 prepare
: $(PKG_BUILD_DIR
)/.prepared
87 compile
: $(IPKG_DHCP_FORWARDER
)
88 install: $(INFO_DHCP_FORWARDER
)
91 rm -rf
$(PKG_BUILD_DIR
)
92 rm -rf
$(IPKG_DHCP_FORWARDER
)