2008-03-15 23:41:31 +01:00
|
|
|
source "$stdenv/setup" || exit 1
|
|
|
|
|
|
|
|
# Unpack
|
2009-02-26 10:53:31 +01:00
|
|
|
unpackPhase
|
|
|
|
cd "$sourceRoot/upstream/tarballs"
|
|
|
|
tar xzvf *
|
|
|
|
cd tcp_wrappers_7.6
|
|
|
|
|
2008-03-15 23:41:31 +01:00
|
|
|
# Patch
|
2009-02-26 10:53:31 +01:00
|
|
|
patchPhase
|
|
|
|
for patch in debian/patches/*
|
|
|
|
do
|
|
|
|
echo "applying Debian patch \`$(basename $patch)'..."
|
|
|
|
patch -p1 < $patch
|
|
|
|
done
|
|
|
|
|
2008-03-15 23:41:31 +01:00
|
|
|
substituteInPlace "Makefile" --replace \
|
|
|
|
"REAL_DAEMON_DIR=/usr/sbin" "REAL_DAEMON_DIR=$out/sbin" \
|
2009-02-26 10:53:31 +01:00
|
|
|
--replace "/tmp" '$$TMPDIR'
|
|
|
|
|
|
|
|
echo "building..."
|
|
|
|
make REAL_DAEMON_DIR="$out/sbin" linux
|
|
|
|
|
2008-03-15 23:41:31 +01:00
|
|
|
# Install
|
2009-02-26 10:53:31 +01: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
|