rewrite of the network scripts and configuration
[openwrt/svn-archive/archive.git] / openwrt / package / ppp / Makefile
index 1542a8b5d7a409fc234ad9eec4b66bbfd67116d6..e49b610c36b49e878e2d3323b3c98c47c879d890 100644 (file)
@@ -1,3 +1,9 @@
+# 
+# Copyright (C) 2006 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
 # $Id$
 
 include $(TOPDIR)/rules.mk
@@ -5,6 +11,7 @@ include $(TOPDIR)/rules.mk
 PKG_NAME:=ppp
 PKG_VERSION:=2.4.3
 PKG_RELEASE:=7
+PKG_BUILDDEP:=libpcap linux-atm
 
 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
@@ -14,69 +21,67 @@ PKG_CAT:=zcat
 
 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
 
-include $(TOPDIR)/package/rules.mk
+include $(INCLUDE_DIR)/package.mk
 
 define Package/ppp
- SECTION:=net
- CATEGORY:=Network
- NEEDS:=libpcap
- MENU:=1
- DEFAULT:=y
- TITLE:=PPP daemon
- DESCRIPTION:=PPP (Point-to-Point Protocol) daemon
- URL:=http://ppp.samba.org/
+SECTION:=net
+CATEGORY:=Network
+MENU:=1
+DEFAULT:=y
+TITLE:=PPP daemon
+DESCRIPTION:=PPP (Point-to-Point Protocol) daemon
+URL:=http://ppp.samba.org/
 endef
 
 define Package/ppp-mod-pppoa
- SECTION:=net
- CATEGORY:=Network
- DEPENDS:=ppp
- TITLE:=PPPoA plugin
- DESCRIPTION:=PPPoA (PPP over ATM) plugin for ppp
+SECTION:=net
+CATEGORY:=Network
+DEPENDS:=ppp +linux-atm
+TITLE:=PPPoA plugin
+DESCRIPTION:=PPPoA (PPP over ATM) plugin for ppp
 endef
 
 define Package/ppp-mod-pppoe
- SECTION:=net
- CATEGORY:=Network
- DEFAULT:=y
- DEPENDS:=ppp
- TITLE:=PPPoE plugin
- DESCRIPTION:=PPPoE (PPP over Ethernet) plugin for ppp
+SECTION:=net
+CATEGORY:=Network
+DEFAULT:=y
+DEPENDS:=ppp
+TITLE:=PPPoE plugin
+DESCRIPTION:=PPPoE (PPP over Ethernet) plugin for ppp
 endef
 
 define Package/ppp-mod-radius
- SECTION:=net
- CATEGORY:=Network
- DEPENDS:=ppp
- TITLE:=RADIUS plugin
- DESCRIPTION:=RADIUS (Remote Authentication Dial-In User Service) plugin for ppp
+SECTION:=net
+CATEGORY:=Network
+DEPENDS:=ppp
+TITLE:=RADIUS plugin
+DESCRIPTION:=RADIUS (Remote Authentication Dial-In User Service) plugin for ppp
 endef
 
 define Package/chat
- SECTION:=net
- CATEGORY:=Network
- DEPENDS:=ppp
- TITLE:=Establish conversation with a modem
- DESCRIPTION:=Utility to establish conversation with other PPP servers (via a modem)
+SECTION:=net
+CATEGORY:=Network
+DEPENDS:=ppp
+TITLE:=Establish conversation with a modem
+DESCRIPTION:=Utility to establish conversation with other PPP servers (via a modem)
 endef
 
 define Package/pppdump
- SECTION:=net
- CATEGORY:=Network
- DEPENDS:=ppp
- TITLE:=Read PPP record file
- DESCRIPTION:=Utility to read PPP record file
+SECTION:=net
+CATEGORY:=Network
+DEPENDS:=ppp
+TITLE:=Read PPP record file
+DESCRIPTION:=Utility to read PPP record file
 endef
 
 define Package/pppstats
- SECTION:=net
- CATEGORY:=Network
- DEPENDS:=ppp
- TITLE:=Report PPP statistics
- DESCRIPTION:=Utility to report PPP statistics
+SECTION:=net
+CATEGORY:=Network
+DEPENDS:=ppp
+TITLE:=Report PPP statistics
+DESCRIPTION:=Utility to report PPP statistics
 endef
 
-
 define Build/Compile
        rm -rf $(PKG_INSTALL_DIR)
        mkdir -p $(PKG_INSTALL_DIR)/usr
@@ -90,6 +95,8 @@ define Build/Compile
 endef
 
 define Package/ppp/install
+       install -d -m0755 $(1)/lib/network
+       install -m0755 ./files/ppp.sh $(1)/lib/network/
        install -d -m0755 $(1)/etc/ppp
        install -m0600 ./files/etc/ppp/chap-secrets $(1)/etc/ppp/
        install -m0644 ./files/etc/ppp/filter $(1)/etc/ppp/
@@ -105,19 +112,19 @@ define Package/ppp/install
 endef
        
 define Package/ppp-mod-pppoa/install
+       install -d -m0755 $(1)/lib/network
+       install -m0755 ./files/pppoa.sh $(1)/lib/network/
        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)/sbin
-       install -m0755 ./files/ifup.pppoa $(1)/sbin/
 endef
 
 define Package/ppp-mod-pppoe/install
+       install -d -m0755 $(1)/lib/network
+       install -m0755 ./files/pppoe.sh $(1)/lib/network/
        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)/sbin
-       install -m0755 ./files/ifup.pppoe $(1)/sbin/
 endef
 
 define Package/ppp-mod-radius/install
@@ -146,7 +153,6 @@ endef
 define Package/pppstats/install
        install -d -m0755 $(1)/usr/sbin
        install -m0755 $(PKG_INSTALL_DIR)/usr/sbin/pppstats $(1)/usr/sbin/
-       $(RSTRIP) $(1)
 endef
 
 $(eval $(call BuildPackage,ppp))