Added netcat.

This commit is contained in:
Nicolas JOURDEN 2017-05-25 15:05:47 +02:00 committed by Pedro Gonçalves
parent b4591b8d2e
commit 3314f83868
2 changed files with 63 additions and 0 deletions

52
rules/netcat/default.bash Normal file
View File

@ -0,0 +1,52 @@
version=\
(
"110"
)
url=\
(
"https://kent.dl.sourceforge.net/project/nc$version/unix%20netcat%201.10%20by%20_Hobbit_/%5BUnnamed%20release%5D/nc$version.tgz"
)
md5=\
(
"402632f2fe01c169ff19a0ad6e9d608c"
)
post_unpack()
{
cd "../netcat-$version"
mv ../data .
mv ../generic.h .
mv ../Makefile .
mv ../netcat.blurb .
mv ../netcat.c .
mv ../README .
mv ../Changelog .
mv ../scripts .
mv ../stupidh .
patches=$(ls "$pkg_dir"/patches/*.patch)
if [ -n "$patches" ]; then
cat $patches | patch -p1
fi
}
build()
{
make nc CC="$cmd_target_cc"
}
host_install()
{
$cmd_cp nc "${cfg_dir_toolchain_sysroot}/usr/bin/"
$cmd_mkdir "${cfg_dir_toolchain_sysroot}/usr/share/bin/"
$cmd_cp scripts/* "${cfg_dir_toolchain_sysroot}/usr/share/bin/"
}
target_install()
{
$cmd_target_strip nc -o "$cfg_dir_rootfs/usr/bin/nc"
$cmd_mkdir ${cfg_dir_rootfs}/usr/share/bin/
$cmd_cp scripts/* "${cfg_dir_rootfs}/usr/share/bin/"
}

View File

@ -0,0 +1,11 @@
--- a/netcat.c 2017-05-25 14:39:05.517314469 +0200
+++ b/netcat_patch.c 2017-05-25 14:39:00.549218618 +0200
@@ -1316,7 +1316,7 @@
#ifdef HAVE_BIND
/* can *you* say "cc -yaddayadda netcat.c -lresolv -l44bsd" on SunLOSs? */
- res_init();
+// res_init();
#endif
/* I was in this barbershop quartet in Skokie IL ... */
/* round up the usual suspects, i.e. malloc up all the stuff we need */