academic/gtkwave: Fixed (Handle mime info and desktop files)

Signed-off-by: dsomero <xgizzmo@slackbuilds.org>
This commit is contained in:
dsomero 2012-09-27 19:36:20 -04:00 committed by Robby Workman
parent 856a223d7c
commit adf2c7c2ca
2 changed files with 26 additions and 8 deletions

View file

@ -0,0 +1,7 @@
if [ -x /usr/bin/update-desktop-database ]; then
/usr/bin/update-desktop-database -q usr/share/applications >/dev/null 2>&1
fi
if [ -x /usr/bin/update-mime-database ]; then
/usr/bin/update-mime-database usr/share/mime >/dev/null 2>&1
fi

View file

@ -5,15 +5,13 @@
PRGNAM=gtkwave PRGNAM=gtkwave
VERSION=${VERSION:-3.3.40} VERSION=${VERSION:-3.3.40}
BUILD=${BUILD:-1} BUILD=${BUILD:-2}
TAG=${TAG:-_SBo} TAG=${TAG:-_SBo}
# Automatically determine the architecture we're building on:
if [ -z "$ARCH" ]; then if [ -z "$ARCH" ]; then
case "$( uname -m )" in case "$( uname -m )" in
i?86) ARCH=i486 ;; i?86) ARCH=i486 ;;
arm*) ARCH=arm ;; arm*) ARCH=arm ;;
# Unless $ARCH is already set, use uname -m for all other archs:
*) ARCH=$( uname -m ) ;; *) ARCH=$( uname -m ) ;;
esac esac
fi fi
@ -66,13 +64,25 @@ CXXFLAGS="$SLKCFLAGS" \
make make
make install DESTDIR=$PKG make install DESTDIR=$PKG
find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \ # Don't clobber Slackware's mime info.
rm -f $PKG/usr/share/mime/XMLnamespaces
rm -f $PKG/usr/share/mime/version
rm -f $PKG/usr/share/mime/aliases
rm -f $PKG/usr/share/mime/generic-icons
rm -f $PKG/usr/share/mime/globs
rm -f $PKG/usr/share/mime/globs2
rm -f $PKG/usr/share/mime/icons
rm -f $PKG/usr/share/mime/magic
rm -f $PKG/usr/share/mime/mime.cache
rm -f $PKG/usr/share/mime/subclasses
rm -f $PKG/usr/share/mime/treemagic
rm -f $PKG/usr/share/mime/types
find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
( cd $PKG/usr/man find $PKG/usr/man -type f -exec gzip -9 {} \;
find . -type f -exec gzip -9 {} \; for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
for i in $( find . -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
)
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a *.TXT $PKG/usr/doc/$PRGNAM-$VERSION cp -a *.TXT $PKG/usr/doc/$PRGNAM-$VERSION
@ -80,6 +90,7 @@ cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
mkdir -p $PKG/install mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc cat $CWD/slack-desc > $PKG/install/slack-desc
cat $CWD/doinst.sh > $PKG/install/doinst.sh
cd $PKG cd $PKG
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz} /sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}