nixpkgs/pkgs/os-specific/linux/iputils/builder.sh
Armijn Hemel 5c18319127 iputils, as used in Red Hat Linux (there are a few flavours around apparently).
*** BIG FAT WARNING ***

Right now these tools can only be used as root, because they are normally
installed SUID root!

svn path=/nixpkgs/trunk/; revision=1234
2004-08-05 19:30:00 +00:00

30 lines
579 B
Bash

. $stdenv/setup
tar jxvf $src
cd iputils
echo $src
echo $kernelHeaders
echo $glibc
sed -e "s^KERNEL_INCLUDE=.*$^KERNEL_INCLUDE=$kernelHeaders/include^" < Makefile > Makefile.new
mv Makefile.new Makefile
sed -e "s^LIBC_INCLUDE=.*$^LIBC_INCLUDE=$glibc/include^" < Makefile > Makefile.new
mv Makefile.new Makefile
make
mkdir -p $out/bin
mkdir -p $out/sbin
install -c arping $out/sbin/
install -c ping $out/bin/
install -c ping6 $out/sbin/
install -c rdisc $out/sbin/
install -c tracepath $out/sbin/
install -c tracepath6 $out/sbin/
install -c traceroute6 $out/sbin/
exit(1)