#!/bin/sh 
#
# $Id: makedebshlocal.sh,v 1.2 2002/01/20 14:23:52 rdm Exp $
#
# Write lines for <pkg> to debian/shlibs.local
#
tgtdir=$1 ; shift 
debdir=$1 ; shift
cmndir=$1 ; shift 
versi=$1  ; shift
major=$1  ; shift
minor=$1  ; shift 
pkg=$1

### echo %%% save package name in logical variable 
pkg=$1

### echo %%% save major.minor version number in short name
v=${major}.${minor}

if [ -f ${cmndir}/${pkg}.shlibs ] ; then 
    p=${pkg} 
    sed -e "/^#.*/d" \
        -e "/^[ \t]*$/d" \
        -e "s|^@prefix@/lib/root/\(lib.*\)\.so.*|\1 $v $p (>= $versi)|" \
        <  ${cmndir}/${pkg}.shlibs >> ${tgtdir}/shlibs.local
fi

#
# $Log: makedebshlocal.sh,v $
# Revision 1.2  2002/01/20 14:23:52  rdm
# Mega patch by Christian Holm concerning the configure, build and
# Debian and RedHat packaging scripts. The configure script has been
# rationalized (introduction of two shell functions to find package
# headers and libraries). Extensive update of the INSTALL writeup,
# including description of all new packages (SapDB, PgSql, etc.).
# More options to the root-config script. Man page for memprobe.
# Big overhaul of the Debian and RedHat packaging scripts, supporting
# the new libraries.
#
# Revision 1.1  2001/04/23 14:11:47  rdm
# part of the debian and redhat build system.
#
#
