99eaf946d6
OBS-URL: https://build.opensuse.org/package/show/Base:System/bash?expand=0&rev=0e684b6d69ca471a3edec76de2eeecc1
192 lines
6.9 KiB
Diff
192 lines
6.9 KiB
Diff
--- shlib/Makefile.in
|
|
+++ shlib/Makefile.in 2010-02-15 16:02:32.644391084 +0000
|
|
@@ -59,6 +59,7 @@ bindir = @bindir@
|
|
libdir = @libdir@
|
|
datadir = @datadir@
|
|
localedir = @localedir@
|
|
+linkagedir = $(libdir)
|
|
|
|
# Support an alternate destination root directory for package building
|
|
DESTDIR =
|
|
@@ -183,13 +184,13 @@ installdirs: $(topdir)/support/mkdirs
|
|
-$(SHELL) $(topdir)/support/mkdirs $(DESTDIR)$(libdir)
|
|
|
|
install: installdirs $(SHLIB_STATUS)
|
|
- $(SHELL) $(topdir)/support/shlib-install -O $(host_os) -V $(host_vendor) -d $(DESTDIR)$(libdir) -b $(DESTDIR)$(bindir) -i "$(INSTALL_DATA)" $(SHARED_HISTORY)
|
|
- $(SHELL) $(topdir)/support/shlib-install -O $(host_os) -V $(host_vendor) -d $(DESTDIR)$(libdir) -b $(DESTDIR)$(bindir) -i "$(INSTALL_DATA)" $(SHARED_READLINE)
|
|
+ $(SHELL) $(topdir)/support/shlib-install -O $(host_os) -V $(host_vendor) -dd $(DESTDIR) -d $(libdir) -l $(linkagedir) -b $(bindir) -i "$(INSTALL_DATA)" $(SHARED_HISTORY)
|
|
+ $(SHELL) $(topdir)/support/shlib-install -O $(host_os) -V $(host_vendor) -dd $(DESTDIR) -d $(libdir) -l $(linkagedir) -b $(bindir) -i "$(INSTALL_DATA)" $(SHARED_READLINE)
|
|
@echo install: you may need to run ldconfig
|
|
|
|
uninstall:
|
|
- $(SHELL) $(topdir)/support/shlib-install -O $(host_os) -V $(host_vendor) -d $(DESTDIR)$(libdir) -b $(DESTDIR)$(bindir) -U $(SHARED_HISTORY)
|
|
- $(SHELL) $(topdir)/support/shlib-install -O $(host_os) -V $(host_vendor) -d $(DESTDIR)$(libdir) -b $(DESTDIR)$(bindir) -U $(SHARED_READLINE)
|
|
+ $(SHELL) $(topdir)/support/shlib-install -O $(host_os) -V $(host_vendor) -dd $(DESTDIR) -d $(libdir) -l $(linkagedir) -b $(bindir) -U $(SHARED_HISTORY)
|
|
+ $(SHELL) $(topdir)/support/shlib-install -O $(host_os) -V $(host_vendor) -dd $(DESTDIR) -d $(libdir) -l $(linkagedir) -b $(bindir) -U $(SHARED_READLINE)
|
|
@echo uninstall: you may need to run ldconfig
|
|
|
|
clean mostlyclean: force
|
|
--- support/shlib-install
|
|
+++ support/shlib-install 2010-02-15 15:59:38.005297957 +0000
|
|
@@ -3,7 +3,7 @@
|
|
# shlib-install - install a shared library and do any necessary host-specific
|
|
# post-installation configuration (like ldconfig)
|
|
#
|
|
-# usage: shlib-install [-D] -O host_os [-V host_vendor] -d installation-dir [-b bin-dir] -i install-prog [-U] library
|
|
+# usage: shlib-install [-D] -O host_os [-V host_vendor] -d installation-dir [-l linkage-dir] [-b bin-dir] -i install-prog [-U] library
|
|
#
|
|
# Chet Ramey
|
|
# chet@po.cwru.edu
|
|
@@ -12,10 +12,12 @@
|
|
# defaults
|
|
#
|
|
INSTALLDIR=/usr/local/lib
|
|
+LINKAGEDIR=
|
|
LDCONFIG=ldconfig
|
|
+DESTDIR=
|
|
|
|
PROGNAME=`basename $0`
|
|
-USAGE="$PROGNAME [-D] -O host_os [-V host_vendor] -d installation-dir [-b bin-dir] -i install-prog [-U] library"
|
|
+USAGE="$PROGNAME [-D] -O host_os [-V host_vendor] [-l linkage-dir] -d installation-dir [-b bin-dir] -i install-prog [-U] library"
|
|
|
|
# process options
|
|
|
|
@@ -24,14 +26,19 @@ while [ $# -gt 0 ]; do
|
|
-O) shift; host_os="$1"; shift ;;
|
|
-V) shift; host_vendor="$1"; shift ;;
|
|
-d) shift; INSTALLDIR="$1"; shift ;;
|
|
+ -dd) shift; DESTDIR=$1; shift ;;
|
|
-b) shift; BINDIR="$1" ; shift ;;
|
|
-i) shift; INSTALLPROG="$1" ; shift ;;
|
|
+ -l) shift; LINKAGEDIR="$1" ; shift ;;
|
|
-D) echo=echo ; shift ;;
|
|
-U) uninstall=true ; shift ;;
|
|
-*) echo "$USAGE" >&2 ; exit 2;;
|
|
*) break ;;
|
|
esac
|
|
done
|
|
+if [ -z "$LINKAGEDIR" ]; then
|
|
+ LINKAGEDIR="$INSTALLDIR"
|
|
+fi
|
|
|
|
# set install target name
|
|
LIBNAME="$1"
|
|
@@ -49,18 +56,18 @@ LN="ln -s"
|
|
# pre-install
|
|
|
|
if [ -z "$uninstall" ]; then
|
|
- ${echo} $RM ${INSTALLDIR}/${LIBNAME}.${OLDSUFF}
|
|
- if [ -f "$INSTALLDIR/$LIBNAME" ]; then
|
|
- ${echo} $MV $INSTALLDIR/$LIBNAME ${INSTALLDIR}/${LIBNAME}.${OLDSUFF}
|
|
+ ${echo} $RM ${DESTDIR}${INSTALLDIR}/${LIBNAME}.${OLDSUFF}
|
|
+ if [ -f "${DESTDIR}$INSTALLDIR/$LIBNAME" ]; then
|
|
+ ${echo} $MV ${DESTDIR}$INSTALLDIR/$LIBNAME ${DESTDIR}${INSTALLDIR}/${LIBNAME}.${OLDSUFF}
|
|
fi
|
|
fi
|
|
|
|
# install/uninstall
|
|
|
|
if [ -z "$uninstall" ] ; then
|
|
- ${echo} eval ${INSTALLPROG} $LIBNAME ${INSTALLDIR}/${LIBNAME}
|
|
+ ${echo} eval ${INSTALLPROG} $LIBNAME ${DESTDIR}${INSTALLDIR}/${LIBNAME}
|
|
else
|
|
- ${echo} ${RM} ${INSTALLDIR}/${LIBNAME}
|
|
+ ${echo} ${RM} ${DESTDIR}${INSTALLDIR}/${LIBNAME}
|
|
fi
|
|
|
|
# post-install/uninstall
|
|
@@ -72,7 +79,7 @@ fi
|
|
case "$host_os" in
|
|
hpux*|darwin*|macosx*|linux*)
|
|
if [ -z "$uninstall" ]; then
|
|
- chmod 555 ${INSTALLDIR}/${LIBNAME}
|
|
+ chmod 555 ${DESTDIR}${INSTALLDIR}/${LIBNAME}
|
|
fi ;;
|
|
cygwin*|mingw*)
|
|
IMPLIBNAME=`echo ${LIBNAME} \
|
|
@@ -110,8 +117,8 @@ case "$LIBNAME" in
|
|
LINK1=`echo $LIBNAME | sed 's:\(.*\)\.[0-9]\.[0-9]:\1:'` # libname.dylib
|
|
esac
|
|
|
|
-INSTALL_LINK1='${echo} cd $INSTALLDIR && ${echo} ${LN} $LIBNAME $LINK1'
|
|
-INSTALL_LINK2='${echo} cd $INSTALLDIR && ${echo} ${LN} $LIBNAME $LINK2'
|
|
+INSTALL_LINK1='${echo} cd ${DESTDIR}$INSTALLDIR && ${echo} ${LN} $LIBNAME $LINK1'
|
|
+INSTALL_LINK2='${echo} cd ${DESTDIR}$INSTALLDIR && ${echo} ${LN} $LIBNAME $LINK2'
|
|
|
|
#
|
|
# Create symlinks to the installed library. This section is incomplete.
|
|
@@ -119,27 +126,27 @@ INSTALL_LINK2='${echo} cd $INSTALLDIR &&
|
|
case "$host_os-$host_vendor" in
|
|
*linux*|freebsd*-gentoo)
|
|
# libname.so.M -> libname.so.M.N
|
|
- ${echo} ${RM} ${INSTALLDIR}/$LINK2
|
|
+ ${echo} ${RM} ${DESTDIR}${INSTALLDIR}/$LINK2
|
|
if [ -z "$uninstall" ]; then
|
|
eval $INSTALL_LINK2
|
|
fi
|
|
|
|
# libname.so -> libname.so.M
|
|
- ${echo} ${RM} ${INSTALLDIR}/$LINK1
|
|
+ ${echo} ${RM} ${DESTDIR}${INSTALLDIR}/$LINK1
|
|
if [ -z "$uninstall" ]; then
|
|
- ${echo} cd $INSTALLDIR && ${echo} ${LN} $LINK2 $LINK1
|
|
+ ${echo} cd ${DESTDIR}$INSTALLDIR && ${echo} ${LN} $LINK2 $LINK1
|
|
fi
|
|
;;
|
|
|
|
bsdi4*|*gnu*|darwin*|macosx*|netbsd*)
|
|
# libname.so.M -> libname.so.M.N
|
|
- ${echo} ${RM} ${INSTALLDIR}/$LINK2
|
|
+ ${echo} ${RM} ${DESTDIR}${INSTALLDIR}/$LINK2
|
|
if [ -z "$uninstall" ]; then
|
|
eval $INSTALL_LINK2
|
|
fi
|
|
|
|
# libname.so -> libname.so.M.N
|
|
- ${echo} ${RM} ${INSTALLDIR}/$LINK1
|
|
+ ${echo} ${RM} ${DESTDIR}${INSTALLDIR}/$LINK1
|
|
if [ -z "$uninstall" ]; then
|
|
eval $INSTALL_LINK1
|
|
fi
|
|
@@ -147,7 +154,7 @@ bsdi4*|*gnu*|darwin*|macosx*|netbsd*)
|
|
|
|
solaris2*|aix4.[2-9]*|aix[5-9]*|osf*|irix[56]*|sysv[45]*|dgux*|interix*)
|
|
# libname.so -> libname.so.M
|
|
- ${echo} ${RM} ${INSTALLDIR}/$LINK1
|
|
+ ${echo} ${RM} ${DESTDIR}${INSTALLDIR}/$LINK1
|
|
if [ -z "$uninstall" ]; then
|
|
eval $INSTALL_LINK1
|
|
fi
|
|
@@ -158,19 +165,19 @@ solaris2*|aix4.[2-9]*|aix[5-9]*|osf*|iri
|
|
freebsd3*|freebsdaout*)
|
|
if [ -x /usr/bin/objformat ] && [ "`/usr/bin/objformat`" = "elf" ]; then
|
|
# libname.so -> libname.so.M
|
|
- ${echo} ${RM} ${INSTALLDIR}/$LINK1
|
|
+ ${echo} ${RM} ${DESTDIR}${INSTALLDIR}/$LINK1
|
|
if [ -z "$uninstall" ]; then
|
|
eval $INSTALL_LINK1
|
|
fi
|
|
else
|
|
# libname.so.M -> libname.so.M.N
|
|
- ${echo} ${RM} ${INSTALLDIR}/$LINK2
|
|
+ ${echo} ${RM} ${DESTDIR}${INSTALLDIR}/$LINK2
|
|
if [ -z "$uninstall" ]; then
|
|
eval $INSTALL_LINK2
|
|
fi
|
|
|
|
# libname.so -> libname.so.M.N
|
|
- ${echo} ${RM} ${INSTALLDIR}/$LINK1
|
|
+ ${echo} ${RM} ${DESTDIR}${INSTALLDIR}/$LINK1
|
|
if [ -z "$uninstall" ]; then
|
|
eval $INSTALL_LINK1
|
|
fi
|
|
@@ -187,7 +194,7 @@ freebsd[4-9]*|freebsdelf*|dragonfly*)
|
|
|
|
hpux1*)
|
|
# libname.sl -> libname.M
|
|
- ${echo} ${RM} ${INSTALLDIR}/$LINK1.sl
|
|
+ ${echo} ${RM} ${DESTDIR}${INSTALLDIR}/$LINK1.sl
|
|
if [ -z "$uninstall" ]; then
|
|
eval $INSTALL_LINK1
|
|
fi
|