Commit 3d17ffc6 authored by Oleg Dzhimiev's avatar Oleg Dzhimiev

figured out how to make it with *.bbappend

parent 04231a9b
/*
* config.h Automatically generated configuration includefile
*
* NET-TOOLS A collection of programs that form the base set of the
* NET-3 Networking Distribution for the LINUX operating
* system.
*
* DO NOT EDIT DIRECTLY
*
*/
/*
*
* Internationalization
*
* The net-tools package has currently been translated to French,
* German and Brazilian Portugese. Other translations are, of
* course, welcome. Answer `n' here if you have no support for
* internationalization on your system.
*
*/
#define I18N 1
/*
*
* Protocol Families.
*
*/
#define HAVE_AFUNIX 1
#define HAVE_AFINET 1
#define HAVE_AFINET6 1
#define HAVE_AFIPX 0
#define HAVE_AFATALK 0
#define HAVE_AFAX25 0
#define HAVE_AFNETROM 1
#define HAVE_AFROSE 0
#define HAVE_AFX25 0
#define HAVE_AFECONET 0
#define HAVE_AFDECnet 0
#define HAVE_AFASH 0
/*
*
* Device Hardware types.
*
*/
#define HAVE_HWETHER 1
#define HAVE_HWARC 1
#define HAVE_HWSLIP 1
#define HAVE_HWPPP 1
#define HAVE_HWTUNNEL 1
#define HAVE_HWSTRIP 0
#define HAVE_HWTR 0
#define HAVE_HWAX25 0
#define HAVE_HWROSE 0
#define HAVE_HWNETROM 1
#define HAVE_HWX25 0
#define HAVE_HWFR 1
#define HAVE_HWSIT 0
#define HAVE_HWFDDI 0
#define HAVE_HWHIPPI 0
#define HAVE_HWASH 0
#define HAVE_HWHDLCLAPB 0
#define HAVE_HWIRDA 1
#define HAVE_HWEC 0
#define HAVE_HWIB 0
/*
*
* Other Features.
*
*/
#define HAVE_FW_MASQUERADE 1
#define HAVE_IP_TOOLS 1
#define HAVE_MII 1
SUMMARY="Basic networking tools"
DESCRIPTION="A collection of programs that form the base set of the NET-3 networking distribution for the Linux operating system"
HOMEPAGE = "http://net-tools.berlios.de/"
BUGTRACKER = "http://bugs.debian.org/net-tools"
LICENSE = "GPLv2+"
LIC_FILES_CHKSUM = "file://COPYING;md5=8ca43cbc842c2336e835926c2166c28b \
file://ifconfig.c;beginline=11;endline=15;md5=d1ca372080ad5401e23ca0afc35cf9ba"
PR = "r0"
SRC_URI = "${DEBIAN_MIRROR}/main/n/net-tools/net-tools_1.60.orig.tar.gz;name=tarball \
${DEBIAN_MIRROR}/main/n/net-tools/${BPN}_${PV}.diff.gz;apply=no;name=patch \
file://net-tools-config.h"
#Notice the leading space
SRC_URI_append = " file://config.make \
file://libmii.c \
file://mii-diag.c \
file://Makefile"
S = "${WORKDIR}/net-tools-1.60"
SRC_URI[tarball.md5sum] = "ecaf37acb5b5daff4bdda77785fd916d"
SRC_URI[tarball.sha256sum] = "ec67967cf7b1a3a3828a84762fbc013ac50ee5dc9aa3095d5c591f302c2de0f5"
SRC_URI[patch.md5sum] = "524658bb8df5ff92c4a991f5edcaf240"
SRC_URI[patch.sha256sum] = "170cc024fcb34329f4c25fd88b5f160a06be5d6d3eaf0bc976650fd1b1a6235d"
inherit gettext
# The Makefile is lame, no parallel build
PARALLEL_MAKE = ""
# Unlike other Debian packages, net-tools *.diff.gz contains another series of
# patches maintained by quilt. So manually apply them before applying other local
# patches. Also remove all temp files before leaving, because do_patch() will pop
# up all previously applied patches in the start
nettools_do_patch() {
cd ${S}
quilt pop -a || true
if [ -d ${S}/.pc-nettools ]; then
mv ${S}/.pc-nettools ${S}/.pc
QUILT_PATCHES=${S}/debian/patches quilt pop -a
rm -rf ${S}/.pc ${S}/debian
fi
patch -p1 < ${WORKDIR}/${BPN}_${PV}.diff
QUILT_PATCHES=${S}/debian/patches quilt push -a
mv ${S}/.pc ${S}/.pc-nettools
}
do_unpack[cleandirs] += "${S}"
# We invoke base do_patch at end, to incorporate any local patch
python do_patch() {
bb.build.exec_func('nettools_do_patch', d)
bb.build.exec_func('patch_do_patch', d)
}
do_configure() {
# net-tools has its own config mechanism requiring "make config"
# we pre-generate desired options and copy to source directory instead
cp ${WORKDIR}/Makefile ${S}/Makefile
cp ${WORKDIR}/config.make ${S}/config.make
cp ${WORKDIR}/libmii.c ${S}/libmii.c
cp ${WORKDIR}/mii-diag.c ${S}/mii-diag.c
cp ${WORKDIR}/net-tools-config.h ${S}/config.h
}
do_compile() {
# net-tools use COPTS/LOPTS to allow adding custom options
export COPTS="$CFLAGS"
export LOPTS="$LDFLAGS"
unset CFLAGS
unset LDFLAGS
oe_runmake
}
do_install() {
oe_runmake 'BASEDIR=${D}' install
}
inherit update-alternatives
base_sbindir_progs = "arp ifconfig ipmaddr iptunnel mii-tool mii-diag nameif plipconfig rarp route slattach"
base_bindir_progs = "dnsdomainname domainname hostname netstat nisdomainname ypdomainname"
ALTERNATIVE_${PN} = "${base_sbindir_progs} ${base_bindir_progs}"
python __anonymous() {
for prog in d.getVar('base_sbindir_progs', True).split():
d.setVarFlag('ALTERNATIVE_LINK_NAME', prog, '%s/%s' % (d.getVar('base_sbindir', True), prog))
for prog in d.getVar('base_bindir_progs', True).split():
d.setVarFlag('ALTERNATIVE_LINK_NAME', prog, '%s/%s' % (d.getVar('base_bindir', True), prog))
}
ALTERNATIVE_PRIORITY = "100"
FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
SRC_URI_append = " file://config.make \
file://libmii.c \
file://mii-diag.c \
file://Makefile"
do_configure_append() {
cp ${WORKDIR}/Makefile ${S}/Makefile
cp ${WORKDIR}/config.make ${S}/config.make
cp ${WORKDIR}/libmii.c ${S}/libmii.c
cp ${WORKDIR}/mii-diag.c ${S}/mii-diag.c
}
base_sbindir_progs_append = " mii-diag"
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment