development/apache-ivy: Fix and install doinst.sh.

Signed-off-by: B. Watson <yalhcru@gmail.com>
Signed-off-by: David Spencer <idlemoor@slackbuilds.org>
This commit is contained in:
B. Watson 2017-03-20 15:32:20 -04:00 committed by David Spencer
parent 393340878c
commit 50710a784c
2 changed files with 7 additions and 13 deletions

View File

@ -15,7 +15,7 @@ ANT_HOME=/usr/share/ant
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
i?86) ARCH=i486 ;;
i?86) ARCH=i586 ;;
arm*) ARCH=arm ;;
*) ARCH=$( uname -m ) ;;
esac
@ -54,6 +54,7 @@ cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
cat $CWD/doinst.sh > $PKG/install/doinst.sh
cd $PKG
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}

View File

@ -1,12 +1,5 @@
postinstall scriptlet (using /bin/sh):
rm -f /usr/share/java/ivy.jar
ln -s /usr/share/java/ivy-1.4.1.jar /usr/share/java/ivy.jar
postuninstall scriptlet (using /bin/sh):
if [ "$1" = "0" ]; then
# Remove the old link
rm -f /usr/share/java/ivy.jar
# Put back a new link. It's OK if this fails, that just means there
# is no other version of the package installed
ln -fs `ls -tr /usr/share/java/ivy-* 2>/dev/null|tail -n 1` /usr/share/java/ivy.jar || true
fi
# 20170320 bkw: got rid of dead code (if [ "$1" = "0" ]... would never be
# true in a doinst), got rid of absolute paths, and there were comments
# missing their # so they were executed as code...
rm -f usr/share/java/ivy.jar
ln -s ivy-1.4.1.jar usr/share/java/ivy.jar