blob: 93d7c04fdd2f22432ad9b040c4c329640190ad4f (
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
|
# $NetBSD: shlibs,v 1.4 2007/07/18 18:53:18 jlam Exp $
#
# Generate a +SHLIBS script that updates the system run-time library
# search paths database for the package.
#
case "${STAGE},$1" in
UNPACK,|UNPACK,+SHLIBS)
${CAT} > ./+SHLIBS << 'EOF'
#!@SH@
#
# +SHLIBS - system run-time library search paths database management script
#
# Usage: ./+SHLIBS ADD|REMOVE [metadatadir]
#
# This scripts rebuilds the system database of run-time library search
# paths so that the system can find the shared libraries of the package
# associated with <metadatadir>.
#
ECHO="@ECHO@"
PWD_CMD="@PWD_CMD@"
TRUE="@TRUE@"
SELF=$0
ACTION=$1
CURDIR=`${PWD_CMD}`
PKG_METADATA_DIR="${2-${CURDIR}}"
: ${PKGNAME=${PKG_METADATA_DIR##*/}}
: ${PKG_PREFIX=@PREFIX@}
exitcode=0
case $ACTION in
ADD)
${ECHO} "${PKGNAME}: rebuilding run-time library search paths database"
( @LDCONFIG_ADD_CMD@ ) >/dev/null 1>&2 || ${TRUE}
;;
REMOVE)
${ECHO} "${PKGNAME}: rebuilding run-time library search paths database"
( @LDCONFIG_REMOVE_CMD@ ) >/dev/null 1>&2 || ${TRUE}
;;
esac
exit $exitcode
EOF
${SED} -n "/^\# SHLIBS: /p" ${SELF} >> ./+SHLIBS
${CHMOD} +x ./+SHLIBS
;;
esac
|