blob: 81b3bf74f8733c0774c06df23d6e16885a9f019c (
plain)
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
|
# $NetBSD: INSTALL,v 1.1 2018/07/31 05:38:56 schmonz Exp $
DIFF="@DIFF@"
INSTALL_DATA="@INSTALL_DATA@"
PSEUDO_PLIST="@PSEUDO_PLIST@"
SHAREDIR="@SHAREDIR@"
case "${STAGE}" in
POST-INSTALL)
cd ${PREFIX}/${SHAREDIR}
./test
TEST_EXITCODE=$?
if [ ${TEST_EXITCODE} -ne 0 ]; then
${CAT} <<EOF
===========================================================================
ERROR: tests exited nonzero (${TEST_EXITCODE}).
The installation may not be correct or performant.
===========================================================================
EOF
exit 1
fi
./upgrade
cd link-install/newest
_INSTALLED_FILES=''
for i in include/*.h; do
${INSTALL_DATA} ${i} ${PREFIX}/include
_INSTALLED_FILES="${_INSTALLED_FILES}"'
'"include/$(${BASENAME} ${i})"
done
for i in lib/*/*.a; do
${INSTALL_DATA} ${i} ${PREFIX}/lib
_INSTALLED_FILES="${_INSTALLED_FILES}"'
'"lib/$(${BASENAME} ${i})"
done
_INSTALLED_FILES=$(${ECHO} "${_INSTALLED_FILES}" | ${GREP} -v '^$' | ${SORT} -u)
cd ${PREFIX}/${SHAREDIR}
echo "${_INSTALLED_FILES}" | ${DIFF} -u pseudo-PLIST -
DIFF_EXITCODE=$?
if [ ${DIFF_EXITCODE} -ne 0 ]; then
${CAT} <<EOF
===========================================================================
ERROR: installed files do not match pseudo-PLIST.
===========================================================================
EOF
exit 1
fi
;;
esac
|