2007-07-27 20:37:35 +02:00
|
|
|
# $NetBSD: shlibs,v 1.7 2007/07/27 18:37:35 jlam Exp $
|
2007-07-18 20:01:02 +02:00
|
|
|
#
|
|
|
|
# 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@"
|
2007-07-18 20:53:18 +02:00
|
|
|
TRUE="@TRUE@"
|
2007-07-18 20:01:02 +02:00
|
|
|
|
|
|
|
SELF=$0
|
2007-07-18 20:43:05 +02:00
|
|
|
ACTION=$1
|
2007-07-18 20:01:02 +02:00
|
|
|
|
|
|
|
CURDIR=`${PWD_CMD}`
|
2007-07-18 20:46:12 +02:00
|
|
|
PKG_METADATA_DIR="${2-${CURDIR}}"
|
2007-07-18 20:01:02 +02:00
|
|
|
: ${PKGNAME=${PKG_METADATA_DIR##*/}}
|
|
|
|
: ${PKG_PREFIX=@PREFIX@}
|
|
|
|
|
|
|
|
exitcode=0
|
|
|
|
case $ACTION in
|
|
|
|
ADD)
|
|
|
|
${ECHO} "${PKGNAME}: rebuilding run-time library search paths database"
|
2007-07-18 20:55:56 +02:00
|
|
|
( @LDCONFIG_ADD_CMD@ ) >/dev/null 2>&1 || ${TRUE}
|
2007-07-18 20:01:02 +02:00
|
|
|
;;
|
|
|
|
|
|
|
|
REMOVE)
|
|
|
|
${ECHO} "${PKGNAME}: rebuilding run-time library search paths database"
|
2007-07-18 20:55:56 +02:00
|
|
|
( @LDCONFIG_REMOVE_CMD@ ) >/dev/null 2>&1 || ${TRUE}
|
2007-07-18 20:01:02 +02:00
|
|
|
;;
|
|
|
|
esac
|
|
|
|
exit $exitcode
|
|
|
|
|
|
|
|
EOF
|
|
|
|
${SED} -n "/^\# SHLIBS: /p" ${SELF} >> ./+SHLIBS
|
|
|
|
${CHMOD} +x ./+SHLIBS
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|