about summary refs log tree commit diff
path: root/pkgs/os-specific/linux/tcp-wrapper/builder.sh
blob: fe8ad8d466e5d94c244463ffaf2301b805c65e98 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
source "$stdenv/setup" || exit 1

# Unpack
unpackPhase &&							\
cd "$sourceRoot/upstream/tarballs" &&				\
tar xzvf * &&							\
cd tcp_wrappers_7.6 &&						\
								\
# Patch
substituteInPlace "Makefile" --replace				\
   "REAL_DAEMON_DIR=/usr/sbin" "REAL_DAEMON_DIR=$out/sbin"	\
   --replace "/tmp" '$$TMPDIR' &&				\
substituteInPlace "scaffold.c" --replace			\
   'extern char *malloc();' " " &&				\
substituteInPlace "environ.c" --replace				\
   'extern char *malloc();' " " &&				\
								\
# The `linux' target doesn't work on Linux...
echo building... &&						\
make REAL_DAEMON_DIR="$out/sbin" freebsd &&			\
								\
# Install
ensureDir "$out/sbin" &&					\
cp safe_finger tcpd tcpdchk tcpdmatch try-from "$out/sbin" &&	\
								\
ensureDir "$out/lib" &&						\
cp lib*.a "$out/lib" &&						\
								\
ensureDir "$out/include" &&					\
cp *.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								\