-$(IDIR_PPP_MOD_PPPOE)/sbin/ifup.pppoe:
- 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)/sbin/ifup.pppoe
-
-$(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_DIR) $(1)/usr/lib/pppd/$(PKG_VERSION)
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/pppd/$(PKG_VERSION)/pppoatm.so \
+ $(1)/usr/lib/pppd/$(PKG_VERSION)/
+ $(INSTALL_DIR) $(1)/lib/network
+ $(INSTALL_BIN) ./files/pppoa.sh $(1)/lib/network/
+endef
+
+define Package/ppp-mod-pppoe/install
+ $(INSTALL_DIR) $(1)/usr/lib/pppd/$(PKG_VERSION)
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/pppd/$(PKG_VERSION)/rp-pppoe.so \
+ $(1)/usr/lib/pppd/$(PKG_VERSION)/
+ $(INSTALL_DIR) $(1)/lib/network
+ $(INSTALL_BIN) ./files/pppoe.sh $(1)/lib/network/
+endef
+
+define Package/ppp-mod-radius/install
+ $(INSTALL_DIR) $(1)/usr/lib/pppd/$(PKG_VERSION)
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/pppd/$(PKG_VERSION)/radius.so \
+ $(1)/usr/lib/pppd/$(PKG_VERSION)/
+ $(INSTALL_DIR) $(1)/etc/ppp
+ $(INSTALL_DATA) ./files/etc/ppp/radius.conf $(1)/etc/ppp/
+ $(INSTALL_DIR) $(1)/etc/ppp/radius
+ $(INSTALL_DATA) ./files/etc/ppp/radius/dictionary* \
+ $(1)/etc/ppp/radius/
+ $(INSTALL_CONF) ./files/etc/ppp/radius/servers \
+ $(1)/etc/ppp/radius/
+endef
+
+define Package/chat/install
+ $(INSTALL_DIR) $(1)/usr/sbin
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/chat $(1)/usr/sbin/
+endef
+
+define Package/pppdump/install
+ $(INSTALL_DIR) $(1)/usr/sbin
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/pppdump $(1)/usr/sbin/
+endef
+
+define Package/pppstats/install
+ $(INSTALL_DIR) $(1)/usr/sbin
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/pppstats $(1)/usr/sbin/
+endef