Magellan Linux

Contents of /trunk/core/net-tools/net-tools-1.60-r14.smage2

Parent Directory Parent Directory | Revision Log Revision Log


Revision 27263 - (show annotations) (download)
Tue Dec 8 12:07:00 2015 UTC (8 years, 6 months ago) by niro
File size: 2139 byte(s)
-fix build against >=linux-libc-headers-4.3
1 # $Id$
2
3 PNAME="net-tools"
4 PVER="1.60"
5 PBUILD="r14"
6
7 PCAT="sys-apps"
8
9 DESCRIPTION="Standard Linux networking tools."
10 HOMEPAGE="http://sites.inka.de/lina/linux/NetTools/"
11
12 DEPEND=">= virtual/glibc"
13 PROVIDE="virtual/kbd"
14
15 SRCFILE="${PNAME}-${PVER}.tar.bz2"
16 SRCDIR="${BUILDDIR}/${PNAME}-${PVER}"
17
18 SRC_URI=(
19 mirror://${PNAME}/${SRCFILE}
20 mirror://${PNAME}/${PNAME}-${PVER}-2.6-compilefix.patch
21 mirror://${PNAME}/${PNAME}-${PVER}-miitool-gcc33-1.patch
22 mirror://${PNAME}/${PNAME}-${PVER}-gcc34.patch
23 mirror://${PNAME}/${PNAME}-${PVER}-get_name.patch
24 mirror://${PNAME}/${PNAME}-${PVER}-cleanup-list-handling.patch
25 mirror://${PNAME}/${PNAME}-${PVER}-man.patch
26 mirror://${PNAME}/${PNAME}-${PVER}-usr-move.patch
27 )
28
29 #UP2DATE="updatecmd http://developer.berlios.de/projects/net-tools/ | grep 'Latest File'"
30 UP2DATE="updatecmd_berlios ${PNAME}"
31
32 src_prepare()
33 {
34 munpack ${SRCFILE} || die
35 cd ${SRCDIR}
36
37 # fixes compilation with kernel26 headers
38 mpatch ${PNAME}-${PVER}-2.6-compilefix.patch || die
39
40 # fixes compilation with gcc33
41 mpatch ${PNAME}-${PVER}-miitool-gcc33-1.patch || die
42
43 # fixes compilation with gcc34
44 mpatch ${PNAME}-${PVER}-gcc34.patch || die
45
46 # stack smashing attack in if_readlist_proc() from ifconfig
47 mpatch ${PNAME}-${PVER}-get_name.patch || die
48
49 # fixes nameif to segfault on larger mtabs
50 mpatch ${PNAME}-${PVER}-cleanup-list-handling.patch || die
51
52 # fixes some glitches in the man pages
53 mpatch ${PNAME}-${PVER}-man.patch || die
54
55 # install everything to /usr
56 mpatch ${PNAME}-${PVER}-usr-move.patch || die
57
58 # fix build with newer kernel headers >= 4.3
59 sed -i -e "s:^\(bool.*HAVE_HWSTRIP\).*:\1 n:" \
60 -e "s:^\(bool.*HAVE_HWTR\).*:\1 n:" \
61 config.in || die
62 }
63
64 src_compile()
65 {
66 cd ${SRCDIR}
67 yes "" | make config || die
68 make COPTS="-D_GNU_SOURCE -Wall ${CFLAGS}" || die
69 }
70
71 src_install()
72 {
73 cd ${SRCDIR}
74 make update BASEDIR=${BINDIR} || die
75 minstalldocs ABOUT-NLS COPYING README* TODO || die
76
77 # remove binaries provided by inetutils
78 mdelete /usr/bin/dnsdomainname || die
79 mdelete /usr/share/man/man1/dnsdomainname.1 || die
80 mdelete /usr/bin/hostname || die
81 mdelete /usr/share/man/man1/hostname.1 || die
82 }