Added dhcp6, an IPv6 implementation of the dhcp server and client
[openwrt.git] / openwrt / 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:=7
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_PPPOA,ppp-mod-pppoa,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
32 $(eval $(call PKG_template,PPP_MOD_PPPOE,ppp-mod-pppoe,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
33 $(eval $(call PKG_template,PPP_MOD_RADIUS,ppp-mod-radius,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
34 $(eval $(call PKG_template,CHAT,chat,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
35 $(eval $(call PKG_template,PPPDUMP,pppdump,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
36 $(eval $(call PKG_template,PPPSTATS,pppstats,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
37
38 $(eval $(call PKG_mod_template,PPP_MOD_PPPOA,pppoatm))
39 $(eval $(call PKG_mod_template,PPP_MOD_PPPOE,rp-pppoe))
40 $(eval $(call PKG_mod_template,PPP_MOD_RADIUS,radius))
41
42 $(PKG_BUILD_DIR)/.configured:
43 (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status} ; \
44 $(TARGET_CONFIGURE_OPTS) \
45 CFLAGS="$(TARGET_CFLAGS)" \
46 ./configure \
47 --target=$(GNU_TARGET_NAME) \
48 --host=$(GNU_TARGET_NAME) \
49 --build=$(GNU_HOST_NAME) \
50 --program-prefix="" \
51 --program-suffix="" \
52 --prefix=/usr \
53 --exec-prefix=/usr \
54 --bindir=/usr/bin \
55 --datadir=/usr/share \
56 --includedir=/usr/include \
57 --infodir=/usr/share/info \
58 --libdir=/usr/lib \
59 --libexecdir=/usr/lib \
60 --localstatedir=/var \
61 --mandir=/usr/share/man \
62 --sbindir=/usr/sbin \
63 --sysconfdir=/etc \
64 $(DISABLE_LARGEFILE) \
65 $(DISABLE_NLS) \
66 )
67 touch $@
68
69 $(PKG_BUILD_DIR)/.built:
70 rm -rf $(PKG_INSTALL_DIR)
71 mkdir -p $(PKG_INSTALL_DIR)/usr
72 $(MAKE) -C $(PKG_BUILD_DIR) \
73 CC=$(TARGET_CC) \
74 COPTS="$(TARGET_CFLAGS)" \
75 HAVE_INET6="1" \
76 DESTDIR="$(PKG_INSTALL_DIR)/usr" \
77 all install
78 touch $@
79
80 $(IPKG_PPP):
81 install -d -m0755 $(IDIR_PPP)/etc/ppp
82 ln -sf /tmp/resolv.conf $(IDIR_PPP)/etc/ppp/resolv.conf
83 install -m0600 ./files/etc/ppp/chap-secrets $(IDIR_PPP)/etc/ppp/
84 install -m0644 ./files/etc/ppp/options $(IDIR_PPP)/etc/ppp/
85 install -m0755 ./files/etc/ppp/ip-up $(IDIR_PPP)/etc/ppp/
86 install -m0755 ./files/etc/ppp/ip-down $(IDIR_PPP)/etc/ppp/
87 install -d -m0755 $(IDIR_PPP)/etc/ppp/peers
88 install -m0644 ./files/etc/ppp/peers/sample $(IDIR_PPP)/etc/ppp/peers/
89 install -d -m0755 $(IDIR_PPP)/usr/sbin
90 install -m0755 $(PKG_INSTALL_DIR)/usr/sbin/pppd $(IDIR_PPP)/usr/sbin/
91 install -d -m0755 $(IDIR_PPP)/usr/lib/pppd
92 $(RSTRIP) $(IDIR_PPP)
93 $(IPKG_BUILD) $(IDIR_PPP) $(PACKAGE_DIR)
94
95 $(IDIR_PPP_MOD_PPPOA)/sbin/ifup.pppoa:
96 install -d -m0755 $(IDIR_PPP_MOD_PPPOA)/sbin
97 install -m0755 ./files/ifup.pppoa $(IDIR_PPP_MOD_PPPOA)/sbin/
98
99 $(IPKG_PPP_MOD_PPPOA): $(IDIR_PPP_MOD_PPPOA)/sbin/ifup.pppoa
100
101 $(IDIR_PPP_MOD_PPPOE)/sbin/ifup.pppoe:
102 install -d -m0755 $(IDIR_PPP_MOD_PPPOE)/sbin
103 install -m0755 ./files/ifup.pppoe $(IDIR_PPP_MOD_PPPOE)/sbin/
104
105 $(IPKG_PPP_MOD_PPPOE): $(IDIR_PPP_MOD_PPPOE)/sbin/ifup.pppoe
106
107 $(IDIR_PPP_MOD_RADIUS)/etc/ppp/radius.conf:
108
109 install -d -m0755 $(IDIR_PPP_MOD_RADIUS)/etc/ppp
110 install -m644 ./files/etc/ppp/radius.conf $(IDIR_PPP_MOD_RADIUS)/etc/ppp/
111 install -d -m0755 $(IDIR_PPP_MOD_RADIUS)/etc/ppp/radius
112 install -m644 ./files/etc/ppp/radius/dictionary* \
113 $(IDIR_PPP_MOD_RADIUS)/etc/ppp/radius/
114 install -m600 ./files/etc/ppp/radius/servers \
115 $(IDIR_PPP_MOD_RADIUS)/etc/ppp/radius/
116
117 $(IPKG_PPP_MOD_RADIUS): $(IDIR_PPP_MOD_RADIUS)/etc/ppp/radius.conf
118
119 $(IPKG_CHAT):
120 install -d -m0755 $(IDIR_CHAT)/usr/sbin
121 cp -fpR $(PKG_INSTALL_DIR)/usr/sbin/chat $(IDIR_CHAT)/usr/sbin/
122 $(RSTRIP) $(IDIR_CHAT)
123 $(IPKG_BUILD) $(IDIR_CHAT) $(PACKAGE_DIR)
124
125 $(IPKG_PPPDUMP):
126 install -d -m0755 $(IDIR_PPPDUMP)/usr/sbin
127 cp -fpR $(PKG_INSTALL_DIR)/usr/sbin/pppdump $(IDIR_PPPDUMP)/usr/sbin/
128 $(RSTRIP) $(IDIR_PPPDUMP)
129 $(IPKG_BUILD) $(IDIR_PPPDUMP) $(PACKAGE_DIR)
130
131 $(IPKG_PPPSTATS): $(IPKG_PPP)
132 install -d -m0755 $(IDIR_PPPSTATS)/usr/sbin
133 cp -fpR $(PKG_INSTALL_DIR)/usr/sbin/pppstats $(IDIR_PPPSTATS)/usr/sbin/
134 $(RSTRIP) $(IDIR_PPPSTATS)
135 $(IPKG_BUILD) $(IDIR_PPPSTATS) $(PACKAGE_DIR)
136
This page took 0.050506 seconds and 5 git commands to generate.