Magellan Linux

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

Parent Directory Parent Directory | Revision Log Revision Log


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