fix rp-pppoe download location (#1039)
[openwrt/svn-archive/archive.git] / net / rp-pppoe / Makefile
index f7119ee60f7fed20b4c0dbac2c1a8f910d8de9b0..ce8aff3bf5b222cbbf242e2b0412723500b25ccf 100644 (file)
@@ -9,12 +9,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=rp-pppoe
-PKG_VERSION:=3.5
+PKG_VERSION:=3.8
 PKG_RELEASE:=1
-PKG_MD5SUM:=
 
-PKG_SOURCE_URL:=http://roaringpenguin.com/penguin/pppoe/
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=http://roaringpenguin.com/files/download
+PKG_MD5SUM:=0e32760f498f9cde44081ee6aafc823b
 PKG_CAT:=zcat
 
 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
@@ -22,105 +22,78 @@ PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
 
 include $(INCLUDE_DIR)/package.mk
 
-define Package/rp-pppoe
+define Package/rp-pppoe/Default
   SECTION:=net
   CATEGORY:=Network
   DEPENDS:=+ppp
-  SUBMENU:=Roaring Penguin PPPoE (PPP over Ethernet) implementation
-  TITLE:=Roaring Penguin PPPoE (PPP over Ethernet) implementation
+  TITLE:=PPPoE (PPP over Ethernet)
+  URL:=http://roaringpenguin.com/penguin/pppoe/
 endef
   
 define Package/rp-pppoe-client
-  $(call Package/rp-pppoe)
-  TITLE:=PPPoE (PPP over Ethernet) client
+  $(call Package/rp-pppoe/Default)
+  TITLE+= client
 endef
 
 define Package/rp-pppoe-relay
-  $(call Package/rp-pppoe)
-  TITLE:=PPPoE (PPP over Ethernet) relay
+  $(call Package/rp-pppoe/Default)
+  TITLE+= relay
 endef
 
 define Package/rp-pppoe-server
-  $(call Package/rp-pppoe)
-  TITLE:=PPPoE (PPP over Ethernet) server
+  $(call Package/rp-pppoe/Default)
+  TITLE+= server
 endef
 
 define Package/rp-pppoe-sniff
-  $(call Package/rp-pppoe)
-  TITLE:=PPPoE (PPP over Ethernet) sniffer
+  $(call Package/rp-pppoe/Default)
+  TITLE+= sniffer
 endef
 
 define Build/Configure
- (cd $(PKG_BUILD_DIR)/src ; rm -rf config.{cache,status}; \
-                $(TARGET_CONFIGURE_OPTS) \
-                CFLAGS="$(TARGET_CFLAGS)" \
-                ac_cv_func_setvbuf_reversed=no \
-                ac_cv_sizeof_unsigned_short=2 \
-                ac_cv_sizeof_unsigned_int=4 \
-                ac_cv_sizeof_unsigned_long=4 \
-                ac_cv_linux_kernel_pppoe=yes \
-                ac_cv_pack_bitfields_reversed=yes \
-                ./configure \
-                  --target=$(GNU_TARGET_NAME) \
-                  --host=$(GNU_TARGET_NAME) \
-                  --build=$(GNU_HOST_NAME) \
-                  --program-prefix="" \
-                  --program-suffix="" \
-                  --prefix=/usr \
-                  --exec-prefix=/usr \
-                  --bindir=/usr/bin \
-                  --datadir=/usr/share \
-                  --includedir=/usr/include \
-                  --infodir=/usr/share/info \
-                  --libdir=/usr/lib \
-                  --libexecdir=/usr/lib \
-                  --localstatedir=/var \
-                  --mandir=/usr/share/man \
-                  --sbindir=/usr/sbin \
-                  --sysconfdir=/etc \
-                  $(DISABLE_LARGEFILE) \
-                 $(DISABLE_NLS) \
-        )
+       $(call Build/Configure/Default,, \
+               ac_cv_path_PPPD=/usr/sbin/pppd, \
+               src \
+       )
 endef
 
 define Build/Compile   
        $(MAKE) -C $(PKG_BUILD_DIR)/src \
-               DESTDIR="$(PKG_INSTALL_DIR)" \
+               RPM_INSTALL_ROOT="$(PKG_INSTALL_DIR)" \
                all install
 endef
 
 define Package/rp-pppoe-client/install 
-       install -d -m0755 $(1)/etc/init.d
-       install -m0755 ./files/pppoe-client.init $(1)/etc/init.d/pppoe-client
-       install -d -m0755 $(1)/etc/ppp
-       install -m0644 $(PKG_INSTALL_DIR)/etc/pppoe.conf $(1)/etc/
-       install -d -m0755 $(1)/usr/sbin
+       $(INSTALL_DIR) $(1)/etc/init.d
+       $(INSTALL_BIN) ./files/pppoe-client.init $(1)/etc/init.d/pppoe-client
+       $(INSTALL_DIR) $(1)/etc/ppp
+       $(INSTALL_DATA) $(PKG_INSTALL_DIR)/etc/ppp/pppoe.conf $(1)/etc/ppp/
+       $(INSTALL_DIR) $(1)/usr/sbin
        $(CP) $(PKG_INSTALL_DIR)/usr/sbin/pppoe $(1)/usr/sbin/
-       $(CP) $(PKG_INSTALL_DIR)/usr/sbin/adsl-* $(1)/usr/sbin/
 endef
 
 define Package/rp-pppoe-relay/install  
-       install -d -m0755 $(1)/etc/default
-       install -m0755 ./files/pppoe-relay.default $(1)/etc/default/pppoe-relay
-       install -d -m0755 $(1)/etc/init.d
-       install -m0755 ./files/pppoe-relay.init $(1)/etc/init.d/pppoe-relay
-       install -d -m0755 $(1)/usr/sbin
+       $(INSTALL_DIR) $(1)/etc/default
+       $(INSTALL_BIN) ./files/pppoe-relay.default $(1)/etc/default/pppoe-relay
+       $(INSTALL_DIR) $(1)/etc/init.d
+       $(INSTALL_BIN) ./files/pppoe-relay.init $(1)/etc/init.d/pppoe-relay
+       $(INSTALL_DIR) $(1)/usr/sbin
        $(CP) $(PKG_INSTALL_DIR)/usr/sbin/pppoe-relay $(1)/usr/sbin/
 endef
 
 define Package/rp-pppoe-server/install 
-       install -d -m0755 $(1)/etc/default
-       install -m0755 ./files/pppoe-server.default $(1)/etc/default/pppoe-server
-       install -d -m0755 $(1)/etc/init.d
-       install -m0755 ./files/pppoe-server.init $(1)/etc/init.d/pppoe-server
-       install -d -m0755 $(1)/etc/ppp
-       install -m0644 $(PKG_INSTALL_DIR)/etc/ppp/pppoe-server-options $(1)/etc/ppp/
-       install -d -m0755 $(1)/usr/sbin
+       $(INSTALL_DIR) $(1)/etc/default
+       $(INSTALL_BIN) ./files/pppoe-server.default $(1)/etc/default/pppoe-server
+       $(INSTALL_DIR) $(1)/etc/init.d
+       $(INSTALL_BIN) ./files/pppoe-server.init $(1)/etc/init.d/pppoe-server
+       $(INSTALL_DIR) $(1)/etc/ppp
+       $(INSTALL_DATA) $(PKG_INSTALL_DIR)/etc/ppp/pppoe-server-options $(1)/etc/ppp/
+       $(INSTALL_DIR) $(1)/usr/sbin
        $(CP) $(PKG_INSTALL_DIR)/usr/sbin/pppoe-server $(1)/usr/sbin/
 endef
 
 define Package/rp-pppoe-sniff/install  
-       install -d -m0755 $(1)/usr/sbin
+       $(INSTALL_DIR) $(1)/usr/sbin
        $(CP) $(PKG_INSTALL_DIR)/usr/sbin/pppoe-sniff $(1)/usr/sbin/
 endef
 
@@ -128,4 +101,3 @@ $(eval $(call BuildPackage,rp-pppoe-client))
 $(eval $(call BuildPackage,rp-pppoe-relay))
 $(eval $(call BuildPackage,rp-pppoe-server))
 $(eval $(call BuildPackage,rp-pppoe-sniff))
-