Magellan Linux

Annotation of /branches/R11-unstable/core/ppp/ppp-2.4.7-r1.smage2

Parent Directory Parent Directory | Revision Log Revision Log


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