diff options
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.bb | 87 |
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 @@ | |||
1 | SUMMARY="Basic networking tools" | ||
2 | DESCRIPTION="A collection of programs that form the base set of the NET-3 networking distribution for the Linux operating system" | ||
3 | HOMEPAGE = "http://net-tools.berlios.de/" | ||
4 | BUGTRACKER = "http://bugs.debian.org/net-tools" | ||
5 | LICENSE = "GPLv2+" | ||
6 | LIC_FILES_CHKSUM = "file://COPYING;md5=8ca43cbc842c2336e835926c2166c28b \ | ||
7 | file://ifconfig.c;beginline=11;endline=15;md5=d1ca372080ad5401e23ca0afc35cf9ba" | ||
8 | PR = "r0" | ||
9 | |||
10 | SRC_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 | |||
15 | S = "${WORKDIR}/net-tools-1.60" | ||
16 | |||
17 | SRC_URI[tarball.md5sum] = "ecaf37acb5b5daff4bdda77785fd916d" | ||
18 | SRC_URI[tarball.sha256sum] = "ec67967cf7b1a3a3828a84762fbc013ac50ee5dc9aa3095d5c591f302c2de0f5" | ||
19 | |||
20 | SRC_URI[patch.md5sum] = "524658bb8df5ff92c4a991f5edcaf240" | ||
21 | SRC_URI[patch.sha256sum] = "170cc024fcb34329f4c25fd88b5f160a06be5d6d3eaf0bc976650fd1b1a6235d" | ||
22 | |||
23 | inherit gettext | ||
24 | |||
25 | # The Makefile is lame, no parallel build | ||
26 | PARALLEL_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 | ||
32 | nettools_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 | |||
45 | do_unpack[cleandirs] += "${S}" | ||
46 | |||
47 | # We invoke base do_patch at end, to incorporate any local patch | ||
48 | python do_patch() { | ||
49 | bb.build.exec_func('nettools_do_patch', d) | ||
50 | bb.build.exec_func('patch_do_patch', d) | ||
51 | } | ||
52 | |||
53 | do_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 | |||
60 | do_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 | |||
70 | do_install() { | ||
71 | oe_runmake 'BASEDIR=${D}' install | ||
72 | } | ||
73 | |||
74 | inherit update-alternatives | ||
75 | |||
76 | base_sbindir_progs = "arp ifconfig ipmaddr iptunnel mii-tool nameif plipconfig rarp route slattach" | ||
77 | base_bindir_progs = "dnsdomainname domainname hostname netstat nisdomainname ypdomainname" | ||
78 | |||
79 | ALTERNATIVE_${PN} = "${base_sbindir_progs} ${base_bindir_progs}" | ||
80 | python __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 | } | ||
86 | ALTERNATIVE_PRIORITY = "100" | ||
87 | |||