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)'..."
|
2010-05-04 15:32:00 +02:00
|
|
|
patch --batch -p1 < $patch
|
2009-02-26 10:53:31 +01:00
|
|
|
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
|
2012-01-18 21:16:00 +01:00
|
|
|
mkdir -p "$out/sbin"
|
2009-02-26 10:53:31 +01:00
|
|
|
cp -v safe_finger tcpd tcpdchk tcpdmatch try-from "$out/sbin"
|
|
|
|
|
2012-01-18 21:16:00 +01:00
|
|
|
mkdir -p "$out/lib"
|
2009-02-26 10:53:31 +01:00
|
|
|
cp -v shared/lib*.so* "$out/lib"
|
|
|
|
|
2012-01-18 21:16:00 +01:00
|
|
|
mkdir -p "$out/include"
|
2009-02-26 10:53:31 +01:00
|
|
|
cp -v *.h "$out/include"
|
|
|
|
|
2012-01-18 21:16:00 +01:00
|
|
|
mkdir -p "$out/man"
|
2009-02-26 10:53:31 +01:00
|
|
|
for i in 3 5 8;
|
|
|
|
do
|
2012-01-18 21:16:00 +01:00
|
|
|
mkdir -p "$out/man/man$i"
|
2009-02-26 10:53:31 +01:00
|
|
|
cp *.$i "$out/man/man$i" ;
|
|
|
|
done
|