2008-03-15 22:41:31 +00:00
|
|
|
source "$stdenv/setup" || exit 1
|
|
|
|
|
|
|
|
# Unpack
|
2009-02-26 09:53:31 +00:00
|
|
|
unpackPhase
|
|
|
|
cd "$sourceRoot/upstream/tarballs"
|
|
|
|
tar xzvf *
|
|
|
|
cd tcp_wrappers_7.6
|
|
|
|
|
2008-03-15 22:41:31 +00:00
|
|
|
# Patch
|
2009-02-26 09:53:31 +00:00
|
|
|
patchPhase
|
|
|
|
for patch in debian/patches/*
|
|
|
|
do
|
|
|
|
echo "applying Debian patch \`$(basename $patch)'..."
|
2010-05-04 13:32:00 +00:00
|
|
|
patch --batch -p1 < $patch
|
2009-02-26 09:53:31 +00:00
|
|
|
done
|
|
|
|
|
2008-03-15 22:41:31 +00:00
|
|
|
substituteInPlace "Makefile" --replace \
|
|
|
|
"REAL_DAEMON_DIR=/usr/sbin" "REAL_DAEMON_DIR=$out/sbin" \
|
2009-02-26 09:53:31 +00:00
|
|
|
--replace "/tmp" '$$TMPDIR'
|
|
|
|
|
|
|
|
echo "building..."
|
|
|
|
make REAL_DAEMON_DIR="$out/sbin" linux
|
|
|
|
|
2008-03-15 22:41:31 +00:00
|
|
|
# Install
|
2009-02-26 09:53:31 +00:00
|
|
|
ensureDir "$out/sbin"
|
|
|
|
cp -v safe_finger tcpd tcpdchk tcpdmatch try-from "$out/sbin"
|
|
|
|
|
|
|
|
ensureDir "$out/lib"
|
|
|
|
cp -v shared/lib*.so* "$out/lib"
|
|
|
|
|
|
|
|
ensureDir "$out/include"
|
|
|
|
cp -v *.h "$out/include"
|
|
|
|
|
|
|
|
ensureDir "$out/man"
|
|
|
|
for i in 3 5 8;
|
|
|
|
do
|
|
|
|
ensureDir "$out/man/man$i"
|
|
|
|
cp *.$i "$out/man/man$i" ;
|
|
|
|
done
|