summaryrefslogtreecommitdiff
path: root/source/l/shared-mime-info/shared-mime-info.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'source/l/shared-mime-info/shared-mime-info.SlackBuild')
-rwxr-xr-xsource/l/shared-mime-info/shared-mime-info.SlackBuild26
1 files changed, 18 insertions, 8 deletions
diff --git a/source/l/shared-mime-info/shared-mime-info.SlackBuild b/source/l/shared-mime-info/shared-mime-info.SlackBuild
index 81d5f01b..ed72d9ba 100755
--- a/source/l/shared-mime-info/shared-mime-info.SlackBuild
+++ b/source/l/shared-mime-info/shared-mime-info.SlackBuild
@@ -1,6 +1,6 @@
#!/bin/sh
-# Copyright 2008, 2009, 2010 Patrick J. Volkerding, Sebeka, MN, USA
+# Copyright 2008, 2009, 2010, 2012 Patrick J. Volkerding, Sebeka, MN, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -23,7 +23,7 @@
PKGNAM=shared-mime-info
VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
NUMJOBS=${NUMJOBS:-" -j7 "}
@@ -75,10 +75,10 @@ CFLAGS="$SLKCFLAGS" \
--mandir=/usr/man \
--docdir=/usr/doc/${PKGNAM}-$VERSION \
--disable-update-mimedb \
- --build=$ARCH-slackware-linux
+ --build=$ARCH-slackware-linux || exit 1
make $NUMJOBS || make || exit 1
-make install DESTDIR=$PKG
+make install DESTDIR=$PKG || exit 1
mkdir -p $PKG/usr/lib${LIBDIRSUFFIX}
mv $PKG/usr/share/pkgconfig $PKG/usr/lib${LIBDIRSUFFIX}
@@ -93,10 +93,20 @@ chmod 755 $PKG/var/log/setup/setup.07.update-mime-database
find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
-( cd $PKG/usr/man
- find . -type f -exec gzip -9 {} \;
- for i in $(find . -type l) ; do ln -s $(readlink $i).gz $i.gz ; rm $i ; done
-)
+# Compress and link manpages, if any:
+if [ -d $PKG/usr/man ]; then
+ ( cd $PKG/usr/man
+ for manpagedir in $(find . -type d -name "man*") ; do
+ ( cd $manpagedir
+ for eachpage in $( find . -type l -maxdepth 1) ; do
+ ln -s $( readlink $eachpage ).gz $eachpage.gz
+ rm $eachpage
+ done
+ gzip -9 *.?
+ )
+ done
+ )
+fi
mkdir -p $PKG/usr/doc/${PKGNAM}-$VERSION
cp -a \