Magellan Linux

Contents of /branches/magellan-next/core/ppp/ppp-2.4.5-r5.smage2

Parent Directory Parent Directory | Revision Log Revision Log


Revision 9267 - (show annotations) (download)
Thu Nov 24 09:58:59 2011 UTC (12 years, 6 months ago) by niro
File size: 5390 byte(s)
-no sysvinit support anymore, wre using networkmanager, and moved /etc/modules.d -> /etc/modprobe.d
1 # $Id$
2
3 PNAME="ppp"
4 PVER="2.4.5"
5 PBUILD="r5"
6
7 PCATEGORIE="net-dialup"
8
9 DESCRIPTION="PPP (Point-to-Point Protocol) client and utilities."
10 HOMEPAGE="http://ppp.samba.org/"
11
12 DEPEND=">= sys-libs/libcap-2
13 >= sys-libs/pam-1.1"
14
15 SDEPEND=">= sys-apps/sed-4"
16
17 SRCFILE="${PNAME}-${PVER}.tar.gz"
18 SRCDIR="${BUILDDIR}/${PNAME}-${PVER}"
19
20 sminclude mtools
21
22 IPUP_REV="1.2"
23 IPUP_DNS_REV="1.2"
24 IPDOWN_REV="1.2"
25 IPDOWN_DNS_REV="1.2"
26
27 SRC_URI=(
28 ftp://ftp.samba.org/pub/${PNAME}/${SRCFILE}
29 mirror://${PNAME}/${SRCFILE}
30 mirror://${PNAME}/${PNAME}-${PVER}-make-vars.patch
31 mirror://${PNAME}/${PNAME}-${PVER}-mpls.patch
32 mirror://${PNAME}/${PNAME}-2.4.4-killaddr-smarter.patch
33 mirror://${PNAME}/${PNAME}-2.4.4-wait-children.patch
34 mirror://${PNAME}/${PNAME}-2.4.4-defaultgateway.patch
35 mirror://${PNAME}/${PNAME}-2.4.4-linkpidfile.patch
36 mirror://${PNAME}/${PNAME}-2.4.4-qa-fixes.patch
37 mirror://${PNAME}/${PNAME}-${PVER}-kill-pg-reworked.patch
38 mirror://${PNAME}/${PNAME}-2.4.4-auth-fail.patch
39 mirror://${PNAME}/${PNAME}-2.4.4-defaultmetric.patch
40 mirror://${PNAME}/${PNAME}-${PVER}-dev-ppp.patch
41 mirror://${PNAME}/${PNAME}-2.4.4-gtk2.patch
42 mirror://${PNAME}/${PNAME}-2.4.4-passwordfd-read-early.patch
43 mirror://${PNAME}/${PNAME}-${PVER}-pppd-usepeerwins.patch
44 mirror://${PNAME}/${PNAME}-${PVER}-connect-errors.patch
45 mirror://${PNAME}/ip-up-${IPUP_REV}
46 mirror://${PNAME}/ip-down-${IPDOWN_REV}
47 mirror://${PNAME}/ip-upd-30-wins.sh
48 mirror://${PNAME}/ip-upd-40-dns.sh-${IPUP_DNS_REV}
49 mirror://${PNAME}/ip-upd-50-initd.sh
50 mirror://${PNAME}/ip-downd-30-wins.sh
51 mirror://${PNAME}/ip-downd-40-dns.sh-${IPDOWN_DNS_REV}
52 mirror://${PNAME}/ip-downd-50-initd.sh
53 mirror://${PNAME}/modules.ppp
54 mirror://${PNAME}/provider.example
55 mirror://${PNAME}/ppp.pam-systemauth
56 )
57
58 UP2DATE="updatecmd ${HOMEPAGE} | grep latest | sed 's/.* \(.*\), .*/\1/'"
59
60 src_prepare()
61 {
62 munpack ${SRCFILE} || die
63 cd ${SRCDIR}
64
65 # several patches from gentoo
66 mpatch ${PNAME}-${PVER}-make-vars.patch || die
67 mpatch ${PNAME}-${PVER}-mpls.patch || die
68 mpatch ${PNAME}-2.4.4-killaddr-smarter.patch || die
69 mpatch ${PNAME}-2.4.4-wait-children.patch || die
70 mpatch ${PNAME}-2.4.4-defaultgateway.patch || die
71 mpatch ${PNAME}-2.4.4-linkpidfile.patch || die
72 mpatch ${PNAME}-2.4.4-qa-fixes.patch || die
73 mpatch ${PNAME}-${PVER}-kill-pg-reworked.patch || die
74 mpatch ${PNAME}-2.4.4-auth-fail.patch || die
75 mpatch ${PNAME}-2.4.4-defaultmetric.patch || die
76 mpatch ${PNAME}-${PVER}-dev-ppp.patch || die
77 mpatch ${PNAME}-2.4.4-gtk2.patch || die
78 mpatch ${PNAME}-2.4.4-passwordfd-read-early.patch || die
79 mpatch ${PNAME}-${PVER}-pppd-usepeerwins.patch || die
80 mpatch ${PNAME}-${PVER}-connect-errors.patch || die
81
82 # enable ipv6 support
83 sed -i "s:^#HAVE_INET6:HAVE_INET6:" pppd/Makefile.linux || die
84
85 # enable pam support
86 sed -i "s:^#USE_PAM=y:USE_PAM=y:" pppd/Makefile.linux || die
87
88 # enable Microsoft proprietary Callback Control Protocol
89 sed -i "s:^#CBCP=y:CBCP=y:" pppd/Makefile.linux || die
90
91 # fix libdir on 64bit arches
92 sed -i "s:/lib/pppd:/$(mlibdir)/pppd:" pppd/pathnames.h || die
93 sed -i "s:/lib/pppd:/$(mlibdir)/pppd:" pppd/pppd.8 || die
94 sed -i "s:^\(LIBDIR =\).*:\1 \$(DESTDIR)/$(mlibdir)/pppd/\$(VERSION):" \
95 pppd/plugins/Makefile.linux || die
96 sed -i "s:^\(LIBDIR =\).*:\1 \$(DESTDIR)/$(mlibdir)/pppd/\$(VERSION):" \
97 pppd/plugins/*/Makefile.linux || die
98 }
99
100 src_compile()
101 {
102 cd ${SRCDIR}
103 mconfigure || die
104 mmake || die
105
106 # compile pppgetpass too
107 mmake -C contrib/pppgetpass pppgetpass.vt || die
108 }
109
110 src_install()
111 {
112 cd ${SRCDIR}
113
114 minstalldir /etc/ppp || die
115
116 mmake INSTROOT=${BINDIR} install || die
117 mmake INSTROOT=${BINDIR} install-etcppp || die
118
119 # fix permissions
120 mchmod u+s-w /usr/sbin/pppd || die
121
122 # pam related stuff
123 minstallpam ppp.pam-systemauth ppp || die
124
125 # install module aliases
126 minstalldir /etc/modprobe.d || die
127 minstallfile -s modules.ppp /etc/modprobe.d/ppp.conf || die
128
129 # helper scripts
130 minstallexec -s ip-up-${IPUP_REV} /etc/ppp/ip-up || die
131 minstallexec -s ip-down-${IPDOWN_REV} /etc/ppp/ip-down || die
132
133 # ip-up helpers
134 minstalldir /etc/ppp/ip-up.d || die
135 minstallexec -s ip-upd-30-wins.sh /etc/ppp/ip-up.d/30-wins.sh || die
136 minstallexec -s ip-upd-40-dns.sh-${IPUP_DNS_REV} /etc/ppp/ip-up.d/40-dns.sh || die
137 minstallexec -s ip-upd-50-initd.sh /etc/ppp/ip-up.d/50-initd.sh || die
138
139 # ip-down helpers
140 minstalldir /etc/ppp/ip-down.d || die
141 minstallexec -s ip-downd-30-wins.sh /etc/ppp/ip-down.d/30-wins.sh || die
142 minstallexec -s ip-downd-40-dns.sh-${IPDOWN_DNS_REV} /etc/ppp/ip-down.d/40-dns.sh || die
143 minstallexec -s ip-downd-50-initd.sh /etc/ppp/ip-down.d/50-initd.sh || die
144
145
146 # install a provider example
147 mkeepdir /etc/ppp/peers || die
148 minstallfile -s provider.example /etc/ppp/peers || die
149
150 # some nice scripts and progs
151 minstallexec scripts/pon /usr/sbin || die
152 minstallexec scripts/poff /usr/sbin || die
153 minstallexec scripts/plog /usr/sbin || die
154 minstallexec contrib/pppgetpass/pppgetpass.vt /usr/sbin/pppgetpass || die
155
156 # missing man pages
157 minstallman scripts/pon.1 || die
158 minstallman contrib/pppgetpass/pppgetpass.8 || die
159
160 # more example scripts
161 minstalldir /usr/share/doc/${PNAME}-${PVER} || die
162 cp -R scripts ${BINDIR}/usr/share/doc/${PNAME}-${PVER} || die
163
164 minstalldocs Changes* FAQ PLUGINS README* SETUP || die
165 }
166
167 postinstall()
168 {
169 # get rid of /etc/modules.d/ppp
170 if [[ -f ${MROOT}/etc/modules.d/ppp ]]
171 then
172 rm ${MROOT}/etc/modules.d/ppp || die
173 fi
174 }