Added netcat.
This commit is contained in:
parent
b4591b8d2e
commit
3314f83868
52
rules/netcat/default.bash
Normal file
52
rules/netcat/default.bash
Normal 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/"
|
||||
}
|
11
rules/netcat/patches/res_init.patch
Normal file
11
rules/netcat/patches/res_init.patch
Normal 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 */
|
Reference in New Issue
Block a user