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_PPPOE_SERVER := ipkg/pppoe-server
16 I_PPPOE_RELAY := ipkg/pppoe-relay
17 I_PPPOE_SNIFF := ipkg/pppoe-sniff
18 I_PPPOE_CLIENT := ipkg/pppoe-client
29 .stamp-configured: $(BUILD_DEPS)
32 rm -rf config.cache ; \
33 $(TARGET_CONFIGURE_OPTS) \
34 ac_cv_func_setvbuf_reversed=no \
35 ac_cv_sizeof_unsigned_short=2 \
36 ac_cv_sizeof_unsigned_int=4 \
37 ac_cv_sizeof_unsigned_long=4 \
38 ac_cv_linux_kernel_pppoe=yes \
39 ac_cv_pack_bitfields_reversed=yes \
40 CFLAGS="$(TARGET_CFLAGS)" \
42 --target=$(GNU_TARGET_NAME) \
43 --host=$(GNU_TARGET_NAME) \
44 --build=$(GNU_HOST_NAME) \
50 --datadir=/usr/share \
51 --includedir=/usr/include \
52 --infodir=/usr/share/info \
54 --libexecdir=/usr/lib \
55 --localstatedir=/var \
56 --mandir=/usr/share/man \
59 $(DISABLE_LARGEFILE) \
63 touch .stamp-configured
66 .stamp-built: .stamp-configured
69 $(TARGET_CONFIGURE_OPTS) \
74 $(INSTALL_DIR)/usr/sbin/pppoe: .stamp-built
76 mkdir -p $(INSTALL_DIR)
79 DESTDIR="$(INSTALL_DIR)" \
83 configure: .stamp-configured
89 install: $(INSTALL_DIR)/usr/sbin/pppoe
92 package: $(INSTALL_DIR)/usr/sbin/pppoe
94 mkdir -p $(I_PPPOE_SERVER)/etc/ppp
95 cp -fpR $(INSTALL_DIR)/etc/ppp/pppoe-server-options $(I_PPPOE_SERVER)/etc/ppp/
96 mkdir -p $(I_PPPOE_SERVER)/usr/sbin
97 cp -fpR $(INSTALL_DIR)/usr/sbin/pppoe-server $(I_PPPOE_SERVER)/usr/sbin/
98 $(STRIP) $(I_PPPOE_SERVER)/usr/sbin/*
100 mkdir -p $(I_PPPOE_RELAY)/usr/sbin
101 cp -fpR $(INSTALL_DIR)/usr/sbin/pppoe-relay $(I_PPPOE_RELAY)/usr/sbin/
102 $(STRIP) $(I_PPPOE_RELAY)/usr/sbin/*
104 mkdir -p $(I_PPPOE_SNIFF)/usr/sbin
105 cp -fpR $(INSTALL_DIR)/usr/sbin/pppoe-sniff $(I_PPPOE_SNIFF)/usr/sbin/
106 $(STRIP) $(I_PPPOE_SNIFF)/usr/sbin/*
108 mkdir -p $(I_PPPOE_CLIENT)/etc
109 cp -fpR $(INSTALL_DIR)/etc/pppoe.conf $(I_PPPOE_CLIENT)/etc/
110 mkdir -p $(I_PPPOE_CLIENT)/usr/sbin
111 cp -fpR $(INSTALL_DIR)/usr/sbin/pppoe $(I_PPPOE_CLIENT)/usr/sbin/
112 $(STRIP) $(I_PPPOE_CLIENT)/usr/sbin/*
113 cp -fpR $(INSTALL_DIR)/usr/sbin/adsl-* $(I_PPPOE_CLIENT)/usr/sbin/
115 chmod 0755 ipkg/*/etc/
116 chmod 0755 ipkg/*/etc/default/
117 chmod 0644 ipkg/*/etc/default/*
118 chmod 0755 ipkg/*/etc/init.d/
119 chmod 0755 ipkg/*/etc/init.d/*
121 chmod 0755 ipkg/*/CONTROL/
122 chmod 0644 ipkg/*/CONTROL/control
123 -chmod 0644 ipkg/*/CONTROL/conffiles
125 perl -pi -e "s/^Arch.*:.*/Architecture: $(ARCH)/g" ipkg/*/CONTROL/control
126 ifneq ($(strip $(PKG_VERSION)),)
127 perl -pi -e "s/^Vers.*:.*/Version: $(PKG_VERSION)/g" ipkg/*/CONTROL/control
130 $(IPKG_BUILD) $(I_PPPOE_SERVER) $(IPKG_TARGET_DIR)
131 $(IPKG_BUILD) $(I_PPPOE_RELAY) $(IPKG_TARGET_DIR)
132 $(IPKG_BUILD) $(I_PPPOE_SNIFF) $(IPKG_TARGET_DIR)
133 $(IPKG_BUILD) $(I_PPPOE_CLIENT) $(IPKG_TARGET_DIR)
142 $(INSTALL_DIR)/etc/pppoe.conf \
143 $(INSTALL_DIR)/etc/ppp/pppoe-server-options \
144 $(INSTALL_DIR)/usr/doc/rp-pppoe* \
145 $(INSTALL_DIR)/usr/sbin/adsl-* \
146 $(INSTALL_DIR)/usr/sbin/pppoe* \
147 $(INSTALL_DIR)/usr/share/man/man5/pppoe.conf.5* \
148 $(INSTALL_DIR)/usr/share/man/man8/adsl-*.8* \
149 $(INSTALL_DIR)/usr/share/man/man8/pppoe*.8* \
150 $(I_PPPOE_SERVER)/etc/ppp \
151 $(I_PPPOE_SERVER)/usr \
152 $(I_PPPOE_RELAY)/usr \
153 $(I_PPPOE_SNIFF)/usr \
154 $(I_PPPOE_CLIENT)/etc/ppp* \
155 $(I_PPPOE_CLIENT)/usr \
160 @cat $(I_PPPOE_SERVER)/CONTROL/control
162 @cat $(I_PPPOE_RELAY)/CONTROL/control
164 @cat $(I_PPPOE_SNIFF)/CONTROL/control
166 @cat $(I_PPPOE_CLIENT)/CONTROL/control
170 .PHONY: configure build install package clean control