Makefile 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180
  1. #
  2. # Copyright (C) 2006 OpenWrt.org
  3. #
  4. # This is free software, licensed under the GNU General Public License v2.
  5. # See /LICENSE for more information.
  6. #
  7. # $Id$
  8. include $(TOPDIR)/rules.mk
  9. PKG_NAME:=ppp
  10. PKG_VERSION:=2.4.3
  11. PKG_RELEASE:=7
  12. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  13. PKG_SOURCE_URL:=ftp://ftp.samba.org/pub/ppp/
  14. PKG_MD5SUM:=848f6c3cafeb6074ffeb293c3af79b7c
  15. PKG_CAT:=zcat
  16. PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
  17. PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
  18. PKG_BUILD_DEPENDS:=libpcap linux-atm
  19. include $(INCLUDE_DIR)/package.mk
  20. include $(INCLUDE_DIR)/kernel.mk
  21. define Package/ppp/Default
  22. SECTION:=net
  23. CATEGORY:=Network
  24. URL:=http://ppp.samba.org/
  25. endef
  26. define Package/ppp
  27. $(call Package/ppp/Default)
  28. DEPENDS:=+kmod-ppp
  29. TITLE:=PPP daemon
  30. DESCRIPTION:=\
  31. This package contains the PPP (Point-to-Point Protocol) daemon.
  32. MENU:=1
  33. endef
  34. define Package/ppp-mod-pppoa
  35. $(call Package/ppp/Default)
  36. DEPENDS:=ppp +linux-atm +kmod-pppoa
  37. TITLE:=PPPoA plugin
  38. DESCRIPTION:=\
  39. This package contains a PPPoA (PPP over ATM) plugin for ppp.
  40. endef
  41. define Package/ppp-mod-pppoe
  42. $(call Package/ppp/Default)
  43. DEPENDS:=ppp +kmod-pppoe
  44. TITLE:=PPPoE plugin
  45. DESCRIPTION:=\
  46. This package contains a PPPoE (PPP over Ethernet) plugin for ppp.
  47. endef
  48. define Package/ppp-mod-radius
  49. $(call Package/ppp/Default)
  50. DEPENDS:=ppp
  51. TITLE:=RADIUS plugin
  52. DESCRIPTION:=\
  53. This package contains a RADIUS (Remote Authentication Dial-In User \\\
  54. Service) plugin for ppp.
  55. endef
  56. define Package/chat
  57. $(call Package/ppp/Default)
  58. DEPENDS:=ppp
  59. TITLE:=Establish conversation with a modem
  60. DESCRIPTION:=\
  61. This package contains an utility to establish conversation with other \\\
  62. PPP servers (via a modem).
  63. endef
  64. define Package/pppdump
  65. $(call Package/ppp/Default)
  66. DEPENDS:=ppp
  67. TITLE:=Read PPP record file
  68. DESCRIPTION:=\
  69. This package contains an utility to read PPP record file.
  70. endef
  71. define Package/pppstats
  72. $(call Package/ppp/Default)
  73. DEPENDS:=ppp
  74. TITLE:=Report PPP statistics
  75. DESCRIPTION:=\
  76. This package contains an utility to report PPP statistics.
  77. endef
  78. define Build/Configure
  79. $(call Build/Configure/Default,, \
  80. UNAME_S="Linux" \
  81. UNAME_R="$(LINUX_VERSION)" \
  82. UNAME_M="$(ARCH)" \
  83. )
  84. endef
  85. define Build/Compile
  86. rm -rf $(PKG_INSTALL_DIR)
  87. mkdir -p $(PKG_INSTALL_DIR)/usr
  88. $(MAKE) -C $(PKG_BUILD_DIR) \
  89. $(TARGET_CONFIGURE_OPTS) \
  90. COPTS="$(TARGET_CFLAGS)" \
  91. PRECOMPILED_FILTER=1 \
  92. STAGING_DIR="$(STAGING_DIR)" \
  93. DESTDIR="$(PKG_INSTALL_DIR)/usr" \
  94. all install
  95. endef
  96. define Package/ppp/install
  97. $(INSTALL_DIR) $(1)/usr/lib/pppd/$(PKG_VERSION)
  98. $(INSTALL_DIR) $(1)/usr/sbin
  99. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/pppd $(1)/usr/sbin/
  100. $(INSTALL_DIR) $(1)/lib/network
  101. $(INSTALL_BIN) ./files/ppp.sh $(1)/lib/network/
  102. $(INSTALL_DIR) $(1)/etc/ppp
  103. $(INSTALL_CONF) ./files/etc/ppp/chap-secrets $(1)/etc/ppp/
  104. $(INSTALL_DATA) ./files/etc/ppp/filter $(1)/etc/ppp/
  105. $(INSTALL_BIN) ./files/etc/ppp/ip-up $(1)/etc/ppp/
  106. $(INSTALL_DIR) $(1)/etc/ppp/ip-up.d
  107. $(INSTALL_BIN) ./files/etc/ppp/ip-down $(1)/etc/ppp/
  108. $(INSTALL_DIR) $(1)/etc/ppp/ip-down.d
  109. $(INSTALL_DATA) ./files/etc/ppp/options $(1)/etc/ppp/
  110. ln -sf /tmp/resolv.conf.auto $(1)/etc/ppp/resolv.conf
  111. endef
  112. define Package/ppp-mod-pppoa/install
  113. $(INSTALL_DIR) $(1)/usr/lib/pppd/$(PKG_VERSION)
  114. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/pppd/$(PKG_VERSION)/pppoatm.so \
  115. $(1)/usr/lib/pppd/$(PKG_VERSION)/
  116. $(INSTALL_DIR) $(1)/lib/network
  117. $(INSTALL_BIN) ./files/pppoa.sh $(1)/lib/network/
  118. endef
  119. define Package/ppp-mod-pppoe/install
  120. $(INSTALL_DIR) $(1)/usr/lib/pppd/$(PKG_VERSION)
  121. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/pppd/$(PKG_VERSION)/rp-pppoe.so \
  122. $(1)/usr/lib/pppd/$(PKG_VERSION)/
  123. $(INSTALL_DIR) $(1)/lib/network
  124. $(INSTALL_BIN) ./files/pppoe.sh $(1)/lib/network/
  125. endef
  126. define Package/ppp-mod-radius/install
  127. $(INSTALL_DIR) $(1)/usr/lib/pppd/$(PKG_VERSION)
  128. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/pppd/$(PKG_VERSION)/radius.so \
  129. $(1)/usr/lib/pppd/$(PKG_VERSION)/
  130. $(INSTALL_DIR) $(1)/etc/ppp
  131. $(INSTALL_DATA) ./files/etc/ppp/radius.conf $(1)/etc/ppp/
  132. $(INSTALL_DIR) $(1)/etc/ppp/radius
  133. $(INSTALL_DATA) ./files/etc/ppp/radius/dictionary* \
  134. $(1)/etc/ppp/radius/
  135. $(INSTALL_CONF) ./files/etc/ppp/radius/servers \
  136. $(1)/etc/ppp/radius/
  137. endef
  138. define Package/chat/install
  139. $(INSTALL_DIR) $(1)/usr/sbin
  140. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/chat $(1)/usr/sbin/
  141. endef
  142. define Package/pppdump/install
  143. $(INSTALL_DIR) $(1)/usr/sbin
  144. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/pppdump $(1)/usr/sbin/
  145. endef
  146. define Package/pppstats/install
  147. $(INSTALL_DIR) $(1)/usr/sbin
  148. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/pppstats $(1)/usr/sbin/
  149. endef
  150. $(eval $(call BuildPackage,ppp))
  151. $(eval $(call BuildPackage,ppp-mod-pppoa))
  152. $(eval $(call BuildPackage,ppp-mod-pppoe))
  153. $(eval $(call BuildPackage,ppp-mod-radius))
  154. $(eval $(call BuildPackage,chat))
  155. $(eval $(call BuildPackage,pppdump))
  156. $(eval $(call BuildPackage,pppstats))