Debian Codegraph @

package/check

raw
1 #! /bin/sh
2
3 package/packagecheck || exit 1
4
5 # The package self check needs:
6 # a) the publicfile ftpd http://cr.yp.to/publicfile.html
7 # b) daemontools http://cr.yp.to/daemontools.html
8 # c) ucspi-tcp (for publicfile) http://cr.yp.to/ucspi-tcp.html
9
10 ok=0
11
12 # need publicfile daemontools ucspi-tcp
13
14 # /usr/local/publicfile/bin/: as djb intended it.
15 # /usr/bin/: gentoo linux
16 # /usr/local/bin/: FreeBSD port
17 for i in /usr/local/publicfile/bin/ /usr/bin/ /usr/local/bin/ ; do
18 $i/ftpd 1 2 3 4 5 6 7 8 9 10 2>/dev/null >/dev/null
19 if test "$?" = 20 ; then
20 ok=1
21 PUBLICFILE_FTPD=$i/ftpd
22 export PUBLICFILE_FTPD
23 break
24 fi
25 done
26 if test "$ok" = 0 ; then
27 fail="publicfile"
28 fi
29
30 # check for daemontools
31 svc 2>/dev/null >/dev/null
32 if test "$?" = 0 ; then
33 :
34 else
35 ok=0;
36 fail="$fail daemontools"
37 fi
38
39 # check for ucspi-tcp
40 tcpserver 2>/dev/null >/dev/null
41 if test "$?" = 100 ; then
42 :
43 else
44 ok=0;
45 fail="$fail ucspi-tcp"
46 fi
47
48 if test "x$ok" = x0 ; then
49 echo "Check not done: missing $fail" >&2
50 exit 0
51 fi
52 cd compile || exit 1
53 exec make check