diff options
author | jlam <jlam> | 2007-07-18 18:01:02 +0000 |
---|---|---|
committer | jlam <jlam> | 2007-07-18 18:01:02 +0000 |
commit | b1e323a4623608b46511d1b5b7af2b869bad3275 (patch) | |
tree | d694e70403073f0ddd81b4ae67afbd219db4a5b4 /mk/pkginstall/shlibs | |
parent | 8cd45cbaa84d07afd7e533df3e896ed8a656a14e (diff) | |
download | pkgsrc-b1e323a4623608b46511d1b5b7af2b869bad3275.tar.gz |
Add back a facility to rebuild the run-time library search paths database
on platforms that need it.
XXX Right now, if the platform needs it, then it runs for every package.
XXX This needs to be fixed to only run for packages that install shared
XXX libraries.
* Move mk/plist/shlib-type to mk/scripts.
* Move definition of SHLIB_TYPE from mk/plist/plist.mk to bsd.pkg.mk.
* Move inclusion of bsd.pkginstall.mk below bsd.tools.mk so that it
can use SHLIB_TYPE. This is necessary because SHLIB_TYPE's value
is the result of evaluating a command, and the command needs "TOOL"
definitions provided by bsd.tools.mk.
Diffstat (limited to 'mk/pkginstall/shlibs')
-rw-r--r-- | mk/pkginstall/shlibs | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/mk/pkginstall/shlibs b/mk/pkginstall/shlibs new file mode 100644 index 00000000000..5733a4c2cb2 --- /dev/null +++ b/mk/pkginstall/shlibs @@ -0,0 +1,49 @@ +# $NetBSD: shlibs,v 1.1 2007/07/18 18:01:03 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@" + +SELF=$0 + +CURDIR=`${PWD_CMD}` +PKG_METADATA_DIR="${1-${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@ + ;; + +REMOVE) + ${ECHO} "${PKGNAME}: rebuilding run-time library search paths database" + @LDCONFIG_REMOVE_CMD@ + ;; +esac +exit $exitcode + +EOF + ${SED} -n "/^\# SHLIBS: /p" ${SELF} >> ./+SHLIBS + ${CHMOD} +x ./+SHLIBS + ;; +esac + |