Makefile 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183
  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_BUILDDEP:=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. DEFAULT:=y
  29. DEPENDS:=+kmod-ppp
  30. TITLE:=PPP daemon
  31. DESCRIPTION:=\
  32. This package contains the PPP (Point-to-Point Protocol) daemon.
  33. MENU:=1
  34. endef
  35. define Package/ppp-mod-pppoa
  36. $(call Package/ppp/Default)
  37. DEPENDS:=ppp +linux-atm +kmod-pppoa
  38. DEFAULT:=y if LINUX_2_4_AR7
  39. TITLE:=PPPoA plugin
  40. DESCRIPTION:=\
  41. This package contains a PPPoA (PPP over ATM) plugin for ppp.
  42. endef
  43. define Package/ppp-mod-pppoe
  44. $(call Package/ppp/Default)
  45. DEFAULT:=y
  46. DEPENDS:=ppp +kmod-pppoe
  47. TITLE:=PPPoE plugin
  48. DESCRIPTION:=\
  49. This package contains a PPPoE (PPP over Ethernet) plugin for ppp.
  50. endef
  51. define Package/ppp-mod-radius
  52. $(call Package/ppp/Default)
  53. DEPENDS:=ppp
  54. TITLE:=RADIUS plugin
  55. DESCRIPTION:=\
  56. This package contains a RADIUS (Remote Authentication Dial-In User \\\
  57. Service) plugin for ppp.
  58. endef
  59. define Package/chat
  60. $(call Package/ppp/Default)
  61. DEPENDS:=ppp
  62. TITLE:=Establish conversation with a modem
  63. DESCRIPTION:=\
  64. This package contains an utility to establish conversation with other \\\
  65. PPP servers (via a modem).
  66. endef
  67. define Package/pppdump
  68. $(call Package/ppp/Default)
  69. DEPENDS:=ppp
  70. TITLE:=Read PPP record file
  71. DESCRIPTION:=\
  72. This package contains an utility to read PPP record file.
  73. endef
  74. define Package/pppstats
  75. $(call Package/ppp/Default)
  76. DEPENDS:=ppp
  77. TITLE:=Report PPP statistics
  78. DESCRIPTION:=\
  79. This package contains an utility to report PPP statistics.
  80. endef
  81. define Build/Configure
  82. $(call Build/Configure/Default,, \
  83. UNAME_S="Linux" \
  84. UNAME_R="$(LINUX_VERSION)" \
  85. UNAME_M="$(ARCH)" \
  86. )
  87. endef
  88. define Build/Compile
  89. rm -rf $(PKG_INSTALL_DIR)
  90. mkdir -p $(PKG_INSTALL_DIR)/usr
  91. $(MAKE) -C $(PKG_BUILD_DIR) \
  92. $(TARGET_CONFIGURE_OPTS) \
  93. COPTS="$(TARGET_CFLAGS)" \
  94. PRECOMPILED_FILTER=1 \
  95. STAGING_DIR="$(STAGING_DIR)" \
  96. DESTDIR="$(PKG_INSTALL_DIR)/usr" \
  97. all install
  98. endef
  99. define Package/ppp/install
  100. install -d -m0755 $(1)/usr/lib/pppd/$(PKG_VERSION)
  101. install -d -m0755 $(1)/usr/sbin
  102. install -m0755 $(PKG_INSTALL_DIR)/usr/sbin/pppd $(1)/usr/sbin/
  103. install -d -m0755 $(1)/lib/network
  104. install -m0755 ./files/ppp.sh $(1)/lib/network/
  105. install -d -m0755 $(1)/etc/ppp
  106. install -m0600 ./files/etc/ppp/chap-secrets $(1)/etc/ppp/
  107. install -m0644 ./files/etc/ppp/filter $(1)/etc/ppp/
  108. install -m0755 ./files/etc/ppp/ip-up $(1)/etc/ppp/
  109. install -d -m0755 $(1)/etc/ppp/ip-up.d
  110. install -m0755 ./files/etc/ppp/ip-down $(1)/etc/ppp/
  111. install -d -m0755 $(1)/etc/ppp/ip-down.d
  112. install -m0644 ./files/etc/ppp/options $(1)/etc/ppp/
  113. ln -sf /tmp/resolv.conf $(1)/etc/ppp/resolv.conf
  114. endef
  115. define Package/ppp-mod-pppoa/install
  116. install -d -m0755 $(1)/usr/lib/pppd/$(PKG_VERSION)
  117. install -m0755 $(PKG_INSTALL_DIR)/usr/lib/pppd/$(PKG_VERSION)/pppoatm.so \
  118. $(1)/usr/lib/pppd/$(PKG_VERSION)/
  119. install -d -m0755 $(1)/lib/network
  120. install -m0755 ./files/pppoa.sh $(1)/lib/network/
  121. endef
  122. define Package/ppp-mod-pppoe/install
  123. install -d -m0755 $(1)/usr/lib/pppd/$(PKG_VERSION)
  124. install -m0755 $(PKG_INSTALL_DIR)/usr/lib/pppd/$(PKG_VERSION)/rp-pppoe.so \
  125. $(1)/usr/lib/pppd/$(PKG_VERSION)/
  126. install -d -m0755 $(1)/lib/network
  127. install -m0755 ./files/pppoe.sh $(1)/lib/network/
  128. endef
  129. define Package/ppp-mod-radius/install
  130. install -d -m0755 $(1)/usr/lib/pppd/$(PKG_VERSION)
  131. install -m0755 $(PKG_INSTALL_DIR)/usr/lib/pppd/$(PKG_VERSION)/radius.so \
  132. $(1)/usr/lib/pppd/$(PKG_VERSION)/
  133. install -d -m0755 $(1)/etc/ppp
  134. install -m0644 ./files/etc/ppp/radius.conf $(1)/etc/ppp/
  135. install -d -m0755 $(1)/etc/ppp/radius
  136. install -m0644 ./files/etc/ppp/radius/dictionary* \
  137. $(1)/etc/ppp/radius/
  138. install -m0600 ./files/etc/ppp/radius/servers \
  139. $(1)/etc/ppp/radius/
  140. endef
  141. define Package/chat/install
  142. install -d -m0755 $(1)/usr/sbin
  143. install -m0755 $(PKG_INSTALL_DIR)/usr/sbin/chat $(1)/usr/sbin/
  144. endef
  145. define Package/pppdump/install
  146. install -d -m0755 $(1)/usr/sbin
  147. install -m0755 $(PKG_INSTALL_DIR)/usr/sbin/pppdump $(1)/usr/sbin/
  148. endef
  149. define Package/pppstats/install
  150. install -d -m0755 $(1)/usr/sbin
  151. install -m0755 $(PKG_INSTALL_DIR)/usr/sbin/pppstats $(1)/usr/sbin/
  152. endef
  153. $(eval $(call BuildPackage,ppp))
  154. $(eval $(call BuildPackage,ppp-mod-pppoa))
  155. $(eval $(call BuildPackage,ppp-mod-pppoe))
  156. $(eval $(call BuildPackage,ppp-mod-radius))
  157. $(eval $(call BuildPackage,chat))
  158. $(eval $(call BuildPackage,pppdump))
  159. $(eval $(call BuildPackage,pppstats))