source: freewrt/package/ppp/Makefile@ 6fc4520e

freewrt_1_0 freewrt_2_0
Last change on this file since 6fc4520e was c8b93bd, checked in by Waldemar Brodkorb <wbx@…>, 19 years ago

major package Makefile cleanup. remove mostly-clean, add licence header, always use RSTRIP varibale for stripping, rename some init scripts, indent

git-svn-id: svn://www.freewrt.org/trunk/freewrt@600 afb5a338-a214-0410-bd46-81f09a774fd1

  • Property mode set to 100644
File size: 4.8 KB
Line 
1# $FreeWRT$
2#-
3# This file is part of the FreeWRT project. FreeWRT is copyrighted
4# material, please see the LICENCE file in the top-level directory
5# or at http://www.freewrt.org/licence for details.
6
7include $(TOPDIR)/rules.mk
8
9PKG_NAME:= ppp
10PKG_VERSION:= 2.4.3
11PKG_RELEASE:= 7
12PKG_MD5SUM:= 848f6c3cafeb6074ffeb293c3af79b7c
13
14PKG_SOURCE_URL:= ftp://ftp.samba.org/pub/ppp/
15PKG_SOURCE:= $(PKG_NAME)-$(PKG_VERSION).tar.gz
16
17include $(TOPDIR)/mk/package.mk
18
19define PKG_mod_template
20
21$$(IPKG_$(1)):
22 install -d -m0755 $$(IDIR_$(1))/usr/lib/pppd/$(PKG_VERSION)
23 install -m0755 $(WRKINST)/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
28endef
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
42PKG_DEPEND:="kmod-ppp"
43ifeq ($(FWRT_PACKAGE_PPP_WITH_FILTER),y)
44ENABLE_FILTER:="PRECOMPILED_FILTER=1"
45endif
46
47$(WRKBUILD)/.configured:
48 (cd $(WRKBUILD); rm -rf config.{cache,status} ; \
49 $(TARGET_CONFIGURE_OPTS) \
50 CFLAGS="$(TARGET_CFLAGS)" \
51 ./configure \
52 --target=$(GNU_TARGET_NAME) \
53 --host=$(GNU_TARGET_NAME) \
54 --build=$(GNU_HOST_NAME) \
55 --program-prefix="" \
56 --program-suffix="" \
57 --prefix=/usr \
58 --exec-prefix=/usr \
59 --bindir=/usr/bin \
60 --datadir=/usr/share \
61 --includedir=/usr/include \
62 --infodir=/usr/share/info \
63 --libdir=/usr/lib \
64 --libexecdir=/usr/lib \
65 --localstatedir=/var \
66 --mandir=/usr/share/man \
67 --sbindir=/usr/sbin \
68 --sysconfdir=/etc \
69 --enable-largefile \
70 --disable-nls \
71 )
72 touch $@
73
74$(WRKBUILD)/.built:
75 rm -rf $(WRKINST)
76 mkdir -p $(WRKINST)/usr
77 $(MAKE) -C $(WRKBUILD) \
78 CC=$(TARGET_CC) \
79 COPTS="$(TARGET_CFLAGS)" \
80 HAVE_INET6="1" \
81 $(ENABLE_FILTER) \
82 STAGING_DIR=$(STAGING_DIR) \
83 DESTDIR="$(WRKINST)/usr" \
84 TARGET_AR='$(TARGET_CROSS)ar' \
85 all install
86 touch $@
87
88ifeq ($(FWRT_PACKAGE_PPP_WITH_FILTER),y)
89INSTALL_FILTER=install -m0644 ./files/etc/ppp/filter $(IDIR_PPP)/etc/ppp/
90endif
91
92$(IPKG_PPP):
93 install -d -m0755 $(IDIR_PPP)/etc/ppp
94 ln -sf /tmp/resolv.conf $(IDIR_PPP)/etc/ppp/resolv.conf
95 install -m0600 ./files/etc/ppp/chap-secrets $(IDIR_PPP)/etc/ppp/
96 install -m0644 ./files/etc/ppp/options $(IDIR_PPP)/etc/ppp/
97 $(INSTALL_FILTER)
98 install -m0755 ./files/etc/ppp/ip-up $(IDIR_PPP)/etc/ppp/
99 install -d -m0755 $(IDIR_PPP)/etc/ppp/ip-up.d
100 install -m0755 ./files/etc/ppp/ip-down $(IDIR_PPP)/etc/ppp/
101 install -d -m0755 $(IDIR_PPP)/etc/ppp/ip-down.d
102 install -d -m0755 $(IDIR_PPP)/usr/sbin
103 install -m0755 $(WRKINST)/usr/sbin/pppd $(IDIR_PPP)/usr/sbin/
104 install -d -m0755 $(IDIR_PPP)/usr/lib/pppd
105 echo "Depends: $(PKG_DEPEND)" >> $(IDIR_PPP)/CONTROL/control
106 $(RSTRIP) $(IDIR_PPP)
107 $(IPKG_BUILD) $(IDIR_PPP) $(PACKAGE_DIR)
108
109$(IDIR_PPP_MOD_PPPOA)/sbin/ifup.pppoa:
110 install -d -m0755 $(IDIR_PPP_MOD_PPPOA)/sbin
111 install -m0755 ./files/ifup.pppoa $(IDIR_PPP_MOD_PPPOA)/sbin/
112
113$(IPKG_PPP_MOD_PPPOA): $(IDIR_PPP_MOD_PPPOA)/sbin/ifup.pppoa
114
115$(IDIR_PPP_MOD_PPPOE)/sbin/ifup.pppoe:
116 install -d -m0755 $(IDIR_PPP_MOD_PPPOE)/sbin
117 install -m0755 ./files/ifup.pppoe $(IDIR_PPP_MOD_PPPOE)/sbin/
118
119$(IPKG_PPP_MOD_PPPOE): $(IDIR_PPP_MOD_PPPOE)/sbin/ifup.pppoe
120
121$(IDIR_PPP_MOD_RADIUS)/etc/ppp/radius.conf:
122 install -d -m0755 $(IDIR_PPP_MOD_RADIUS)/etc/ppp
123 install -m644 ./files/etc/ppp/radius.conf $(IDIR_PPP_MOD_RADIUS)/etc/ppp/
124 install -d -m0755 $(IDIR_PPP_MOD_RADIUS)/etc/ppp/radius
125 install -m644 ./files/etc/ppp/radius/dictionary* \
126 $(IDIR_PPP_MOD_RADIUS)/etc/ppp/radius/
127 install -m600 ./files/etc/ppp/radius/servers \
128 $(IDIR_PPP_MOD_RADIUS)/etc/ppp/radius/
129
130$(IPKG_PPP_MOD_RADIUS): $(IDIR_PPP_MOD_RADIUS)/etc/ppp/radius.conf
131
132$(IPKG_CHAT):
133 install -d -m0755 $(IDIR_CHAT)/usr/sbin
134 $(CP) $(WRKINST)/usr/sbin/chat $(IDIR_CHAT)/usr/sbin/
135 $(RSTRIP) $(IDIR_CHAT)
136 $(IPKG_BUILD) $(IDIR_CHAT) $(PACKAGE_DIR)
137
138$(IPKG_PPPDUMP):
139 install -d -m0755 $(IDIR_PPPDUMP)/usr/sbin
140 $(CP) $(WRKINST)/usr/sbin/pppdump $(IDIR_PPPDUMP)/usr/sbin/
141 $(RSTRIP) $(IDIR_PPPDUMP)
142 $(IPKG_BUILD) $(IDIR_PPPDUMP) $(PACKAGE_DIR)
143
144$(IPKG_PPPSTATS): $(IPKG_PPP)
145 install -d -m0755 $(IDIR_PPPSTATS)/usr/sbin
146 $(CP) $(WRKINST)/usr/sbin/pppstats $(IDIR_PPPSTATS)/usr/sbin/
147 $(RSTRIP) $(IDIR_PPPSTATS)
148 $(IPKG_BUILD) $(IDIR_PPPSTATS) $(PACKAGE_DIR)
149
Note: See TracBrowser for help on using the repository browser.