2 # Copyright (C) 2006 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
9 include $(TOPDIR)/rules.mk
16 PKG_SOURCE_URL:=http://roaringpenguin.com/penguin/pppoe/
17 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
20 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
21 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
23 include $(INCLUDE_DIR)/package.mk
25 define Package/rp-pppoe
29 SUBMENU:=Roaring Penguin PPPoE (PPP over Ethernet) implementation
30 TITLE:=Roaring Penguin PPPoE (PPP over Ethernet) implementation
33 define Package/rp-pppoe-client
34 $(call Package/rp-pppoe)
35 TITLE:=PPPoE (PPP over Ethernet) client
38 define Package/rp-pppoe-relay
39 $(call Package/rp-pppoe)
40 TITLE:=PPPoE (PPP over Ethernet) relay
43 define Package/rp-pppoe-server
44 $(call Package/rp-pppoe)
45 TITLE:=PPPoE (PPP over Ethernet) server
48 define Package/rp-pppoe-sniff
49 $(call Package/rp-pppoe)
50 TITLE:=PPPoE (PPP over Ethernet) sniffer
53 define Build/Configure
54 (cd $(PKG_BUILD_DIR)/src ; rm -rf config.{cache,status}; \
55 $(TARGET_CONFIGURE_OPTS) \
56 CFLAGS="$(TARGET_CFLAGS)" \
57 ac_cv_func_setvbuf_reversed=no \
58 ac_cv_sizeof_unsigned_short=2 \
59 ac_cv_sizeof_unsigned_int=4 \
60 ac_cv_sizeof_unsigned_long=4 \
61 ac_cv_linux_kernel_pppoe=yes \
62 ac_cv_pack_bitfields_reversed=yes \
64 --target=$(GNU_TARGET_NAME) \
65 --host=$(GNU_TARGET_NAME) \
66 --build=$(GNU_HOST_NAME) \
72 --datadir=/usr/share \
73 --includedir=/usr/include \
74 --infodir=/usr/share/info \
76 --libexecdir=/usr/lib \
77 --localstatedir=/var \
78 --mandir=/usr/share/man \
81 $(DISABLE_LARGEFILE) \
87 $(MAKE) -C $(PKG_BUILD_DIR)/src \
88 DESTDIR="$(PKG_INSTALL_DIR)" \
92 define Package/rp-pppoe-client/install
93 install -d -m0755 $(1)/etc/init.d
94 install -m0755 ./files/pppoe-client.init $(1)/etc/init.d/pppoe-client
95 install -d -m0755 $(1)/etc/ppp
96 install -m0644 $(PKG_INSTALL_DIR)/etc/pppoe.conf $(1)/etc/
97 install -d -m0755 $(1)/usr/sbin
98 $(CP) $(PKG_INSTALL_DIR)/usr/sbin/pppoe $(1)/usr/sbin/
99 $(CP) $(PKG_INSTALL_DIR)/usr/sbin/adsl-* $(1)/usr/sbin/
102 define Package/rp-pppoe-relay/install
103 install -d -m0755 $(1)/etc/default
104 install -m0755 ./files/pppoe-relay.default $(1)/etc/default/pppoe-relay
105 install -d -m0755 $(1)/etc/init.d
106 install -m0755 ./files/pppoe-relay.init $(1)/etc/init.d/pppoe-relay
107 install -d -m0755 $(1)/usr/sbin
108 $(CP) $(PKG_INSTALL_DIR)/usr/sbin/pppoe-relay $(1)/usr/sbin/
111 define Package/rp-pppoe-server/install
112 install -d -m0755 $(1)/etc/default
113 install -m0755 ./files/pppoe-server.default $(1)/etc/default/pppoe-server
114 install -d -m0755 $(1)/etc/init.d
115 install -m0755 ./files/pppoe-server.init $(1)/etc/init.d/pppoe-server
116 install -d -m0755 $(1)/etc/ppp
117 install -m0644 $(PKG_INSTALL_DIR)/etc/ppp/pppoe-server-options $(1)/etc/ppp/
118 install -d -m0755 $(1)/usr/sbin
119 $(CP) $(PKG_INSTALL_DIR)/usr/sbin/pppoe-server $(1)/usr/sbin/
122 define Package/rp-pppoe-sniff/install
123 install -d -m0755 $(1)/usr/sbin
124 $(CP) $(PKG_INSTALL_DIR)/usr/sbin/pppoe-sniff $(1)/usr/sbin/
127 $(eval $(call BuildPackage,rp-pppoe-client))
128 $(eval $(call BuildPackage,rp-pppoe-relay))
129 $(eval $(call BuildPackage,rp-pppoe-server))
130 $(eval $(call BuildPackage,rp-pppoe-sniff))