-$(IDIR_PPP_MOD_PPPOE)/etc/init.d/S50pppoe:
- install -d -m0755 $(IDIR_PPP_MOD_PPPOE)/sbin
- install -m0755 ./files/ifup.pppoe $(IDIR_PPP_MOD_PPPOE)/sbin/
-
-$(IPKG_PPP_MOD_PPPOE): $(IDIR_PPP_MOD_PPPOE)/etc/init.d/S50pppoe
-
-$(IDIR_PPP_MOD_RADIUS)/etc/ppp/radius.conf:
-
- install -d -m0755 $(IDIR_PPP_MOD_RADIUS)/etc/ppp
- install -m644 ./files/etc/ppp/radius.conf $(IDIR_PPP_MOD_RADIUS)/etc/ppp/
- install -d -m0755 $(IDIR_PPP_MOD_RADIUS)/etc/ppp/radius
- install -m644 ./files/etc/ppp/radius/dictionary* \
- $(IDIR_PPP_MOD_RADIUS)/etc/ppp/radius/
- install -m600 ./files/etc/ppp/radius/servers \
- $(IDIR_PPP_MOD_RADIUS)/etc/ppp/radius/
-
-$(IPKG_PPP_MOD_RADIUS): $(IDIR_PPP_MOD_RADIUS)/etc/ppp/radius.conf
-
-$(IPKG_CHAT):
- install -d -m0755 $(IDIR_CHAT)/usr/sbin
- cp -fpR $(PKG_INSTALL_DIR)/usr/sbin/chat $(IDIR_CHAT)/usr/sbin/
- $(RSTRIP) $(IDIR_CHAT)
- $(IPKG_BUILD) $(IDIR_CHAT) $(PACKAGE_DIR)
-
-$(IPKG_PPPDUMP):
- install -d -m0755 $(IDIR_PPPDUMP)/usr/sbin
- cp -fpR $(PKG_INSTALL_DIR)/usr/sbin/pppdump $(IDIR_PPPDUMP)/usr/sbin/
- $(RSTRIP) $(IDIR_PPPDUMP)
- $(IPKG_BUILD) $(IDIR_PPPDUMP) $(PACKAGE_DIR)
-
-$(IPKG_PPPSTATS): $(IPKG_PPP)
- install -d -m0755 $(IDIR_PPPSTATS)/usr/sbin
- cp -fpR $(PKG_INSTALL_DIR)/usr/sbin/pppstats $(IDIR_PPPSTATS)/usr/sbin/
- $(RSTRIP) $(IDIR_PPPSTATS)
- $(IPKG_BUILD) $(IDIR_PPPSTATS) $(PACKAGE_DIR)
+define Package/ppp-mod-pppoa/install
+ install -d -m0755 $(1)/usr/lib/pppd/$(PKG_VERSION)
+ install -m0755 $(PKG_INSTALL_DIR)/usr/lib/pppd/$(PKG_VERSION)/pppoatm.so \
+ $(1)/usr/lib/pppd/$(PKG_VERSION)/
+ install -d -m0755 $(1)/lib/network
+ install -m0755 ./files/pppoa.sh $(1)/lib/network/
+endef
+
+define Package/ppp-mod-pppoe/install
+ install -d -m0755 $(1)/usr/lib/pppd/$(PKG_VERSION)
+ install -m0755 $(PKG_INSTALL_DIR)/usr/lib/pppd/$(PKG_VERSION)/rp-pppoe.so \
+ $(1)/usr/lib/pppd/$(PKG_VERSION)/
+ install -d -m0755 $(1)/lib/network
+ install -m0755 ./files/pppoe.sh $(1)/lib/network/
+endef
+
+define Package/ppp-mod-radius/install
+ install -d -m0755 $(1)/usr/lib/pppd/$(PKG_VERSION)
+ install -m0755 $(PKG_INSTALL_DIR)/usr/lib/pppd/$(PKG_VERSION)/radius.so \
+ $(1)/usr/lib/pppd/$(PKG_VERSION)/
+ install -d -m0755 $(1)/etc/ppp
+ install -m0644 ./files/etc/ppp/radius.conf $(1)/etc/ppp/
+ install -d -m0755 $(1)/etc/ppp/radius
+ install -m0644 ./files/etc/ppp/radius/dictionary* \
+ $(1)/etc/ppp/radius/
+ install -m0600 ./files/etc/ppp/radius/servers \
+ $(1)/etc/ppp/radius/
+endef
+
+define Package/chat/install
+ install -d -m0755 $(1)/usr/sbin
+ install -m0755 $(PKG_INSTALL_DIR)/usr/sbin/chat $(1)/usr/sbin/
+endef
+
+define Package/pppdump/install
+ install -d -m0755 $(1)/usr/sbin
+ install -m0755 $(PKG_INSTALL_DIR)/usr/sbin/pppdump $(1)/usr/sbin/
+endef
+
+define Package/pppstats/install
+ install -d -m0755 $(1)/usr/sbin
+ install -m0755 $(PKG_INSTALL_DIR)/usr/sbin/pppstats $(1)/usr/sbin/
+endef