]> git.ipfire.org Git - people/ms/ipfire-3.x.git/blame - lfs/ppp
Added a lot of patches to lfs/ppp.
[people/ms/ipfire-3.x.git] / lfs / ppp
CommitLineData
cd1a2927 1###############################################################################
cd1a2927 2# #
70df8302
MT
3# IPFire.org - A linux based firewall #
4# Copyright (C) 2007 Michael Tremer & Christian Schmidt #
5# #
6# This program is free software: you can redistribute it and/or modify #
cd1a2927 7# it under the terms of the GNU General Public License as published by #
70df8302 8# the Free Software Foundation, either version 3 of the License, or #
cd1a2927
MT
9# (at your option) any later version. #
10# #
70df8302 11# This program is distributed in the hope that it will be useful, #
cd1a2927
MT
12# but WITHOUT ANY WARRANTY; without even the implied warranty of #
13# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
14# GNU General Public License for more details. #
15# #
16# You should have received a copy of the GNU General Public License #
70df8302 17# along with this program. If not, see <http://www.gnu.org/licenses/>. #
cd1a2927 18# #
cd1a2927
MT
19###############################################################################
20
21###############################################################################
22# Definitions
23###############################################################################
24
25include Config
26
246556fe 27PKG_NAME = ppp
8985a698 28PKG_VER = 2.4.4
cd1a2927 29
8985a698 30THISAPP = $(PKG_NAME)-$(PKG_VER)
cd1a2927 31DL_FILE = $(THISAPP).tar.gz
cd1a2927 32DIR_APP = $(DIR_SRC)/$(THISAPP)
246556fe 33
ff1554b5 34BUILD_DEPS =
47815f74
MT
35DEPS = libpcap linux-atm
36
6679675b 37OBJECT = $(DIR_INFO)/$(STAGE_ORDER)_$(STAGE)/$(THISAPP)
cd1a2927 38
b5848030
MT
39CORE = yes
40EXTRA = no
41DEBUG = no
42
cd1a2927
MT
43###############################################################################
44# Top-level Rules
45###############################################################################
46
51b9a0cf
SS
47objects = $(DL_FILE) \
48 $(THISAPP)-libutil.patch \
49 $(THISAPP)-pie.patch \
50 $(THISAPP)-fix.patch \
51 $(THISAPP)-ipv6-accept-remote.patch \
52 $(THISAPP)-pppoatm-mtu.patch \
53 $(THISAPP)-local.patch \
54 $(THISAPP)-dontwriteetc.patch \
55 $(THISAPP)-closelog.patch \
56 $(THISAPP)-response_len.patch \
57 $(THISAPP)-new_speeds.patch \
58 $(THISAPP)-bogus_dns_addr.patch
cd1a2927 59
fbb99f93
MT
60download: $(objects)
61
4af963a9
MT
62info:
63 $(DO_PKG_INFO)
64
6679675b 65install: $(OBJECT)
cd1a2927 66
fbb99f93
MT
67package:
68 @$(DO_PACKAGE)
cd1a2927 69
fbb99f93 70$(objects):
cd1a2927
MT
71 @$(LOAD)
72
cd1a2927
MT
73###############################################################################
74# Installation Details
75###############################################################################
76
e6d3e435 77$(OBJECT): $(objects)
cd1a2927 78 @$(PREBUILD)
e6d3e435 79 @rm -rf $(DIR_APP) && cd $(DIR_SRC) && $(EXTRACTOR) $(DIR_DL)/$(DL_FILE)
51b9a0cf
SS
80
81 # This patch removes logwtmp in libutil, because glibc also provides that.
82 cd $(DIR_APP) && patch -Np1 -i $(DIR_PATCHES)/$(THISAPP)-libutil.patch
83
84 # This patch adds pie chat to ppp.
85 cd $(DIR_APP) && patch -Np1 -i $(DIR_PATCHES)/$(THISAPP)-pie.patch
86
87 # Add ipv6cp-accept-remote to allow DSL to work with demand dial and native IPv6
88 cd $(DIR_APP) && patch -Np1 -i $(DIR_PATCHES)/$(THISAPP)-ipv6-accept-remote.patch
89
90 # This patch removes local from the path of ppp and all used binaries.
91 cd $(DIR_APP) && patch -Np1 -i $(DIR_PATCHES)/$(THISAPP)-local.patch
92
93 # Some more patches, but the name of each should tell what it's doing.
94 cd $(DIR_APP) && patch -Np1 -i $(DIR_PATCHES)/$(THISAPP)-fix.patch
95 cd $(DIR_APP) && patch -Np1 -i $(DIR_PATCHES)/$(THISAPP)-dontwriteetc.patch
96 cd $(DIR_APP) && patch -Np1 -i $(DIR_PATCHES)/$(THISAPP)-pppoatm-mtu.patch
97 cd $(DIR_APP) && patch -Np1 -i $(DIR_PATCHES)/$(THISAPP)-closelog.patch
98 cd $(DIR_APP) && patch -Np1 -i $(DIR_PATCHES)/$(THISAPP)-bogus_dns_addr.patch
99 cd $(DIR_APP) && patch -Np1 -i $(DIR_PATCHES)/$(THISAPP)-new_speeds.patch
100 cd $(DIR_APP) && patch -Np1 -i $(DIR_PATCHES)/$(THISAPP)-response_len.patch
101
102 sed -e "s/^LIBS =/LIBS=-lutil/" -i $(DIR_APP)/pppd/Makefile.linux
103
d330f980
MT
104 cd $(DIR_APP) && \
105 ./configure \
106 $(CONFIGURE_ARCH) \
107 --prefix=/usr
51b9a0cf 108
158dc63f 109 cd $(DIR_APP) && make CC="gcc $(CFLAGS)" HAVE_INET6=yes $(PARALLELISMFLAGS)
cd1a2927 110 cd $(DIR_APP) && make install
5c259072 111 install -d /etc/ppp/peers
246556fe 112 for i in $(DIR_CONFIG)/$(PKG_NAME)/* ; do \
cd1a2927
MT
113 if [ -f $$i ]; then \
114 sed 's%CONFIG_ROOT%$(CONFIG_ROOT)%g' $$i > /etc/ppp/`basename $$i`; \
115 fi; \
116 done
117 chmod 755 /etc/ppp/{dialer,ip-up,ip-down}
118 ln -sf $(CONFIG_ROOT)/ppp/secrets /etc/ppp/pap-secrets
119 ln -sf $(CONFIG_ROOT)/ppp/secrets /etc/ppp/chap-secrets
51b9a0cf 120 cp -vf $(DIR_CONFIG)/pam.d/$(PKG_NAME) /etc/pam.d/
cd1a2927
MT
121 @rm -rf $(DIR_APP)
122 @$(POSTBUILD)