summaryrefslogtreecommitdiffstats
path: root/meta/recipes-extended/net-tools/net-tools_1.60-25.bb
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-extended/net-tools/net-tools_1.60-25.bb')
-rw-r--r--meta/recipes-extended/net-tools/net-tools_1.60-25.bb89
1 files changed, 89 insertions, 0 deletions
diff --git a/meta/recipes-extended/net-tools/net-tools_1.60-25.bb b/meta/recipes-extended/net-tools/net-tools_1.60-25.bb
new file mode 100644
index 0000000000..0e4ee754a4
--- /dev/null
+++ b/meta/recipes-extended/net-tools/net-tools_1.60-25.bb
@@ -0,0 +1,89 @@
1SUMMARY = "Basic networking tools"
2DESCRIPTION = "A collection of programs that form the base set of the NET-3 networking distribution for the Linux operating system"
3HOMEPAGE = "http://net-tools.berlios.de/"
4BUGTRACKER = "http://bugs.debian.org/net-tools"
5LICENSE = "GPLv2+"
6LIC_FILES_CHKSUM = "file://COPYING;md5=8ca43cbc842c2336e835926c2166c28b \
7 file://ifconfig.c;beginline=11;endline=15;md5=d1ca372080ad5401e23ca0afc35cf9ba"
8
9SRC_URI = "${DEBIAN_MIRROR}/main/n/net-tools/net-tools_1.60.orig.tar.gz;name=tarball \
10 ${DEBIAN_MIRROR}/main/n/net-tools/${BPN}_${PV}.diff.gz;apply=no;name=patch \
11 file://net-tools-config.h \
12 file://net-tools-config.make \
13 file://ifconfig-interface-0-del-IP-will-remove-the-aliased-.patch \
14 "
15
16S = "${WORKDIR}/net-tools-1.60"
17
18SRC_URI[tarball.md5sum] = "ecaf37acb5b5daff4bdda77785fd916d"
19SRC_URI[tarball.sha256sum] = "ec67967cf7b1a3a3828a84762fbc013ac50ee5dc9aa3095d5c591f302c2de0f5"
20
21SRC_URI[patch.md5sum] = "5ab1e2184d0fa6518031291138f2fc51"
22SRC_URI[patch.sha256sum] = "1bddcd96ac60e794978cb20fb7ea4c2e77258c56c042c9ac8b6ec2b2033bc56f"
23
24inherit gettext
25
26# The Makefile is lame, no parallel build
27PARALLEL_MAKE = ""
28
29# Unlike other Debian packages, net-tools *.diff.gz contains another series of
30# patches maintained by quilt. So manually apply them before applying other local
31# patches. Also remove all temp files before leaving, because do_patch() will pop
32# up all previously applied patches in the start
33nettools_do_patch() {
34 cd ${S}
35 quilt pop -a || true
36 if [ -d ${S}/.pc-nettools ]; then
37 rm -rf ${S}/.pc
38 mv ${S}/.pc-nettools ${S}/.pc
39 QUILT_PATCHES=${S}/debian/patches quilt pop -a
40 rm -rf ${S}/.pc ${S}/debian
41 fi
42 patch -p1 < ${WORKDIR}/${BPN}_${PV}.diff
43 QUILT_PATCHES=${S}/debian/patches quilt push -a
44 mv ${S}/.pc ${S}/.pc-nettools
45}
46
47do_unpack[cleandirs] += "${S}"
48
49# We invoke base do_patch at end, to incorporate any local patch
50python do_patch() {
51 bb.build.exec_func('nettools_do_patch', d)
52 bb.build.exec_func('patch_do_patch', d)
53}
54
55do_configure() {
56 # net-tools has its own config mechanism requiring "make config"
57 # we pre-generate desired options and copy to source directory instead
58 cp ${WORKDIR}/net-tools-config.h ${S}/config.h
59 cp ${WORKDIR}/net-tools-config.make ${S}/config.make
60}
61
62do_compile() {
63 # net-tools use COPTS/LOPTS to allow adding custom options
64 export COPTS="$CFLAGS"
65 export LOPTS="$LDFLAGS"
66 unset CFLAGS
67 unset LDFLAGS
68
69 oe_runmake
70}
71
72do_install() {
73 oe_runmake 'BASEDIR=${D}' install
74}
75
76inherit update-alternatives
77
78base_sbindir_progs = "arp ifconfig ipmaddr iptunnel mii-tool nameif plipconfig rarp route slattach"
79base_bindir_progs = "dnsdomainname domainname hostname netstat nisdomainname ypdomainname"
80
81ALTERNATIVE_${PN} = "${base_sbindir_progs} ${base_bindir_progs}"
82python __anonymous() {
83 for prog in d.getVar('base_sbindir_progs', True).split():
84 d.setVarFlag('ALTERNATIVE_LINK_NAME', prog, '%s/%s' % (d.getVar('base_sbindir', True), prog))
85 for prog in d.getVar('base_bindir_progs', True).split():
86 d.setVarFlag('ALTERNATIVE_LINK_NAME', prog, '%s/%s' % (d.getVar('base_bindir', True), prog))
87}
88ALTERNATIVE_PRIORITY = "100"
89