3 ifneq ($(strip ${IPKG_RULES_INC}),)
4 include $(IPKG_RULES_INC
)
9 PKG_VERSION
:= $(shell cat .
/ipkg
/version
)
10 CURRENT_DIR
:= $(shell pwd
)
11 INSTALL_DIR ?
= $(CURRENT_DIR
)/ipkg-install
15 I_DHCP_FORWARDER
:= ipkg
/dhcp-forwarder
26 .stamp-configured
: $(BUILD_DEPS
)
29 $(TARGET_CONFIGURE_OPTS
) \
30 CFLAGS
="$(TARGET_CFLAGS) -I$(STAGING_DIR)/usr/include" \
31 LDFLAGS
="-L$(STAGING_DIR)/usr/lib" \
32 ac_cv_func_malloc_0_nonnull
="yes" \
34 --target
=$(GNU_TARGET_NAME
) \
35 --host
=$(GNU_TARGET_NAME
) \
36 --build
=$(GNU_HOST_NAME
) \
42 --datadir=/usr
/share \
43 --includedir=/usr
/include \
44 --infodir=/usr
/share
/info \
46 --libexecdir
=/usr
/lib \
47 --localstatedir
=/var \
48 --mandir=/usr
/share
/man \
51 $(DISABLE_LARGEFILE
) \
55 touch .stamp-configured
58 .stamp-built
: .stamp-configured
61 $(TARGET_CONFIGURE_OPTS
) \
62 cfg_filename
="/etc/dhcp-fwd.conf" \
67 $(INSTALL_DIR
)/usr
/sbin
/dhcp-fwd
: .stamp-built
69 mkdir
-p
$(INSTALL_DIR
)
72 DESTDIR
="$(INSTALL_DIR)" \
76 configure
: .stamp-configured
82 install: $(INSTALL_DIR
)/usr
/sbin
/dhcp-fwd
85 package
: $(INSTALL_DIR
)/usr
/sbin
/dhcp-fwd
87 mkdir
-p
$(I_DHCP_FORWARDER
)/etc
88 cp
-fpR contrib
/dhcp-fwd.conf
$(I_DHCP_FORWARDER
)/etc
/
90 mkdir
-p
$(I_DHCP_FORWARDER
)/usr
/sbin
91 cp
-fpR
$(INSTALL_DIR
)/usr
/sbin
/dhcp-fwd
$(I_DHCP_FORWARDER
)/usr
/sbin
/
92 $(STRIP
) $(I_DHCP_FORWARDER
)/usr
/sbin
/*
94 chmod
0755 $(I_DHCP_FORWARDER
)/etc
/
95 chmod
0600 $(I_DHCP_FORWARDER
)/etc
/dhcp-fwd.conf
96 chmod
0755 $(I_DHCP_FORWARDER
)/etc
/init.d
/
97 chmod
0755 $(I_DHCP_FORWARDER
)/etc
/init.d
/dhcp-fwd
99 chmod
0755 ipkg
/*/CONTROL
/
100 chmod
0644 ipkg
/*/CONTROL
/control
101 -chmod
0644 ipkg
/*/CONTROL
/conffiles
103 perl
-pi
-e
"s/^Arch.*:.*/Architecture: $(ARCH)/g" ipkg
/*/CONTROL
/control
104 ifneq ($(strip $(PKG_VERSION
)),)
105 perl
-pi
-e
"s/^Vers.*:.*/Version: $(PKG_VERSION)/g" ipkg
/*/CONTROL
/control
108 $(IPKG_BUILD
) $(I_DHCP_FORWARDER
) $(IPKG_TARGET_DIR
)
114 DESTDIR
="$(INSTALL_DIR)" \
118 $(I_DHCP_FORWARDER
)/etc
/dhcp-fwd.conf \
119 $(I_DHCP_FORWARDER
)/usr \
124 @cat
$(I_DHCP_FORWARDER
)/CONTROL
/control
128 .PHONY
: configure build
install package
clean control