Add some mirrors
[openwrt.git] / package / ppp / Makefile
1 # $Id$
2
3 include $(TOPDIR)/rules.mk
4
5 PKG_NAME:=ppp
6 PKG_VERSION:=2.4.3
7 PKG_RELEASE:=4
8 PKG_MD5SUM:=848f6c3cafeb6074ffeb293c3af79b7c
9
10 PKG_SOURCE_URL:=ftp://ftp.samba.org/pub/ppp/
11 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
12 PKG_CAT:=zcat
13
14 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
15 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
16
17 include $(TOPDIR)/package/rules.mk
18
19 define PKG_mod_template
20
21 $$(IPKG_$(1)):
22 install -d -m0755 $$(IDIR_$(1))/usr/lib/pppd/$(PKG_VERSION)
23 install -m0755 $(PKG_INSTALL_DIR)/usr/lib/pppd/$(PKG_VERSION)/$(2).so \
24 $$(IDIR_$(1))/usr/lib/pppd/$(PKG_VERSION)/
25 $(RSTRIP) $$(IDIR_$(1))
26 $(IPKG_BUILD) $$(IDIR_$(1)) $(PACKAGE_DIR)
27
28 endef
29
30 $(eval $(call PKG_template,PPP,ppp,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
31 $(eval $(call PKG_template,PPP_MOD_PPPOE,ppp-mod-pppoe,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
32 $(eval $(call PKG_template,PPP_MOD_RADIUS,ppp-mod-radius,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
33 $(eval $(call PKG_template,CHAT,chat,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
34 $(eval $(call PKG_template,PPPDUMP,pppdump,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
35 $(eval $(call PKG_template,PPPSTATS,pppstats,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
36
37 $(eval $(call PKG_mod_template,PPP_MOD_PPPOE,rp-pppoe))
38 $(eval $(call PKG_mod_template,PPP_MOD_RADIUS,radius))
39
40 $(PKG_BUILD_DIR)/.configured:
41 (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status} ; \
42 $(TARGET_CONFIGURE_OPTS) \
43 CFLAGS="$(TARGET_CFLAGS)" \
44 ./configure \
45 --target=$(GNU_TARGET_NAME) \
46 --host=$(GNU_TARGET_NAME) \
47 --build=$(GNU_HOST_NAME) \
48 --program-prefix="" \
49 --program-suffix="" \
50 --prefix=/usr \
51 --exec-prefix=/usr \
52 --bindir=/usr/bin \
53 --datadir=/usr/share \
54 --includedir=/usr/include \
55 --infodir=/usr/share/info \
56 --libdir=/usr/lib \
57 --libexecdir=/usr/lib \
58 --localstatedir=/var \
59 --mandir=/usr/share/man \
60 --sbindir=/usr/sbin \
61 --sysconfdir=/etc \
62 $(DISABLE_LARGEFILE) \
63 $(DISABLE_NLS) \
64 )
65 touch $@
66
67 $(PKG_BUILD_DIR)/.built:
68 rm -rf $(PKG_INSTALL_DIR)
69 mkdir -p $(PKG_INSTALL_DIR)/usr
70 $(MAKE) -C $(PKG_BUILD_DIR) \
71 CC=$(TARGET_CC) \
72 COPTS="$(TARGET_CFLAGS)" \
73 DESTDIR="$(PKG_INSTALL_DIR)/usr" \
74 all install
75 touch $@
76
77 $(IPKG_PPP):
78 install -d -m0755 $(IDIR_PPP)/etc/ppp
79 ln -sf /tmp/resolv.conf $(IDIR_PPP)/etc/ppp/resolv.conf
80 install -m0600 ./files/etc/ppp/chap-secrets $(IDIR_PPP)/etc/ppp/
81 install -m0644 ./files/etc/ppp/options $(IDIR_PPP)/etc/ppp/
82 install -d -m0755 $(IDIR_PPP)/etc/ppp/peers
83 install -m0644 ./files/etc/ppp/peers/sample $(IDIR_PPP)/etc/ppp/peers/
84 install -d -m0755 $(IDIR_PPP)/usr/sbin
85 install -m0755 $(PKG_INSTALL_DIR)/usr/sbin/pppd $(IDIR_PPP)/usr/sbin/
86 install -d -m0755 $(IDIR_PPP)/usr/lib/pppd
87 $(RSTRIP) $(IDIR_PPP)
88 $(IPKG_BUILD) $(IDIR_PPP) $(PACKAGE_DIR)
89
90 $(IDIR_PPP_MOD_PPPOE)/etc/init.d/S50pppoe:
91 install -d -m0755 $(IDIR_PPP_MOD_PPPOE)/etc/init.d
92 install -m0755 ./files/pppoe.init $(IDIR_PPP_MOD_PPPOE)/etc/init.d/S50pppoe
93
94 $(IPKG_PPP_MOD_PPPOE): $(IDIR_PPP_MOD_PPPOE)/etc/init.d/S50pppoe
95
96 $(IDIR_PPP_MOD_RADIUS)/etc/ppp/radius.conf:
97
98 install -d -m0755 $(IDIR_PPP_MOD_RADIUS)/etc/ppp
99 install -m644 ./files/etc/ppp/radius.conf $(IDIR_PPP_MOD_RADIUS)/etc/ppp/
100 install -d -m0755 $(IDIR_PPP_MOD_RADIUS)/etc/ppp/radius
101 install -m644 ./files/etc/ppp/radius/dictionary* \
102 $(IDIR_PPP_MOD_RADIUS)/etc/ppp/radius/
103 install -m600 ./files/etc/ppp/radius/servers \
104 $(IDIR_PPP_MOD_RADIUS)/etc/ppp/radius/
105
106 $(IPKG_PPP_MOD_RADIUS): $(IDIR_PPP_MOD_RADIUS)/etc/ppp/radius.conf
107
108 $(IPKG_CHAT):
109 install -d -m0755 $(IDIR_CHAT)/usr/sbin
110 cp -fpR $(PKG_INSTALL_DIR)/usr/sbin/chat $(IDIR_CHAT)/usr/sbin/
111 $(RSTRIP) $(IDIR_CHAT)
112 $(IPKG_BUILD) $(IDIR_CHAT) $(PACKAGE_DIR)
113
114 $(IPKG_PPPDUMP):
115 install -d -m0755 $(IDIR_PPPDUMP)/usr/sbin
116 cp -fpR $(PKG_INSTALL_DIR)/usr/sbin/pppdump $(IDIR_PPPDUMP)/usr/sbin/
117 $(RSTRIP) $(IDIR_PPPDUMP)
118 $(IPKG_BUILD) $(IDIR_PPPDUMP) $(PACKAGE_DIR)
119
120 $(IPKG_PPPSTATS): $(IPKG_PPP)
121 install -d -m0755 $(IDIR_PPPSTATS)/usr/sbin
122 cp -fpR $(PKG_INSTALL_DIR)/usr/sbin/pppstats $(IDIR_PPPSTATS)/usr/sbin/
123 $(RSTRIP) $(IDIR_PPPSTATS)
124 $(IPKG_BUILD) $(IDIR_PPPSTATS) $(PACKAGE_DIR)
125
This page took 0.045605 seconds and 5 git commands to generate.