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