Skip to content

Commit

Permalink
added xscript-fix-shlibdeps.sh script
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.opensource.yandex.net/xscript/trunk@712 b01ef89b-65f2-463d-9415-e8412542ae63
  • Loading branch information
lmovsesjan committed Jan 22, 2009
1 parent 84eefff commit 926c465
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ EXTRA_DIST = ChangeLog Doxyfile AUTHORS COPYING INSTALL NEWS README \
examples/http_3.xml examples/http_4.xml examples/http-local-tagged.xml \
examples/include.xml examples/simple.xml examples/xinclude.xml \
extra/xscript-cache-clean extra/xscriptcacheclean.sh \
extra/xscriptstart.sh
extra/xscriptstart.sh extra/xscript-fix-shlibdeps.sh

if HAVE_LUA_BLOCK
SUBDIRS += lua-block
Expand Down
1 change: 1 addition & 0 deletions debian/libxscript-dev.files
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
usr/include/xscript/*
usr/lib/libxscript.a
usr/lib/libxscript.la
usr/local/bin/*
2 changes: 2 additions & 0 deletions debian/rules
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@ install: build tests
mkdir -p $(CURDIR)/debian/tmp/usr/bin
install -m 755 $(CURDIR)/extra/xscriptstart.sh $(CURDIR)/debian/tmp/usr/bin
install -m 755 $(CURDIR)/extra/xscriptcacheclean.sh $(CURDIR)/debian/tmp/usr/bin
mkdir -p $(CURDIR)/debian/tmp/usr/local/bin
install -m 755 $(CURDIR)/extra/xscript-fix-shlibdeps.sh $(CURDIR)/debian/tmp/usr/local/bin
mkdir -p $(CURDIR)/debian/tmp/etc/cron.d
install -m 644 $(CURDIR)/extra/xscript-cache-clean $(CURDIR)/debian/tmp/etc/cron.d

Expand Down
32 changes: 32 additions & 0 deletions extra/xscript-fix-shlibdeps.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# !/bin/sh

CORE_PACKAGE="libxscript"
PACKAGE=$1
FILE="debian/$PACKAGE.substvars"

if [ -f $PACKAGE ]; then
echo "Package name must be feeded as command line parameter"
exit 1
fi

if ! test -e $FILE; then
echo "File $FILE not found"
exit 1
fi

while read LINE
do
MATCH=`echo $LINE | grep -c 'shlibs:Depends='`
if [ "1" = $MATCH ]; then
VERSION=`echo $LINE | sed -e 's/.*'$CORE_PACKAGE' (>=//' | sed -e 's/).*//'`
MAJOR_VERSION=`echo $VERSION | sed -e 's/[.].*//'`
MINOR_VERSION=`echo $VERSION | sed -e 's/.*[.]//'`
CORRECT_LINE=`echo -n $LINE, $CORE_PACKAGE '(<' $MAJOR_VERSION.$(($MINOR_VERSION+1))')'`
echo $CORRECT_LINE
else
echo $LINE
fi
done < $FILE > $FILE.tmp

mv $FILE.tmp $FILE

0 comments on commit 926c465

Please sign in to comment.